Hi I’m working on creating a chatbot using openAI API, But I’m getting different response when I’m querying the same text using playground and via my API
I have the same parameters for both Playground as well as for the API
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:"]
)
Here is the screenshot for playground
Now here is the prompt for custom API
PROMPT: "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?"
Final prompt to openAI API
Final Prompt:
'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?\nHuman: good'
Response that I get from OpenAI API
"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?\nHuman: good\nAI: , thanks for asking.
What do you do?\nAI: 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."
All the paramters are same but why am I getting different response here in my custom API