Is it possible to add access to new tools and files to a run that is “in_progress” by modifying the associated assistant with the “client.beta.assistants.update” function? The documentation states:
Note: ‘file_ids’ associated with the Assistant cannot be overridden during Run creation. You must use the modify Assistant endpoint to do this.
But it doesn’t mention if the same can be done after Run creation while the run is “in_progress” or if the same applies to the “tools” parameter?
The only reasonable time to modify documents or other parameters is when you’ve intercepted a function call, and the assistant is for a single user. Otherwise, when the AI is in the middle of 100 steps it could have fun and interesting consequences.
It also could put a handle on an out-of-control assistant. Turn off its tools when it is at step 5 of continuing to fail on your API (but might not work reliably when it is on step 80 of writing python errors).
You could monitor the step list to see how long the thing has gone for, if it isn’t making 5 calls a second.
Exactly! One case would be a tool or document retrieval tool. For my application I have a search tool connected to a database of 10000 statistical datasets. The number and types of variables varies between different datasets so if its possible the workflow would be something like:
User asks a question.
An assistant with a “search_for_dataset” and “select_dataset” function is created.
Calling “search_for_dataset” returns a list of dataset titles and corresponding dataset ids.
Calling “select_dataset” adds a custom generated function tool “get_data” with a schema that reflects the input needed to query the selected dataset.
Calling “select_dataset” again would update the paramters of “get_data”.