Hi community!
I am considering implementing an assistant that functions as an orchestrator, which I call ‘Director,’ along with other assistants referred to as ‘actors.’
The following is the sequential behavior I had in mind, but it won’t work since OpenAI does not allow having multiple concurrent runs for the same thread. Is there a solution? Possible solutions I was thinking of include:
• Cancel run1 (but this can’t be done because only in-progress runs can be canceled)
• Modify the run (and change the assistant_id), but this doesn’t seem to be possible.
Here is the intended workflow:
1. (D) receives a message
2. (D) adds the message to the thread
3. (D) creates run 1 (with thread_id and assistant_id)
4. (D) Run status is REQUIRES ACTION
5. (D) calls the function of ACTOR A
6. (A) creates run 2 (with thread_id and assistant_id)
7. (A) Run status is REQUIRES ACTION
8. (A) calls function CALL 1 and obtains CALL 1 result
9. (A) submits tool outputs (CALL 1 result) to run 2
10. (A) changes run 2 status to completed
11. (D) submits tool outputs (ACTOR A result) to run 1
12. (D) changes run 1 status to completed
Is there an approach that allows maintaining this sequential behavior without violating the single concurrent run constraint? Any insights or alternative solutions would be greatly appreciated.
thank you!