response = openai.Completion.create(
engine="text-davinci-003",
prompt=f"translate the following text into English:\n{main_prompt}",
max_tokens=max_tokens,
n=1,
stop=None,
temperature=0.5,
)
change to
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "translate the following text into English:\n"},
{"role": "user", "content": main_prompt},
]
)
change to