- Goal: I am trying to parse the data from a table (using json.stringify) into a retool AI query to use with the chat component.
The problem is that (even though the data exists) the query that is send via the chat component doesn't seem to contain the data, I.e. the variable has not been inserted correctly.
However, when I manually run the query in the editor, the data is displayed and included correctly in the query and the model gives a correct answer.
In short: Variables get set correctly when running the retool ai query manually in the editor, but don't work when running the same query from within the chat component.
-
Steps: I've tried to set the data as a variable first, to be sure it is loaded correctly before the query gets send. The problem remains. Also I've added a console.log that gets triggered when a message is send in the chat component to verify again that the data does exist.
-
Screenshots:
Clearly the mapping data does exist. When I press on "run" in the editor, everything works fine and a correct response is displayed in the chat component.
The query:
Correct response:
However, when I run the same query via the chat component, the model doesn't receive the data: