I have created a text input box, a text box and a button.
What I want to do is:
- user input a word in text input box;
- when the button (Submit) is clicked, it will run an openai resources (POST Chat/Completion) to return a message.
- the message will be updated in text box.
I hv got no problem in calling the OpenAI api. When I run the script, it works ok.
But when I change the input text to another word, the message doesn't update accordingly.
Any idea? Or it is something related to the temporary state?
Thanks in advance!