openai icon indicating copy to clipboard operation
openai copied to clipboard

gpt-3.5-turbo doesn't work

Open KevinColemanInc opened this issue 1 year ago • 2 comments

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?

KevinColemanInc avatar Apr 07 '23 15:04 KevinColemanInc

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

Quentinchampenois avatar May 08 '23 19:05 Quentinchampenois

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?

KevinColemanInc avatar May 08 '23 22:05 KevinColemanInc