If a run takes more than 10 minutes, OpenAI seems to automatically cancel the run. Anyone run into this? Any way to fix? How can we handle complex requests?
More details: I have a loop that constantly retrieves the run (openai.beta.threads.runs.retrieve), and:
- If the run’s status is ‘queued’ or ‘in_progress’: sleep 1 second
- If the run’s status is ‘requires_action’: handle the tool outputs
- If the run’s status is ‘completed’: we’re good to go! (It usually completes within a few minutes.)
Whenever this loop takes longer than 10 mins, the run’s status goes to ‘canceled.’
Any way to handle more complicated runs?
Yes it is mentioned in the documentation.
Thank you! Any suggestion for how to handle more complex runs?
Maybe we should just use normal gpt-4-turbo with function calling? Not sure why assistants is even needed
What kind of execution are you doing to make it pass more than 10mins?
Just lots of API calls on hundreds of different objects at a time…for customers that have lots of data…and the whole benefit to them is they can do things en masse. So it’s kind of the point
Hmm, I’m doing something similar with my service! Merch Masters Bot Do the all API calls are necessary? like wouldn’t be great we you filter out only the needed once?