I can use “text-davinci-003” in the playground just fine. But I am not able to access it through the API.
I can access the “gpt-4” and “gpt-3.5-turbo” models via the API just fine. I want to use “text-davinci-003” instead of “gpt-3.5-turbo” because in playground it is doing a much better job of following my instructions for how I want the output formatted.
How do I get access? It seems odd that I would have access to “gpt-4” and “gpt-3.5-turbo” but not “text-davinci-003”
Use this endpoint, it’s different than Chat:
https://api.openai.com/v1/completions
1 Like
Thank you! The documentation is surprisingly hard to find. For anyone encountering a similar problem, here is how you implement the v1/completions:
def davinci(user_input):
response = openai.Completion.create(
engine="text-davinci-003",
temperature = 0,
max_tokens=10,
prompt = "Describe the sentiment of the user input in one word. User input: " + user_input
)
reply_content = response.choices[0].text.strip()
return reply_content
1 Like
Hello, does someone know where can i find the url of davinci 003 or gpt-4 / or gpt 3.5 such as this one ? https://api.openai.com/v1/engines/text-davinci-002/completions
Thank you