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
[.Net][Bug]: GroupChat #2624
Comments
I am using the gpt-3.5-turbo-16k model |
Can you share the complete example somewhere and I'm happy to take a look. |
https://github.com/xuzeyu91/EasyAgent/blob/main/src/EasyAgent/Pages/Chat/Chat.razor.cs |
Thanks, what’s the name of group chat agents, are their name in English or Chinese? |
The names are in Chinese, respectively 刘备 ,张飞 and 关羽 |
Maybe try gpt-4 in admin agent? For what I know gpt-3.5 doesn't process Chinese very well. If you want to stick with gpt-3.5, another trick you can use is to fall back to user agent when admin agent fails to select an agent in the group chat using middleware. Also, when creating group chat, you don't need to add admin to |
How should this be operated? Is there an example, such as the minimum configuration being a user agent |
@xuzeyu91 Here's an example, the idea is to use middlewhere to check the reply of an agent, if it's not one of IAgent userAgent;
userAgent
.RegisterMiddleware(async (messages, options, agent, ct) =>{
var reply = await agent.GenerateResponse(messages, options, ct);
var content = reply.GetContent();
if (content is string text && (text == "from 张飞") || ..... )
{
// the next speaker is among the group, return the reply
return reply;
}
// otherwise, always fall back to user as next speaker
return new TextMessage(Role.Assistant, "from User", from: agent.Name);
}); |
Thank you. Also, I would like to inquire that I did not use RoundRobinGroupChat but instead used GroupChat |
@xuzeyu91 |
But I feel that there is a high probability that each agent will take turns speaking once,The probability of the same agent speaking continuously or a certain agent not speaking is very low |
Would you mind sharing a chat conversation |
My chat is not particularly special. I created three agents and one user agent, and after the user agent initiated a question, the responses of other agents were relatively average. For example, as the boss, the three agents I created were finance, sales, and technology, and they basically followed the pattern of one sentence per person. I feel that LLM did not play a role in allocation in it |
@xuzeyu91 One quick way to test out is to specify the name and next goto person. For example
|
Describe the bug
I often encounter issues when using group chats
"Sequence contains no matching element"
Steps to reproduce
This is my code, I used 2 custom GPTAgents, a UserProxyAgent as my input, and an Admin's GPTAgent
This error often occurs when starting a group chat:
Sequence contains no matching element
It seems to have happened earlier, and I'm not sure what logic is contained inside
Model Used
No response
Expected Behavior
No response
Screenshots and logs
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: