-
Notifications
You must be signed in to change notification settings - Fork 493
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
When returning a SwarmResult from a function call in a swarm, it would be beneficial to be able to terminate it.
This is a request from Discord user choco. Original message here.
choco provided an example:
def publish_results(context_variables:dict) -> SwarmResult:
### take something from context_variables and turn it into a final string ###
return SwarmResult(agent=AfterWorkOption.TERMINATE, context_variables=context_variables, values=final_string)
Describe the solution you'd like
I'm proposing that we allow an AfterWorkOption to be returned in the agent parameter for a SwarmResult.
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done