Skip to content

Commit

Permalink
Merge branch 'agentchat_docs_update_vd' of github.com:microsoft/autog…
Browse files Browse the repository at this point in the history
…en into agentchat_docs_update_vd
  • Loading branch information
victordibia committed Oct 20, 2024
2 parents 59299e5 + ba22b63 commit 9cde476
Show file tree
Hide file tree
Showing 5 changed files with 1,138 additions and 249 deletions.
43 changes: 22 additions & 21 deletions dotnet/samples/AutoGen.BasicSamples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,29 @@
using AutoGen.BasicSample;

//Define allSamples collection for all examples
List<Tuple<string, Func<Task>>> allSamples = new List<Tuple<string, Func<Task>>>();

// When a new sample is created please add them to the allSamples collection
allSamples.Add(new Tuple<string, Func<Task>>("Assistant Agent", async () => { await Example01_AssistantAgent.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("Two-agent Math Chat", async () => { await Example02_TwoAgent_MathChat.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("Agent Function Call", async () => { await Example03_Agent_FunctionCall.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("Dynamic Group Chat Coding Task", async () => { await Example04_Dynamic_GroupChat_Coding_Task.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("DALL-E and GPT4v", async () => { await Example05_Dalle_And_GPT4V.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("User Proxy Agent", async () => { await Example06_UserProxyAgent.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("Dynamic Group Chat - Calculate Fibonacci", async () => { await Example07_Dynamic_GroupChat_Calculate_Fibonacci.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("LM Studio", async () => { await Example08_LMStudio.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("Semantic Kernel", async () => { await Example10_SemanticKernel.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("Sequential Group Chat", async () => { await Sequential_GroupChat_Example.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("Two Agent - Fill Application", async () => { await TwoAgent_Fill_Application.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("Mistal Client Agent - Token Count", async () => { await Example14_MistralClientAgent_TokenCount.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("GPT4v - Binary Data Image", async () => { await Example15_GPT4V_BinaryDataImageMessage.RunAsync(); }));
allSamples.Add(new Tuple<string, Func<Task>>("ReAct Agent", async () => { await Example17_ReActAgent.RunAsync(); }));
var allSamples = new List<(string, Func<Task>)>
{
// When a new sample is created please add them to the allSamples collection
("Assistant Agent", Example01_AssistantAgent.RunAsync),
("Two-agent Math Chat", Example02_TwoAgent_MathChat.RunAsync),
("Agent Function Call", Example03_Agent_FunctionCall.RunAsync),
("Dynamic Group Chat Coding Task", Example04_Dynamic_GroupChat_Coding_Task.RunAsync),
("DALL-E and GPT4v", Example05_Dalle_And_GPT4V.RunAsync),
("User Proxy Agent", Example06_UserProxyAgent.RunAsync),
("Dynamic Group Chat - Calculate Fibonacci", Example07_Dynamic_GroupChat_Calculate_Fibonacci.RunAsync),
("LM Studio", Example08_LMStudio.RunAsync),
("Semantic Kernel", Example10_SemanticKernel.RunAsync),
("Sequential Group Chat", Sequential_GroupChat_Example.RunAsync),
("Two Agent - Fill Application", TwoAgent_Fill_Application.RunAsync),
("Mistral Client Agent - Token Count", Example14_MistralClientAgent_TokenCount.RunAsync),
("GPT4v - Binary Data Image", Example15_GPT4V_BinaryDataImageMessage.RunAsync),
("ReAct Agent", Example17_ReActAgent.RunAsync)
};

int idx = 1;
Dictionary<int, Tuple<string, Func<Task>>> map = new Dictionary<int, Tuple<string, Func<Task>>>();
Console.WriteLine("Available Examples:\n\n");
foreach (Tuple<string, Func<Task>> sample in allSamples)
var idx = 1;
var map = new Dictionary<int, (string, Func<Task>)>();
foreach (var sample in allSamples)
{
map.Add(idx, sample);
Console.WriteLine("{0}. {1}", idx++, sample.Item1);
Expand All @@ -41,7 +42,7 @@
{
break;
}
int val = Convert.ToInt32(input);
var val = Convert.ToInt32(input);
if (!map.ContainsKey(val))
{
Console.WriteLine("Invalid choice");
Expand Down
78 changes: 78 additions & 0 deletions python/packages/autogen-core/docs/drawio/groupchat.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" version="24.7.17">
<diagram name="Page-1" id="IxvBbn9yzyvW_p07RlV3">
<mxGraphModel dx="748" dy="618" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="1k9D6tqECFl55jLrpz0O-17" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="1k9D6tqECFl55jLrpz0O-1" target="1k9D6tqECFl55jLrpz0O-2">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-18" value="2. RequestToSpeak" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="1k9D6tqECFl55jLrpz0O-17">
<mxGeometry x="-0.0134" y="-3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-27" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="1k9D6tqECFl55jLrpz0O-1" target="1k9D6tqECFl55jLrpz0O-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-28" value="4. RequestToSpeak" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="1k9D6tqECFl55jLrpz0O-27">
<mxGeometry x="-0.1817" y="4" relative="1" as="geometry">
<mxPoint x="6" y="9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-1" value="Group Chat Manager Agent" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="240" y="200" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="1k9D6tqECFl55jLrpz0O-2" target="1k9D6tqECFl55jLrpz0O-4">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="620" y="190" />
<mxPoint x="620" y="270" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="1k9D6tqECFl55jLrpz0O-2" target="1k9D6tqECFl55jLrpz0O-5">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="620" y="190" />
<mxPoint x="620" y="350" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="1k9D6tqECFl55jLrpz0O-2" target="1k9D6tqECFl55jLrpz0O-3">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="620" y="190" />
<mxPoint x="620" y="110" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-25" value="3. GroupChatMessage" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="1k9D6tqECFl55jLrpz0O-21">
<mxGeometry x="-0.6833" relative="1" as="geometry">
<mxPoint x="41" y="20" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.25;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="1k9D6tqECFl55jLrpz0O-2" target="1k9D6tqECFl55jLrpz0O-1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-26" value="3. GroupChatMessage" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="1k9D6tqECFl55jLrpz0O-22">
<mxGeometry x="0.0244" y="-4" relative="1" as="geometry">
<mxPoint x="5" y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-2" value="Writer Agent" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="470" y="160" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-3" value="Editor Agent" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="470" y="80" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-5" value="User Agent" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="470" y="320" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="1k9D6tqECFl55jLrpz0O-4" value="Illustrator Agent" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="470" y="240" width="100" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading

0 comments on commit 9cde476

Please sign in to comment.