microsoft / autogen

A programming framework for agentic AI. Discord: https://aka.ms/autogen-dc. Roadmap: https://aka.ms/autogen-roadmap
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
28.04k stars 4.09k forks source link

[Bug]: Example04_Dynamic_GroupChat_Coding_Task throwing exception #2970

Closed teeshajain17 closed 1 week ago

teeshajain17 commented 2 weeks ago

Describe the bug

I was running this example in my system and it is throwing error. https://github.com/microsoft/autogen/blob/ca4f7176169d5f40b5e7570aab7dce4a37bd088f/dotnet/sample/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.cs

Steps to reproduce

No response

Model Used

gpt-3.5

Expected Behavior

It shouldn't throw exception

Screenshots and logs

image

Details:

System.InvalidOperationException HResult=0x80131509 Message=Sequence contains no matching element Source=System.Linq StackTrace: at System.Linq.ThrowHelper.ThrowNoMatchException() at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate) at AutoGen.Core.GroupChat.d10.MoveNext() at AutoGen.Core.GroupChat.d12.MoveNext() at AutoGen.Core.AgentExtension.d6.MoveNext() at AutoGen.Core.AgentExtension.d2.MoveNext() at AutoGen.Core.AgentExtension.d3.MoveNext() at Example04_Dynamic_GroupChat_Coding_Task.d0.MoveNext() in C:\Users\91701\source\repos\TestAutoGen\TestAutoGen\Example04_Dynamic_GroupChat_Coding_Task.cs:line 250 at Program.

d__0.MoveNext() in C:\Users\91701\source\repos\TestAutoGen\TestAutoGen\Program.cs:line 7

Additional Information

No response

LittleLittleCloud commented 1 week ago

@teeshajain17 Your api-key is exposed in your previous screenshot, I just update the image to remove the api-key part. In the meantime, please deprecate your current api-key ASAP

teeshajain17 commented 1 week ago

Sure. Thanks

LittleLittleCloud commented 1 week ago

@teeshajain17 Maybe try a better llm (gpt-4) and see if the error persist? Example-04 is one of the "challenging" tasks that may require a more powerful LLM to complete.

teeshajain17 commented 1 week ago

Okay. let me try that.

teeshajain17 commented 1 week ago

It worked. Thanks! Could you suggest a simple example that demonstrates the functionality of the group chat feature and can be accomplished by GPT-3.5?

LittleLittleCloud commented 1 week ago

@teeshajain17 Am working on it, you can track progress in #2859. Also feel free to add sample request under that issue

teeshajain17 commented 1 week ago

@LittleLittleCloud Can I help in any way? I would love to contribute.

LittleLittleCloud commented 1 week ago

@teeshajain17 Of course, I can add you as reviewer once the PR is ready. In the meantime the remaining imcomplete samples are the below two, let me know which one you want to take. image

Also feel free to edit the task list by adding the sample you want to create and assign that sample to yourself.

teeshajain17 commented 1 week ago

I'm unsure about what to do exactly and how to create these sample examples because I've just started learning Autogen. However, please include me as a reviewer in the pull request.