Discuss with a customer in a iterative way

Hi all,
I’d like to create a script which knows all the parameters that are required from a user before being able to generate the complete answer. So ideally, in a nutshell, have a list of keys that are automatically filled in by the script/openai along the discussion with the user. Once all the parameters are filled in then the AI can generate what is needed.

Eg. (to ease sharing my need ;-)):

  • User: I want you to print a Teddy bear
  • Prompt: Which size?
  • User: A4
  • Prompt: which type of paper
  • User: 200g

Once we have all the answers we can launch the print.

Any clue how to do such thing?

Thanks for our help

I just tried this example, and it worked!


Please ask me questions, one at a time, until you have gathered the following information from me: {{Name}}, {{Address}}, {{PhoneNumber}}. Ask one question at a time. Once you have it all please tell me the JSON representation for it.

Thanks a lot for the idea, but how would you put such thing in a Python script?

At the very top of this forum website there’s a link to Documentation and API Reference. But the general approach is to just keep collecting then inputs from the user and then prompting them with what GPT is giving you back.

Try entering that prompt into the ChatGPT GUI and you can see the kind of back and forth it will cause.