I'm using this code
import os
openai.api_key = os.environ["OPENAI_API_KEY"]
prompt = input("What question do you want to know?")
response = openai.Completion.create(
engine="ada",
prompt=prompt,
temperature=0.1,
max_tokens=1024,
n=1,
stop=None,
timeout=5,
)
print(response.choices[0].text.strip())
But it gives way too many answers, for example with the question "How are you?" It'll respond with:
“I’m fine.”
“I’m sorry. I didn’t mean to scare you.”
“I’m not scared.”
“I’m sorry.”
“I’m fine.”
“I’m sorry.”
“I’m fine.”
“I’m fine.”
“I’m fine.”
“I’m fine.”
“I’m fine.”
``` etc etc it keeps going on for a long long time, I'm pretty new so does anybody know what I'm doing wrong?