#Unable to use gpt-3.5-turbo, only text-davinci-003

5 messages · Page 1 of 1 (latest)

verbal olive
#

I'm a bit confused, when I apply for GPT4 access, it says the following:

Thank you. You’ll hear from us soon! In the meantime, we encourage you to check out our previous best performing and cost effective model, gpt-3.5-turbo.

But, whenever I try to update my application to use 'gpt-3.5-turbo' instead of the current 'text-davinci-003' it breaks. It is listed here in the models https://platform.openai.com/docs/models/gpt-3-5 and says 'We recommend using gpt-3.5-turbo over the other GPT-3.5 models because of its lower cost." on that page so I'm a bit confused why it doesnt work?

  response = openai.Completion.create(
            engine="text-davinci-003",
            prompt=prompt,
            max_tokens= 1500,
            n=1,
            stop=None,
            temperature=0.5,
        )

Here is what my code looks like above, when I change it to gpt-3.5-turbo it breaks 😦

astral tendon
#

The problem is you are using the completion mode, which will attempt to complete the input. Instead you want to use chat. Feel free to look at the documentation and playground for more help (in playground you can use gpt3.5t in it’s “chat” mode)

#

In the link you posted it says the following:

#

Note: you need to be using OpenAI Python v0.27.0 for the code below to work

import openai

openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the world series in 2020?"},
{"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
{"role": "user", "content": "Where was it played?"}
]
)