Dinamically change vectorModeEnabled in Retool AI

Hello! My first question here after a week of retool.
I'm struggling in a configuration of the AI Chat model I'm customizing.

I made a config that changes dinamically the instructions and vectordataspace of a Retool AI component

Everything works until I want to dinamically ask not to use a vector model based on my configuration.

I've tried something like this in a script, but, even if I get no errors, nothing happens (checked the status of the variable after this code)
sendMessageToGpt.data.vectorModeEnabled = false;

p.s. I'd like also to dinamically change the model but have the same issue.

Ideas?

image

Retool AI text actions

1 Like

Hey @maxt, welcome to the forums!

For this use case with multiple models I would probably recommend setting up multiple AI queries for each setup that you will need, then using a JS query to programmatically call the query with the modal that you need for that specific use case.

Its not ideal, but afaik this is your best option. Hopefully this helps!

1 Like

Agreed :blush:

For the vector field, what does config.selectedItem.vector_namesapce_id evaluate to? It looks like that field is expecting an array or string