Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
marklysze opened this issue Jan 5, 2025 · 0 comments · Fixed by #358
Closed

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

marklysze opened this issue Jan 5, 2025 · 0 comments · Fixed by #358
Assignees
Labels
enhancement New feature or request swarm

Comments

@marklysze
Copy link
Collaborator

marklysze commented Jan 5, 2025

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

@marklysze marklysze added enhancement New feature or request swarm labels Jan 5, 2025
@marklysze marklysze self-assigned this Jan 8, 2025
@davorrunje davorrunje added this to ag2 Jan 9, 2025
@davorrunje davorrunje moved this to Todo in ag2 Jan 9, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in ag2 Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request swarm
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant