-1
Recently i was using devinci 003 model using python it works for me.
Here is the code that it might help you.
import openai
openai.api_key = "YOUR_OPENAI_API_KEY"
# Example prompt
prompt = "What is AI?"
# Specify the "text-davinci-003" model
response = openai.Completion.create(
engine="text-davinci-003",
prompt=prompt,
max_tokens=150, # number of words
n=1,
stop=None,
temperature=0.7, # Control creativity (0: deterministic, 1: maximum randomness)
)
print(response.choices[0].text)