#gpt-3.5-turbo: Request failed with status code 400

8 messages · Page 1 of 1 (latest)

weak solar
#
    import { Configuration, OpenAIApi } from 'openai';
    //....
    const configuration = new Configuration({
      apiKey: API_KEY,
    });
    //....
    const openai = new OpenAIApi(configuration);
    //....
    const response = await openai.createChatCompletion({
      model: "gpt-3.5-turbo",
      messages: [
        {
          role: "system", 
          content: `You are a helpful assistant.` },
        ...prompt
      ],
      temperature: 0.2,
      max_tokens: 1500,
      top_p: 1,
      frequency_penalty: 0,
      presence_penalty: 0,
    });
    //....
    res.status(200).send({
      bot: response.data.choices[0].message.content
    });
    //....

does this method in node.js doesn't work anymore?

i am getting this kind of error:

#

i still have free usage and i havent used it much

#

gpt-3.5-turbo: Request failed with status code 400

#

i also tried to output my prompt if its correct well it is still in correct format:

#

version i am using is: "openai": "^3.2.1"

#

i tried to update it to: "openai": "^3.3.0"
and error still same

#

also i would like to know the difference between gpt-3.5-turbo to gpt-3.5-turbo-16k

weak solar