Replies: 5 comments 16 replies
-
Hi @Columboom - we will have a look at the issue - I kind of doubt we have tested this with Alibaba model - have you tried the same with openai? |
Beta Was this translation helpful? Give feedback.
-
It's because the model couldn't generate a tool call for handing off to the user. As mentioned in the guide, Swarm relies on tool calls to make the transition. No magic here. To mitigate this issue with your model, besides promoting, try different termination conditions as described in the Terminations section of the tutorial. You can try TextMessageTermination
Could you explain. What is query?
Please upgrade to the latest version it has been added. |
Beta Was this translation helpful? Give feedback.
-
Converting this to discussion as it isn't a bug. Consider improving documentation with help of OP. |
Beta Was this translation helpful? Give feedback.
-
@ekzhu Thank you for you reply, I also met this issue while using AzureOpenAI gpt-4o and using Alibaba qwen-max which are the most common models so I would appreciate if boundary conditions can be optimized |
Beta Was this translation helpful? Give feedback.
-
Also, I have tried HandoffTermination(target="user") and TextMessageTermination. It doesn't work well. |
Beta Was this translation helpful? Give feedback.
-
What happened?
Describe the bug
I used Swarm in autogen_autochat involves human-computer interaction. It obtains user input through handoffs. When the agent failed to understand the prompt well —resulting in no handoff target—the call fell into an infinite loop. In which both the context messages and content were empty. I suspect the root cause lies in either the swarm’s handoff management logic or a multithreading issue.
To Reproduce
I ran the demo Swarm Quickstart with LLM qwen-max.
The agents didn't follow the prompt to output query sentence firstly before handoff to user. The query sentence and handoff function call were returned in the same message.
Therefore, I modified the prompt with "If you need information from the user, you must first only send your message, then you can handoff to the user."
Now the query sentence is output as expected, but the infinite loop occurs.
Expected behavior
Issures
I would appreciate it if you could answer:
Which packages was the bug in?
Python AgentChat (autogen-agentchat>=0.4.0)
AutoGen library version.
Python 0.4.5
Other library version.
No response
Model used
qwen-max
Model provider
Other (please specify below)
Other model provider
alibaba
Python version
None
.NET version
None
Operating system
None
Beta Was this translation helpful? Give feedback.
All reactions