I need a prompt message for this purpose:
User: Hi, the book’s title is “XXX” and it was published in yyyy.
ChatGPT: Hi, you entered the book title as xxx and it was published in yyyy. Are these details correct? AND generate JSON {title: xxx published: yyy}.
If the user doesn’t respond to these two questions, then the JSON is not generated, and ChatGPT responds that it’s unable to produce text.
Ofc its even better if whole answer is in json format, but chatgpt provide null for book but message if it cant generate proper json book object.
I’m implementing this in JavaScript, but OpenAI is still relatively unfamiliar to me.