openai
openai copied to clipboard
gpt-3.5-turbo doesn't work
OpenAI::Client.new(api_key: ENV.fetch("OPENAI_API_KEY"), default_engine: "gpt-3.5-turbo")
res = openai_client.chat(prompt: prompt)
Caused by OpenAI::Client::Error: This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?
According to OpenAI API documentation model gpt-3.5-turbo
isn't available for the endpoint v1/completions
.
This library does not implement v1/chat/completions
endpoint so model gpt-3.5-turbo
isn't available at the moment
The ruby method is #chat
, but it doesn't call the /chat/completions
endpoint?
Why not call it #completions
and leave #chat
as not implemented?