NOTE: This is not fully fleshed out yet but the concept is shown.
What this PR does is allows us to think of an Assistant as "someone who does work" but how the work gets done is not important -- all assistants can hand off control and participate in the message stream.
1) Added the ability to run a post_execute method on any assistant. Changed the loop to have the concept of next_assistant. The chat completions and tools run as usual, but if the Assistant has a post_execute method, it will always be called and has the ability to create a different handoff.
2) Added ToolAssistant which only runs tools. This can be optimized but is not yet.
Why/Context/Summary
NOTE: This is not fully fleshed out yet but the concept is shown.
What this PR does is allows us to think of an
Assistant
as "someone who does work" but how the work gets done is not important -- all assistants can hand off control and participate in the message stream.Refer to this PR for usage.
1) Added the ability to run a
post_execute
method on any assistant. Changed the loop to have the concept ofnext_assistant
. The chat completions and tools run as usual, but if theAssistant
has apost_execute
method, it will always be called and has the ability to create a different handoff.2) Added
ToolAssistant
which only runs tools. This can be optimized but is not yet.Test plan