Display the answer generated by OpenAI on the screen

Hi All,

I am experimenting with intelligent Q&A - I am using integration with OpenAI. This works very well. However, I have a problem - due to my lack of knowledge of Glide - with how to display the answer generated by OpenAI on the screen.

Details:

  1. I have a glide table with two columns: question and answer (both text).
  2. I have a screen with a form container on it.
  3. The user fills in the question text field.
  4. The action shown in the image is launched.
    iqa
  5. The question asked by the user and the answer generated by OpenAI are stored in the table.
  6. At the moment I am using a workaround - I show the answer using “Show notification” but it is weak. I would like to show a popup/hint with just the answer

I would appreciate a hint on how to do this?

Best Regards,
Andrzej

You could use a “Hint” component and select the “answers” column as the target field. I would make a condition that makes the “Hint” component visible when “Answers” is not empty. This might not be a permanent solution for what you want, but it should at least give you a starting point.

Hi @Alpha_University ,

I tried this method before asking the question. Unfortunately, in the Hint component, I get the first answer from the database (the first record) and not the answer currently generated by OpenAI (for the current question).
Unless there is some way to specify the value in Hint, for the current value → i.e. after entering the question, preparing the answer by OpenAI - exactly this answer appears in the Hint component.

Best Regards,
Andrzej

Have you tried changing the order the data is received to be reverse?

@Alpha_University I’m afraid I don’t know how to do this, but I’d be grateful for a hint.



Here are the steps to reverse the order, you can also make the columns user specific.

@Alpha_University Thank you for your help and very clear instructions. Now the last answer is displayed in the hint component, but all the time (the one that is in the database) - and my goal is to display the answer only after sending the query. So the question is: how to link the display of the hint component with the submission of a query? Unless I’ve approached the project wrong - e.g. I shouldn’t use the Form Container component.