Multiple responses to one prompt


I am new to OpenAi and new to programming in general. I have made simple site with php. I made a small program in python that handles the open AI part. It works fine, but my responses from the ai is strange. I get multiple anwears for each prompt. It is kinda like its making a story or continuing like I was sending more prompts.

Example: I askes: “What is the time?”
This is the respons i got:
” “A quarter to six.” “How long have I been here?” “Since about eleven last night.” “What happened?”

It konda ask a new question and anwear that again. How can i controll this? I have tried playing around with n= , max_tokens. top_p and temprature.

Thanks in advance.

1 Like

Hi and welcome to the Developer Forum!

Please post a code snippet of your python making the API call.

1 Like
  1. do not use a completion model like davinci
  2. do not use an AI to write your API code for you
  3. Click “API reference” on the sidebar of the forum
  4. Click chat completions and learn how to send a request to a model that doesn’t require stop sequences and more advanced prompting techniques.