Hi there,
I am currently using Assistants/Threads/Runs to chat with a configured assistant in OpenAI which has File Search enabled and some configured functions. I want it as much as possible to use the file search and get its answers from there, so when I post the Run, I am setting this body:
{
“assistant_id”:“{{AssistantID}}”,
“tool_choice”:{
“type”:“file_search”
},
“parallel_tool_calls”:true,
}
The tool_choice parameter works quite well and is yielding more accurate results rather than when its set to auto. However, I’ve hit a random, intermittent issue when it comes to function invocation. There are cases in which when I provide parameters for a function, when I check the run state, OpenAI is throwing an unhandled error as below:
Error text:
Copy
"last_error": {
"code": "server_error",
"message": "Sorry, something went wrong."
}
Repeating the run a few times will ultimately make it work, and the run state will go into requires_action. Alternatively, when I get the above error, I am posting the same run again, but removing the tool_choice parameter and it works fine.
However, why does this error happen in the first place?
Thanks!