Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature Request]: Swarm - further control for SwarmResult #357

@marklysze

Description

@marklysze

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

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions