How to Build an Agent With an OpenAI Assistant in Python - Part 1: Conversational
Too Long; Didn't Read
We now run a while loop to check for a completed status while handling a few error scenarios. The actual billing of the Assistant API is a bit murky, so to be on the safe side, I opted to cancel my runs after 2 minutes.
Even though there is an expired status for when OpenAI cancels runs after 10 minutes. If a run takes more than 2 minutes, you probably have a problem anyway.
Share Your Thoughts