-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Issue]: Write samle base on SemanticKernel with content copy from Example04_Dynamic_GroupChat_Coding_Task, can't work #2688
Comments
Seems that you forget to register message connector for the helper agent? ( and maybe admin agent as well) |
@LittleLittleCloud Any document about register messsage connector and other api ? System.InvalidOperationException: Sequence contains no matching element |
@feynmanloo I need to run your code for further investigation. In the meantime, the error indicates that group admin fails to generate the next speaker that is one of the current group members. The fail reason can be various though, it might because of hallucination (fabric an agent that doesn't exist), fail to follow the prompt and generate next speaker in given format (The legitimate format needs to be |
@feynmanloo I took a look at your code. The issue is caused by missing stop words in admin's prompt setting. You might want to pass However, the task still fail because of group admin fails to generate the next speaker in the right format even after I add stop sequence. I note that you are using llama3:7b as the backend model for all agents, including group admin. Yet the prompt for speaker selection used by group admin is based on gpt-3.5/4. So that might be why the admin fails to follow the prompt here because different LLM behaves differently even using the same prompt. And next speaker selection prompt for GPT-series might not work well with llama-series. So here is the suggestion that you may try
|
Describe the issue
[Issue]: Write samle base on SemanticKernel with content copy from Example04_Dynamic_GroupChat_Coding_Task, can't work. I don't know what's wrong happend.
This is my code : https://github.com/feynmanloo/AutoGen.BasicSamples/blob/master/Example04_Dynamic_GroupChat_Coding_Task.cs
Steps to reproduce
No response
Screenshots and logs
"C:\Users\Feynman Loo\AppData\Local\Programs\Rider\plugins\dpa\DotFiles\JetBrains.DPA.Runner.exe" --handle=23160 --backend-pid=25060 --etw-collect-flags=67108622 --detach-event-name=dpa.detach.23160 "C:/Users/Feynman Loo/Documents/Workspaces/AutoGen.BasicSamples/bin/Debug/net8.0/AutoGen.BasicSamples.exe"
Hello, World!
from: admin
Unhandled exception. System.ArgumentException: Invalid message type
$(String[] args) in C:\Users\Feynman Loo\Documents\Workspaces\AutoGen.BasicSamples\Program.cs:line 20at AutoGen.SemanticKernel.SemanticKernelAgent.<>c.b__11_0(IMessage m)
at System.Linq.Enumerable.SelectEnumerableIterator
2.MoveNext() at System.Linq.Enumerable.Any[TSource](IEnumerable
1 source, Func2 predicate) at AutoGen.SemanticKernel.SemanticKernelAgent.BuildChatHistory(IEnumerable
1 messages)at AutoGen.SemanticKernel.SemanticKernelAgent.GenerateReplyAsync(IEnumerable
1 messages, GenerateReplyOptions options, CancellationToken cancellationToken) at AutoGen.Core.GroupChat.SelectNextSpeakerAsync(IAgent currentSpeaker, IEnumerable
1 conversationHistory)at AutoGen.Core.GroupChat.CallAsync(IEnumerable
1 conversationWithName, Int32 maxRound, CancellationToken ct) at AutoGen.Core.AgentExtension.SendMessageToGroupAsync(IAgent _, IGroupChat groupChat, IEnumerable
1 chatHistory, Int32 maxRound, CancellationToken ct)at AutoGen.Core.AgentExtension.SendAsync(IAgent agent, IAgent receiver, IEnumerable`1 chatHistory, Int32 maxRound, CancellationToken ct)
at AutoGen.Core.AgentExtension.InitiateChatAsync(IAgent agent, IAgent receiver, String message, Int32 maxRound, CancellationToken ct)
at AutoGen.BasicSamples.Example04_Dynamic_GroupChat_Coding_Task.RunAsync(IKernelBuilder kernelBuilder, OpenAIPromptExecutionSettings settings) in C:\Users\Feynman Loo\Documents\Workspaces\AutoGen.BasicSamples\Example04_Dynamic_GroupChat_Coding_Task.cs:line 235
at Program.
at Program.(String[] args)
Process finished with exit code -532,462,766.
Additional Information
No response
The text was updated successfully, but these errors were encountered: