I am using Open AI api with these parameters
resp = OpenAIBot.__openai_instance__.Completion.create(model="text-davinci-003",
prompt=prompt,
temperature=0.9,
max_tokens=250,
top_p=1,
frequency_penalty=0,
presence_penalty=0.6,
user=botRequest.senderId,
stop=[" Human:", " AI:"]
)
this is first prompt that I am sending
"The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.\n\nHuman: Hello, who are you?\nAI: I am an AI created by OpenAI. How are you feeling today?"
to which user answers with good
to which bot replies like this
The following is a conversation with an AI assistant. The assistant is helpful,
creative, clever, and very friendly.\n\n
Human: Hello, who are you?\n
AI: I am an AI created by OpenAI. How are you feeling today?\n
Human: good\n
AI: , thanks for asking. What do you do?\n
AI: I specialize in providing helpful, creative, and intelligent
assistance for people who need it. From searching the web for information to
helping you stay organized and productive, I'm here to make your life easier.
it automatically appends the questions like thanks for asking. What do you do
which are not relative.
If i chat on open ai playground with same parameters that I am using, it behaves properly and maintains the context.
Same query context that open ai playground uses I am sending to open ai api. What can be the issue how can I fix this?