I call like:
def translate(text):
model_engine = "text-davinci-003"
#prompt = (f"please translate to Chinese:\n{text}\n")
print(f"prompt: {text}")
response = openai.Completion.create(
model=model_engine,
prompt=text,
temperature=0.8,
max_tokens=300,
#top_p=1,
frequency_penalty=0,
presence_penalty=0
)
return response.choices[0].text.strip()
it work fine with my friend’s API_KEY, but the response always not relative with my prompt by API Call.
Can’t figure out how to solve this problem.