dabit3 / openai-functions-god-app

240 stars 33 forks source link

gpt-4 does not exist #2

Open joemccann opened 1 year ago

joemccann commented 1 year ago

I have a paid plan with OpenAI, but I get this error with the gpt-4 model included in the config for the OpenAI data object.

{
  error: {
    message: 'The model: `gpt-4` does not exist',
    type: 'invalid_request_error',
    param: null,
    code: 'model_not_found'
  }
}

It was silently failing so I had to output it here:

const response = await fetch(base_uri, {
  method: 'POST',
  headers,
  body: JSON.stringify(requestData),
})

const json = await response.json()
console.dir(json)
let choice = json.choices[0]

const { function_call } = choice.message
joemccann commented 1 year ago

FWIW I changed the model to gpt-3.5-turbo-16k-0613 and it worked.