I'm trying to fill my table with what I write in
textInput1 and what GPT generates as output in
For example, I would like my table to be filled like this right now : ID 1, Input "hola," Output "¡Hola! ¿En qué puedo ayudarte hoy?". Then, I would like the next interactions to be added in sequence (ID 2, 3, 4...). I want the table to update with the new interaction only after clicking
button1. How can I do this? I'm new to these things and encountering some difficulties.
Thank you very much.
Have you set up the query where you save the data?
One way to accomplish this would be to request that GPT return the result in a JSON object (add the directive to the prompt) and create the table from that object.
Depending on what you are trying to do:
- You will need to play with the prompting both to get what you want and to define the output consistently
- Process the response JSON into a DB (or something) instead of directly off the chat. In the example below, I sent it through a Retool JSON explorer object which cleaned it up for me.
- The Chat will look pretty off since GPT is responding in JSON; you might not want to use that format.
As a simplistic POC:
Thank you very much, you've been very helpful! However, in the end, I used JSON Editor.