Hi, I have code that gets OpenAI's models from the server and show all of them for the user to use. However, the newest models (gpt3.5, whisper-1, and embed), are not working anymore and are returned an "error 404" because the new models require different code request to run. I want the new code to specifically run for the gpt-3.5-turbo model with an: if (model === 'gpt-3.5-turbo'), like so: if (model === 'gpt-3.5-turbo') {
try {
const response = await axios({
method: 'POST',
headers: {
"Content-Type": 'application/json',
Authorization: Bearer ...,
},
url: 'https://api.openai.com/v1/chat/completions',
data: {
model: 'gpt-3.5-turbo',
max_tokens: 500,
temperature: 0.5,
n: 1,
messages: [
{
role: 'system',
content: prompt
},
{
role: 'user',
content: prompt
}
]
}
});
res = response.data.choices[0].text;
} catch (err) {
res = `ChatGPT was unable to find an answer for that! (Error: ${err.message})`;
}
What am I doing wrong here that the model is still not responding? This is what ChatGPT suggested but idk what to do to implement it because I tried everything and it's still not working. This is my website which you can try to get an idea of what I'm talking about: https://chatgpt-messenger-mu.vercel.app/