here is the code:
const configuration = new Configuration({
apiKey: Correctly set
});
const openai = new OpenAIApi(configuration);
const response = await openai.createCompletion({
model: "modelId here",
prompt:"hello",
max_tokens: 2048,
temperature: 0.8,
stream: true
},axiosConfig);
inside the axiosConfig goes like this:
axiosConfig: {
proxy: {
host: "127.0.0.1", port: 7890, protocol: "socks5"
},
maxBodyLength: "Infinity"
},
i try a couple of few options that i think what might gone wrong .
so i checked switched the host of proxy to local ipv4 address (..**.228)*means code i dont think i can tell you .
and i did format all the in need params down below in the axiosConfig instead of letting openai api to handle it itself. such as url ,method,data and headers,but it still didnt work.
so …can someone please help me out ?
or if you need more information .please let me know