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

Skip to content

Conversation

@ghoto
Copy link
Contributor

@ghoto ghoto commented Feb 26, 2025

The previous constructor of SwarmResult converts AfterWorkOptions to a string. This causes exceptions when a function sets an AfterWorkOption as the next agent.

Why are these changes needed?

The current constructor of SwarmResults converts AfterworkOption to str. This causes exceptions when trying to select the next agent, because the str is compared against the list of all agents, but the agent doesn't exist.

Related issue number

Checks

The previous constructor of SwarmResult converts AfterWorkOptions to a string.
This causes exceptions when a function sets an AfterWorkOption as the next agent.
@CLAassistant
Copy link

CLAassistant commented Feb 26, 2025

CLA assistant check
All committers have signed the CLA.

@marklysze
Copy link
Collaborator

Thanks for the fix @ghoto! Looks good, if you can sign the CLA we'll get it merged!

@marklysze
Copy link
Collaborator

Just a note that we found a bug when processing the SwarmResult from the tool call, it was ignoring the AfterWorkOption. This fix has been put in this PR.

@marklysze marklysze self-requested a review February 26, 2025 22:46
@marklysze marklysze enabled auto-merge February 26, 2025 22:48
@marklysze marklysze added this pull request to the merge queue Feb 26, 2025
Merged via the queue into ag2ai:main with commit 6170a6d Feb 26, 2025
12 checks passed
@codecov
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ There is a different number of reports uploaded between BASE (0790aae) and HEAD (5d7c8fc). Click for more details.

HEAD has 1273 uploads less than BASE
Flag BASE (0790aae) HEAD (5d7c8fc)
core-without-llm 15 1
3.9 78 0
ubuntu-latest 147 1
3.13 88 0
macos-latest 108 0
3.11 67 1
3.10 97 0
commsagent-discord 9 0
optional-deps 139 0
3.12 39 0
browser-use 7 0
windows-latest 114 0
commsagent-slack 9 0
commsagent-telegram 9 0
crawl4ai 13 0
docs 6 0
graph-rag-falkor-db 6 0
interop 13 0
interop-crewai 9 0
interop-langchain 9 0
interop-pydantic-ai 9 0
jupyter-executor 9 0
twilio 9 0
retrievechat 10 0
retrievechat-pgvector 10 0
websockets 9 0
retrievechat-mongodb 10 0
retrievechat-qdrant 11 0
agent-eval 1 0
gpt-assistant-agent 3 0
lmm 4 0
teachable 4 0
gemini 15 0
websurfer 15 0
anthropic 16 0
bedrock 14 0
cerebras 14 0
llama-index-agent 3 0
retrievechat-couchbase 3 0
cohere 15 0
groq 14 0
ollama 14 0
mistral 14 0
together 14 0
swarm 14 0
reasoning 14 0
long-context 3 0
integration 12 0
falkordb 2 0
autobuild 1 0
core-llm 4 0
neo4j 2 0
deepseek 1 0
openai 1 0

see 63 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants