A programming framework for agentic AI
Dotnet package cleanup and reconciliation of dirs
Xiaoyun Zhang5c7498cc080e
diff --git a/.github/workflows/dotnet-build-test-packages.yml b/.github/workflows/dotnet-build-test-packages.ymlindex faaa0e3ed..c9d9d55d1 100644--- a/.github/workflows/dotnet-build-test-packages.yml+++ b/.github/workflows/dotnet-build-test-packages.yml@@ -17,6 +17,18 @@ jobs:working-directory: dotnetsteps:- uses: actions/checkout@v4+ - name: Set up Python 3.11+ uses: actions/setup-python@v5+ with:+ python-version: 3.11+ - name: Install jupyter and ipykernel+ run: |+ python -m pip install --upgrade pip+ python -m pip install jupyter+ python -m pip install ipykernel+ - name: list available kernels+ run: |+ python -m jupyter kernelspec list- name: Setup .NETuses: actions/setup-dotnet@v4with:@@ -28,4 +40,4 @@ jobs:- name: Buildrun: dotnet build AutoGen.sln- name: Test- run: dotnet test --no-build --verbosity normal AutoGen.sln\ No newline at end of file+ run: dotnet test --no-build --verbosity normal AutoGen.slndiff --git a/dotnet/AutoGen.sln b/dotnet/AutoGen.slnindex 34990da89..ef0df4945 100644--- a/dotnet/AutoGen.sln+++ b/dotnet/AutoGen.sln@@ -1,4 +1,4 @@-Microsoft Visual Studio Solution File, Format Version 12.00+Microsoft Visual Studio Solution File, Format Version 12.00# Visual Studio Version 17VisualStudioVersion = 17.8.34322.80MinimumVisualStudioVersion = 10.0.40219.1@@ -14,9 +14,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.SourceGenerator", "EndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.SourceGenerator.Tests", "test\AutoGen.SourceGenerator.Tests\AutoGen.SourceGenerator.Tests.csproj", "{05A2FAD8-03B0-4B2F-82AF-2F6BF0F050E5}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.BasicSample", "sample\AutoGen.BasicSamples\AutoGen.BasicSample.csproj", "{7EBF916A-A7B1-4B74-AF10-D705B7A18F58}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.BasicSample", "samples\AutoGen.BasicSamples\AutoGen.BasicSample.csproj", "{7EBF916A-A7B1-4B74-AF10-D705B7A18F58}"EndProject-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{FBFEAD1F-29EB-4D99-A672-0CD8473E10B9}"+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{FBFEAD1F-29EB-4D99-A672-0CD8473E10B9}"EndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.DotnetInteractive", "src\AutoGen.DotnetInteractive\AutoGen.DotnetInteractive.csproj", "{B61D8008-7FB7-4C0E-8044-3A74AA63A596}"EndProject@@ -46,27 +46,27 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Ollama", "src\AutoGEndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Ollama.Tests", "test\AutoGen.Ollama.Tests\AutoGen.Ollama.Tests.csproj", "{03E31CAA-3728-48D3-B936-9F11CF6C18FE}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Ollama.Sample", "sample\AutoGen.Ollama.Sample\AutoGen.Ollama.Sample.csproj", "{93AA4D0D-6EE4-44D5-AD77-7F73A3934544}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Ollama.Sample", "samples\AutoGen.Ollama.Sample\AutoGen.Ollama.Sample.csproj", "{93AA4D0D-6EE4-44D5-AD77-7F73A3934544}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.SemanticKernel.Sample", "sample\AutoGen.SemanticKernel.Sample\AutoGen.SemanticKernel.Sample.csproj", "{52958A60-3FF7-4243-9058-34A6E4F55C31}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.SemanticKernel.Sample", "samples\AutoGen.SemanticKernel.Sample\AutoGen.SemanticKernel.Sample.csproj", "{52958A60-3FF7-4243-9058-34A6E4F55C31}"EndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Anthropic", "src\AutoGen.Anthropic\AutoGen.Anthropic.csproj", "{6A95E113-B824-4524-8F13-CD0C3E1C8804}"EndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Anthropic.Tests", "test\AutoGen.Anthropic.Tests\AutoGen.Anthropic.Tests.csproj", "{815E937E-86D6-4476-9EC6-B7FBCBBB5DB6}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Anthropic.Samples", "sample\AutoGen.Anthropic.Samples\AutoGen.Anthropic.Samples.csproj", "{834B4E85-64E5-4382-8465-548F332E5298}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Anthropic.Samples", "samples\AutoGen.Anthropic.Samples\AutoGen.Anthropic.Samples.csproj", "{834B4E85-64E5-4382-8465-548F332E5298}"EndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Gemini", "src\AutoGen.Gemini\AutoGen.Gemini.csproj", "{EFE0DC86-80FC-4D52-95B7-07654BA1A769}"EndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Gemini.Tests", "test\AutoGen.Gemini.Tests\AutoGen.Gemini.Tests.csproj", "{8EA16BAB-465A-4C07-ABC4-1070D40067E9}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Gemini.Sample", "sample\AutoGen.Gemini.Sample\AutoGen.Gemini.Sample.csproj", "{19679B75-CE3A-4DF0-A3F0-CA369D2760A4}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Gemini.Sample", "samples\AutoGen.Gemini.Sample\AutoGen.Gemini.Sample.csproj", "{19679B75-CE3A-4DF0-A3F0-CA369D2760A4}"EndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.AotCompatibility.Tests", "test\AutoGen.AotCompatibility.Tests\AutoGen.AotCompatibility.Tests.csproj", "{6B82F26D-5040-4453-B21B-C8D1F913CE4C}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.OpenAI.Sample", "sample\AutoGen.OpenAI.Sample\AutoGen.OpenAI.Sample.csproj", "{0E635268-351C-4A6B-A28D-593D868C2CA4}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.OpenAI.Sample", "samples\AutoGen.OpenAI.Sample\AutoGen.OpenAI.Sample.csproj", "{0E635268-351C-4A6B-A28D-593D868C2CA4}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.WebAPI.Sample", "sample\AutoGen.WebAPI.Sample\AutoGen.WebAPI.Sample.csproj", "{12079C18-A519-403F-BBFD-200A36A0C083}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.WebAPI.Sample", "samples\AutoGen.WebAPI.Sample\AutoGen.WebAPI.Sample.csproj", "{12079C18-A519-403F-BBFD-200A36A0C083}"EndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.AzureAIInference", "src\AutoGen.AzureAIInference\AutoGen.AzureAIInference.csproj", "{5C45981D-1319-4C25-935C-83D411CB28DF}"EndProject@@ -94,18 +94,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AgentChat", "AgentChat", "{EndProjectProject("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dev-team", "dev-team", "{616F30DF-1F41-4047-BAA4-64BA03BF5AEA}"ProjectSection(SolutionItems) = preProject- sample\dev-team\DevTeam.ServiceDefaults\DevTeam.ServiceDefaults.csproj = sample\dev-team\DevTeam.ServiceDefaults\DevTeam.ServiceDefaults.csproj+ samples\dev-team\DevTeam.ServiceDefaults\DevTeam.ServiceDefaults.csproj = samples\dev-team\DevTeam.ServiceDefaults\DevTeam.ServiceDefaults.csprojEndProjectSectionEndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.AgentHost", "sample\dev-team\DevTeam.AgentHost\DevTeam.AgentHost.csproj", "{7228A701-C79D-4E15-BF45-48D11F721A84}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.AgentHost", "samples\dev-team\DevTeam.AgentHost\DevTeam.AgentHost.csproj", "{7228A701-C79D-4E15-BF45-48D11F721A84}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Agents", "sample\dev-team\DevTeam.Agents\DevTeam.Agents.csproj", "{EDECD35D-6EB1-4CA8-A175-A66588C3481E}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Agents", "samples\dev-team\DevTeam.Agents\DevTeam.Agents.csproj", "{EDECD35D-6EB1-4CA8-A175-A66588C3481E}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.AppHost", "sample\dev-team\DevTeam.AppHost\DevTeam.AppHost.csproj", "{F2F13EAF-05C6-4E90-B2E4-3FA0290D7F6E}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.AppHost", "samples\dev-team\DevTeam.AppHost\DevTeam.AppHost.csproj", "{F2F13EAF-05C6-4E90-B2E4-3FA0290D7F6E}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Backend", "sample\dev-team\DevTeam.Backend\DevTeam.Backend.csproj", "{D826D5E4-31F4-4AB5-AC86-F7B4AD79314B}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Backend", "samples\dev-team\DevTeam.Backend\DevTeam.Backend.csproj", "{D826D5E4-31F4-4AB5-AC86-F7B4AD79314B}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Shared", "sample\dev-team\DevTeam.Shared\DevTeam.Shared.csproj", "{D9F65DFD-368B-47DB-8BB5-0C74DED7F439}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Shared", "samples\dev-team\DevTeam.Shared\DevTeam.Shared.csproj", "{D9F65DFD-368B-47DB-8BB5-0C74DED7F439}"EndProjectProject("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HelloAgents", "HelloAgents", "{F7AC0FF1-8500-49C6-8CB3-97C6D52C8BEF}"EndProject@@ -115,15 +115,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solutionspelling.dic = spelling.dicEndProjectSectionEndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.Agents", "sample\HelloAgents\HelloAgents.Agents\HelloAgents.Agents.csproj", "{ECCE44EE-3934-448E-A9A5-3403117EF0B5}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.Agents", "samples\HelloAgents\HelloAgents.Agents\HelloAgents.Agents.csproj", "{ECCE44EE-3934-448E-A9A5-3403117EF0B5}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.ApiService", "sample\HelloAgents\HelloAgents.ApiService\HelloAgents.ApiService.csproj", "{74ADFF5D-80AF-4A6E-9794-746BDE1A41D1}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.ApiService", "samples\HelloAgents\HelloAgents.ApiService\HelloAgents.ApiService.csproj", "{74ADFF5D-80AF-4A6E-9794-746BDE1A41D1}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.AppHost", "sample\HelloAgents\HelloAgents.AppHost\HelloAgents.AppHost.csproj", "{031FED7F-97ED-4AA1-B408-88BD3B70A463}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.AppHost", "samples\HelloAgents\HelloAgents.AppHost\HelloAgents.AppHost.csproj", "{031FED7F-97ED-4AA1-B408-88BD3B70A463}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.ServiceDefaults", "sample\HelloAgents\HelloAgents.ServiceDefaults\HelloAgents.ServiceDefaults.csproj", "{6B88F4B3-26AB-4034-B0AC-5BA6EEDEB8E5}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.ServiceDefaults", "samples\HelloAgents\HelloAgents.ServiceDefaults\HelloAgents.ServiceDefaults.csproj", "{6B88F4B3-26AB-4034-B0AC-5BA6EEDEB8E5}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.Web", "sample\HelloAgents\HelloAgents.Web\HelloAgents.Web.csproj", "{8B56BE22-5CF4-44BB-AFA5-732FEA2AFF0B}"+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.Web", "samples\HelloAgents\HelloAgents.Web\HelloAgents.Web.csproj", "{8B56BE22-5CF4-44BB-AFA5-732FEA2AFF0B}"+EndProject+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hello", "samples\Hello\Hello.csproj", "{6C9135E6-9D15-4D86-B3F4-9666DB87060A}"EndProjectGlobalGlobalSection(SolutionConfigurationPlatforms) = preSolution@@ -331,6 +333,10 @@ Global{8B56BE22-5CF4-44BB-AFA5-732FEA2AFF0B}.Debug|Any CPU.Build.0 = Debug|Any CPU{8B56BE22-5CF4-44BB-AFA5-732FEA2AFF0B}.Release|Any CPU.ActiveCfg = Release|Any CPU{8B56BE22-5CF4-44BB-AFA5-732FEA2AFF0B}.Release|Any CPU.Build.0 = Release|Any CPU+ {6C9135E6-9D15-4D86-B3F4-9666DB87060A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU+ {6C9135E6-9D15-4D86-B3F4-9666DB87060A}.Debug|Any CPU.Build.0 = Debug|Any CPU+ {6C9135E6-9D15-4D86-B3F4-9666DB87060A}.Release|Any CPU.ActiveCfg = Release|Any CPU+ {6C9135E6-9D15-4D86-B3F4-9666DB87060A}.Release|Any CPU.Build.0 = Release|Any CPUEndGlobalSectionGlobalSection(SolutionProperties) = preSolutionHideSolutionNode = FALSE@@ -390,6 +396,7 @@ Global{031FED7F-97ED-4AA1-B408-88BD3B70A463} = {F7AC0FF1-8500-49C6-8CB3-97C6D52C8BEF}{6B88F4B3-26AB-4034-B0AC-5BA6EEDEB8E5} = {F7AC0FF1-8500-49C6-8CB3-97C6D52C8BEF}{8B56BE22-5CF4-44BB-AFA5-732FEA2AFF0B} = {F7AC0FF1-8500-49C6-8CB3-97C6D52C8BEF}+ {6C9135E6-9D15-4D86-B3F4-9666DB87060A} = {FBFEAD1F-29EB-4D99-A672-0CD8473E10B9}EndGlobalSectionGlobalSection(ExtensibilityGlobals) = postSolutionSolutionGuid = {93384647-528D-46C8-922C-8DB36A382F0B}diff --git a/dotnet/Directory.Build.props b/dotnet/Directory.Build.propsindex 0b8451625..67ae6d7d3 100644--- a/dotnet/Directory.Build.props+++ b/dotnet/Directory.Build.props@@ -11,7 +11,7 @@<SignAssembly>True</SignAssembly><AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)eng/opensource.snk</AssemblyOriginatorKeyFile><PublicKey>0024000004800000940000000602000000240000525341310004000001000100f1d038d0b85ae392ad72011df91e9343b0b5df1bb8080aa21b9424362d696919e0e9ac3a8bca24e283e10f7a569c6f443e1d4e3ebc84377c87ca5caa562e80f9932bf5ea91b7862b538e13b8ba91c7565cf0e8dfeccfea9c805ae3bda044170ecc7fc6f147aeeac422dd96aeb9eb1f5a5882aa650efe2958f2f8107d2038f2ab</PublicKey>- <CSNoWarn>CS1998;CS1591</CSNoWarn>+ <CSNoWarn>CS1998;CS1591;CS8002;</CSNoWarn><SKEXPNoWarn>SKEXP0001;SKEXP0010;SKEXP0020</SKEXPNoWarn><NoWarn>$(NoWarn);$(CSNoWarn);$(SKEXPNoWarn);NU5104</NoWarn><TreatWarningsAsErrors>true</TreatWarningsAsErrors>diff --git a/dotnet/README.md b/dotnet/README.mdindex 5b0803b6e..ad5bea3c1 100644--- a/dotnet/README.md+++ b/dotnet/README.md@@ -1,14 +1,20 @@-### AutoGen for .NET+# AutoGen for .NET++Thre are two sets of packages here+Autogen.\* the older packages derived from Autogen 0.2 for .NET - these will gradually be deprecated and ported into the new packages+Microsoft.AutoGen.* the new packages for .NET that use the event-driven model - These APIs are not yet stable and are subject to change++The remaining content is for the older Autogen.* packages.[](https://github.com/microsoft/autogen/actions/workflows/dotnet-build.yml)[](https://badge.fury.io/nu/AutoGen.Core)> [!NOTE]> Nightly build is available at:-> -   : https://nuget.pkg.github.com/microsoft/index.json-> -   : https://www.myget.org/F/agentchat/api/v3/index.json-> -    : https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/AutoGen/nuget/v3/index.json-+>+> -   : <https://nuget.pkg.github.com/microsoft/index.json>+> -   : <https://www.myget.org/F/agentchat/api/v3/index.json>+> -    : <https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/AutoGen/nuget/v3/index.json>Firstly, following the [installation guide](./website/articles/Installation.md) to install AutoGen packages.@@ -44,60 +50,21 @@ await userProxyAgent.InitiateChatAsync(maxRound: 10);```-#### Samples-You can find more examples under the [sample project](https://github.com/microsoft/autogen/tree/dotnet/dotnet/sample/AutoGen.BasicSamples).+## Samples++You can find more examples under the [sample project](https://github.com/microsoft/autogen/tree/dotnet/samples/AutoGen.BasicSamples).++## Functionality-#### Functionality- ConversableAgent- - [x] function call- - [x] code execution (dotnet only, powered by [`dotnet-interactive`](https://github.com/dotnet/interactive))+ - [x] function call+ - [x] code execution (dotnet only, powered by [`dotnet-interactive`](https://github.com/dotnet/interactive))- Agent communication- - [x] Two-agent chat- - [x] Group chat+ - [x] Two-agent chat+ - [x] Group chat- [ ] Enhanced LLM Inferences- Exclusive for dotnet- - [x] Source generator for type-safe function definition generation--#### Update log-##### Update on 0.0.11 (2024-03-26)-- Add link to Discord channel in nuget's readme.md-- Document improvements-##### Update on 0.0.10 (2024-03-12)-- Rename `Workflow` to `Graph`-- Rename `AddInitializeMessage` to `SendIntroduction`-- Rename `SequentialGroupChat` to `RoundRobinGroupChat`-##### Update on 0.0.9 (2024-03-02)-- Refactor over @AutoGen.Message and introducing `TextMessage`, `ImageMessage`, `MultiModalMessage` and so on. PR [#1676](https://github.com/microsoft/autogen/pull/1676)-- Add `AutoGen.SemanticKernel` to support seamless integration with Semantic Kernel-- Move the agent contract abstraction to `AutoGen.Core` package. The `AutoGen.Core` package provides the abstraction for message type, agent and group chat and doesn't contain dependencies over `Azure.AI.OpenAI` or `Semantic Kernel`. This is useful when you want to leverage AutoGen's abstraction only and want to avoid introducing any other dependencies.-- Move `GPTAgent`, `OpenAIChatAgent` and all openai-dependencies to `AutoGen.OpenAI`-##### Update on 0.0.8 (2024-02-28)-- Fix [#1804](https://github.com/microsoft/autogen/pull/1804)-- Streaming support for IAgent [#1656](https://github.com/microsoft/autogen/pull/1656)-- Streaming support for middleware via `MiddlewareStreamingAgent` [#1656](https://github.com/microsoft/autogen/pull/1656)-- Graph chat support with conditional transition workflow [#1761](https://github.com/microsoft/autogen/pull/1761)-- AutoGen.SourceGenerator: Generate `FunctionContract` from `FunctionAttribute` [#1736](https://github.com/microsoft/autogen/pull/1736)-##### Update on 0.0.7 (2024-02-11)-- Add `AutoGen.LMStudio` to support comsume openai-like API from LMStudio local server-##### Update on 0.0.6 (2024-01-23)-- Add `MiddlewareAgent`-- Use `MiddlewareAgent` to implement existing agent hooks (RegisterPreProcess, RegisterPostProcess, RegisterReply)-- Remove `AutoReplyAgent`, `PreProcessAgent`, `PostProcessAgent` because they are replaced by `MiddlewareAgent`-##### Update on 0.0.5-- Simplify `IAgent` interface by removing `ChatLLM` Property-- Add `GenerateReplyOptions` to `IAgent.GenerateReplyAsync` which allows user to specify or override the options when generating reply--##### Update on 0.0.4-- Move out dependency of Semantic Kernel-- Add type `IChatLLM` as connector to LLM--##### Update on 0.0.3-- In AutoGen.SourceGenerator, rename FunctionAttribution to FunctionAttribute-- In AutoGen, refactor over ConversationAgent, UserProxyAgent, and AssistantAgent--##### Update on 0.0.2-- update Azure.OpenAI.AI to 1.0.0-beta.12-- update Semantic kernel to 1.0.1+ - [x] Source generator for type-safe function definition generationdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/favicon.png b/dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/favicon.pngdeleted file mode 100644index a1dc44acb..000000000--- a/dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/favicon.png+++ /dev/null@@ -1,3 +0,0 @@-version https://git-lfs.github.com/spec/v1-oid sha256:e265ac0f2dda1e5dfa65b1adf330722bb3ef7789115283604d8cd19f098f1f08-size 1148diff --git a/dotnet/sample/HelloAgents/HelloAgents.sln b/dotnet/sample/HelloAgents/HelloAgents.slndeleted file mode 100644index 9bf6d4d45..000000000--- a/dotnet/sample/HelloAgents/HelloAgents.sln+++ /dev/null@@ -1,48 +0,0 @@-Microsoft Visual Studio Solution File, Format Version 12.00-# Visual Studio Version 17-VisualStudioVersion = 17.8.0.0-MinimumVisualStudioVersion = 17.8.0.0-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.AppHost", "HelloAgents.AppHost\HelloAgents.AppHost.csproj", "{657F8F19-A8AC-4975-B482-0C84EC768F3A}"-EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.ServiceDefaults", "HelloAgents.ServiceDefaults\HelloAgents.ServiceDefaults.csproj", "{FD396CED-A3EF-45C0-8466-FA34648BF876}"-EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.ApiService", "HelloAgents.ApiService\HelloAgents.ApiService.csproj", "{D725EA30-B236-4F6E-B1FD-20BBB957EA06}"-EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgents.Web", "HelloAgents.Web\HelloAgents.Web.csproj", "{15F80A30-7FF8-4D0B-A0FA-CB67FBD827A9}"-EndProject-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloAgents", "HelloAgents.Agents\HelloAgents.csproj", "{2425E34B-7B18-4E04-ABBC-510638806FD7}"-EndProject-Global- GlobalSection(SolutionConfigurationPlatforms) = preSolution- Debug|Any CPU = Debug|Any CPU- Release|Any CPU = Release|Any CPU- EndGlobalSection- GlobalSection(ProjectConfigurationPlatforms) = postSolution- {657F8F19-A8AC-4975-B482-0C84EC768F3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU- {657F8F19-A8AC-4975-B482-0C84EC768F3A}.Debug|Any CPU.Build.0 = Debug|Any CPU- {657F8F19-A8AC-4975-B482-0C84EC768F3A}.Release|Any CPU.ActiveCfg = Release|Any CPU- {657F8F19-A8AC-4975-B482-0C84EC768F3A}.Release|Any CPU.Build.0 = Release|Any CPU- {FD396CED-A3EF-45C0-8466-FA34648BF876}.Debug|Any CPU.ActiveCfg = Debug|Any CPU- {FD396CED-A3EF-45C0-8466-FA34648BF876}.Debug|Any CPU.Build.0 = Debug|Any CPU- {FD396CED-A3EF-45C0-8466-FA34648BF876}.Release|Any CPU.ActiveCfg = Release|Any CPU- {FD396CED-A3EF-45C0-8466-FA34648BF876}.Release|Any CPU.Build.0 = Release|Any CPU- {D725EA30-B236-4F6E-B1FD-20BBB957EA06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU- {D725EA30-B236-4F6E-B1FD-20BBB957EA06}.Debug|Any CPU.Build.0 = Debug|Any CPU- {D725EA30-B236-4F6E-B1FD-20BBB957EA06}.Release|Any CPU.ActiveCfg = Release|Any CPU- {D725EA30-B236-4F6E-B1FD-20BBB957EA06}.Release|Any CPU.Build.0 = Release|Any CPU- {15F80A30-7FF8-4D0B-A0FA-CB67FBD827A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU- {15F80A30-7FF8-4D0B-A0FA-CB67FBD827A9}.Debug|Any CPU.Build.0 = Debug|Any CPU- {15F80A30-7FF8-4D0B-A0FA-CB67FBD827A9}.Release|Any CPU.ActiveCfg = Release|Any CPU- {15F80A30-7FF8-4D0B-A0FA-CB67FBD827A9}.Release|Any CPU.Build.0 = Release|Any CPU- {2425E34B-7B18-4E04-ABBC-510638806FD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU- {2425E34B-7B18-4E04-ABBC-510638806FD7}.Debug|Any CPU.Build.0 = Debug|Any CPU- {2425E34B-7B18-4E04-ABBC-510638806FD7}.Release|Any CPU.ActiveCfg = Release|Any CPU- {2425E34B-7B18-4E04-ABBC-510638806FD7}.Release|Any CPU.Build.0 = Release|Any CPU- EndGlobalSection- GlobalSection(SolutionProperties) = preSolution- HideSolutionNode = FALSE- EndGlobalSection- GlobalSection(ExtensibilityGlobals) = postSolution- SolutionGuid = {678186CE-9E7C-44FE-B1A4-33271ACDFCC5}- EndGlobalSection-EndGlobaldiff --git a/dotnet/sample/dev-team/docs/images/github-sk-dev-team.png b/dotnet/sample/dev-team/docs/images/github-sk-dev-team.pngdeleted file mode 100644index fce661eef..000000000--- a/dotnet/sample/dev-team/docs/images/github-sk-dev-team.png+++ /dev/null@@ -1,3 +0,0 @@-version https://git-lfs.github.com/spec/v1-oid sha256:a5c18db95ff3d7357cd9112e3e8698185d819c796a053b070782d019ff1437c9-size 309649diff --git a/dotnet/sample/dev-team/docs/images/new-codespace.png b/dotnet/sample/dev-team/docs/images/new-codespace.pngdeleted file mode 100644index 970545c0d..000000000--- a/dotnet/sample/dev-team/docs/images/new-codespace.png+++ /dev/null@@ -1,3 +0,0 @@-version https://git-lfs.github.com/spec/v1-oid sha256:d01b942495de39ee2ab443283cfa22b51de8482710709b984dd21d5907b59a1b-size 27275diff --git a/dotnet/sample/dev-team/docs/images/overview.png b/dotnet/sample/dev-team/docs/images/overview.pngdeleted file mode 100644index 1f018dabf..000000000--- a/dotnet/sample/dev-team/docs/images/overview.png+++ /dev/null@@ -1,3 +0,0 @@-version https://git-lfs.github.com/spec/v1-oid sha256:8de049310295afdeca720b7b289967d8f960998e426c10ccd862b3bcfb81ef0b-size 348879diff --git a/dotnet/sample/dev-team/docs/images/solution-explorer.png b/dotnet/sample/dev-team/docs/images/solution-explorer.pngdeleted file mode 100644index bd69edbf4..000000000--- a/dotnet/sample/dev-team/docs/images/solution-explorer.png+++ /dev/null@@ -1,3 +0,0 @@-version https://git-lfs.github.com/spec/v1-oid sha256:62294a0181f1f0b5a2cb9dff20cc6911df9df80a1752a2d7bdf22b7615d2fc78-size 60694diff --git a/dotnet/sample/AutoGen.Anthropic.Samples/Anthropic_Agent_With_Prompt_Caching.cs b/dotnet/samples/AutoGen.Anthropic.Samples/Anthropic_Agent_With_Prompt_Caching.cssimilarity index 100%rename from dotnet/sample/AutoGen.Anthropic.Samples/Anthropic_Agent_With_Prompt_Caching.csrename to dotnet/samples/AutoGen.Anthropic.Samples/Anthropic_Agent_With_Prompt_Caching.csdiff --git a/dotnet/sample/AutoGen.Anthropic.Samples/AutoGen.Anthropic.Samples.csproj b/dotnet/samples/AutoGen.Anthropic.Samples/AutoGen.Anthropic.Samples.csprojsimilarity index 100%rename from dotnet/sample/AutoGen.Anthropic.Samples/AutoGen.Anthropic.Samples.csprojrename to dotnet/samples/AutoGen.Anthropic.Samples/AutoGen.Anthropic.Samples.csprojdiff --git a/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent.cs b/dotnet/samples/AutoGen.Anthropic.Samples/Create_Anthropic_Agent.cssimilarity index 100%rename from dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent.csrename to dotnet/samples/AutoGen.Anthropic.Samples/Create_Anthropic_Agent.csdiff --git a/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent_With_Tool.cs b/dotnet/samples/AutoGen.Anthropic.Samples/Create_Anthropic_Agent_With_Tool.cssimilarity index 100%rename from dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent_With_Tool.csrename to dotnet/samples/AutoGen.Anthropic.Samples/Create_Anthropic_Agent_With_Tool.csdiff --git a/dotnet/sample/AutoGen.Anthropic.Samples/Program.cs b/dotnet/samples/AutoGen.Anthropic.Samples/Program.cssimilarity index 100%rename from dotnet/sample/AutoGen.Anthropic.Samples/Program.csrename to dotnet/samples/AutoGen.Anthropic.Samples/Program.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/AutoGen.BasicSample.csproj b/dotnet/samples/AutoGen.BasicSamples/AutoGen.BasicSample.csprojsimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/AutoGen.BasicSample.csprojrename to dotnet/samples/AutoGen.BasicSamples/AutoGen.BasicSample.csprojdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/BuildInMessageCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/BuildInMessageCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/BuildInMessageCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/BuildInMessageCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/GetStartCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/GetStartCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/GetStartCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/GetStartCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/PrintMessageMiddlewareCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/PrintMessageMiddlewareCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/PrintMessageMiddlewareCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/PrintMessageMiddlewareCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/UserProxyAgentCodeSnippet.cs b/dotnet/samples/AutoGen.BasicSamples/CodeSnippet/UserProxyAgentCodeSnippet.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/CodeSnippet/UserProxyAgentCodeSnippet.csrename to dotnet/samples/AutoGen.BasicSamples/CodeSnippet/UserProxyAgentCodeSnippet.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example01_AssistantAgent.cs b/dotnet/samples/AutoGen.BasicSamples/Example01_AssistantAgent.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example01_AssistantAgent.csrename to dotnet/samples/AutoGen.BasicSamples/Example01_AssistantAgent.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example02_TwoAgent_MathChat.cs b/dotnet/samples/AutoGen.BasicSamples/Example02_TwoAgent_MathChat.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example02_TwoAgent_MathChat.csrename to dotnet/samples/AutoGen.BasicSamples/Example02_TwoAgent_MathChat.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example03_Agent_FunctionCall.cs b/dotnet/samples/AutoGen.BasicSamples/Example03_Agent_FunctionCall.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example03_Agent_FunctionCall.csrename to dotnet/samples/AutoGen.BasicSamples/Example03_Agent_FunctionCall.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.cs b/dotnet/samples/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.csrename to dotnet/samples/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example05_Dalle_And_GPT4V.cs b/dotnet/samples/AutoGen.BasicSamples/Example05_Dalle_And_GPT4V.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example05_Dalle_And_GPT4V.csrename to dotnet/samples/AutoGen.BasicSamples/Example05_Dalle_And_GPT4V.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example06_UserProxyAgent.cs b/dotnet/samples/AutoGen.BasicSamples/Example06_UserProxyAgent.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example06_UserProxyAgent.csrename to dotnet/samples/AutoGen.BasicSamples/Example06_UserProxyAgent.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs b/dotnet/samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.csrename to dotnet/samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example08_LMStudio.cs b/dotnet/samples/AutoGen.BasicSamples/Example08_LMStudio.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example08_LMStudio.csrename to dotnet/samples/AutoGen.BasicSamples/Example08_LMStudio.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example10_SemanticKernel.cs b/dotnet/samples/AutoGen.BasicSamples/Example10_SemanticKernel.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example10_SemanticKernel.csrename to dotnet/samples/AutoGen.BasicSamples/Example10_SemanticKernel.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs b/dotnet/samples/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.csrename to dotnet/samples/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example12_TwoAgent_Fill_Application.cs b/dotnet/samples/AutoGen.BasicSamples/Example12_TwoAgent_Fill_Application.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example12_TwoAgent_Fill_Application.csrename to dotnet/samples/AutoGen.BasicSamples/Example12_TwoAgent_Fill_Application.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.cs b/dotnet/samples/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.cssimilarity index 70%rename from dotnet/sample/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.csrename to dotnet/samples/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.csindex 596ab08d0..16dcf1be6 100644--- a/dotnet/sample/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.cs+++ b/dotnet/samples/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.// Example13_OpenAIAgent_JsonMode.cs-// this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs+// this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.OpenAI.Sample/Use_Json_Mode.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs b/dotnet/samples/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.csrename to dotnet/samples/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example15_GPT4V_BinaryDataImageMessage.cs b/dotnet/samples/AutoGen.BasicSamples/Example15_GPT4V_BinaryDataImageMessage.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example15_GPT4V_BinaryDataImageMessage.csrename to dotnet/samples/AutoGen.BasicSamples/Example15_GPT4V_BinaryDataImageMessage.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs b/dotnet/samples/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cssimilarity index 71%rename from dotnet/sample/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.csrename to dotnet/samples/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.csindex 969f7dc21..44d045d66 100644--- a/dotnet/sample/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs+++ b/dotnet/samples/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs@@ -1,4 +1,4 @@// Copyright (c) Microsoft Corporation. All rights reserved.// Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs-// this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs+// this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_Ollama.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Example17_ReActAgent.cs b/dotnet/samples/AutoGen.BasicSamples/Example17_ReActAgent.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Example17_ReActAgent.csrename to dotnet/samples/AutoGen.BasicSamples/Example17_ReActAgent.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GettingStart/Agent_Middleware.cs b/dotnet/samples/AutoGen.BasicSamples/GettingStart/Agent_Middleware.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/GettingStart/Agent_Middleware.csrename to dotnet/samples/AutoGen.BasicSamples/GettingStart/Agent_Middleware.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs b/dotnet/samples/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.csrename to dotnet/samples/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GettingStart/Dynamic_Group_Chat.cs b/dotnet/samples/AutoGen.BasicSamples/GettingStart/Dynamic_Group_Chat.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/GettingStart/Dynamic_Group_Chat.csrename to dotnet/samples/AutoGen.BasicSamples/GettingStart/Dynamic_Group_Chat.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GettingStart/FSM_Group_Chat.cs b/dotnet/samples/AutoGen.BasicSamples/GettingStart/FSM_Group_Chat.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/GettingStart/FSM_Group_Chat.csrename to dotnet/samples/AutoGen.BasicSamples/GettingStart/FSM_Group_Chat.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs b/dotnet/samples/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.csrename to dotnet/samples/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GettingStart/Streaming_Tool_Call.cs b/dotnet/samples/AutoGen.BasicSamples/GettingStart/Streaming_Tool_Call.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/GettingStart/Streaming_Tool_Call.csrename to dotnet/samples/AutoGen.BasicSamples/GettingStart/Streaming_Tool_Call.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs b/dotnet/samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.csrename to dotnet/samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GlobalUsing.cs b/dotnet/samples/AutoGen.BasicSamples/GlobalUsing.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/GlobalUsing.csrename to dotnet/samples/AutoGen.BasicSamples/GlobalUsing.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/LLMConfiguration.cs b/dotnet/samples/AutoGen.BasicSamples/LLMConfiguration.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/LLMConfiguration.csrename to dotnet/samples/AutoGen.BasicSamples/LLMConfiguration.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/Program.cs b/dotnet/samples/AutoGen.BasicSamples/Program.cssimilarity index 100%rename from dotnet/sample/AutoGen.BasicSamples/Program.csrename to dotnet/samples/AutoGen.BasicSamples/Program.csdiff --git a/dotnet/sample/AutoGen.Gemini.Sample/AutoGen.Gemini.Sample.csproj b/dotnet/samples/AutoGen.Gemini.Sample/AutoGen.Gemini.Sample.csprojsimilarity index 100%rename from dotnet/sample/AutoGen.Gemini.Sample/AutoGen.Gemini.Sample.csprojrename to dotnet/samples/AutoGen.Gemini.Sample/AutoGen.Gemini.Sample.csprojdiff --git a/dotnet/sample/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs b/dotnet/samples/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cssimilarity index 100%rename from dotnet/sample/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.csrename to dotnet/samples/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.csdiff --git a/dotnet/sample/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs b/dotnet/samples/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cssimilarity index 100%rename from dotnet/sample/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.csrename to dotnet/samples/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.csdiff --git a/dotnet/sample/AutoGen.Gemini.Sample/Function_Call_With_Gemini.cs b/dotnet/samples/AutoGen.Gemini.Sample/Function_Call_With_Gemini.cssimilarity index 100%rename from dotnet/sample/AutoGen.Gemini.Sample/Function_Call_With_Gemini.csrename to dotnet/samples/AutoGen.Gemini.Sample/Function_Call_With_Gemini.csdiff --git a/dotnet/sample/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs b/dotnet/samples/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cssimilarity index 100%rename from dotnet/sample/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.csrename to dotnet/samples/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.csdiff --git a/dotnet/sample/AutoGen.Gemini.Sample/Program.cs b/dotnet/samples/AutoGen.Gemini.Sample/Program.cssimilarity index 100%rename from dotnet/sample/AutoGen.Gemini.Sample/Program.csrename to dotnet/samples/AutoGen.Gemini.Sample/Program.csdiff --git a/dotnet/sample/AutoGen.Ollama.Sample/AutoGen.Ollama.Sample.csproj b/dotnet/samples/AutoGen.Ollama.Sample/AutoGen.Ollama.Sample.csprojsimilarity index 100%rename from dotnet/sample/AutoGen.Ollama.Sample/AutoGen.Ollama.Sample.csprojrename to dotnet/samples/AutoGen.Ollama.Sample/AutoGen.Ollama.Sample.csprojdiff --git a/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs b/dotnet/samples/AutoGen.Ollama.Sample/Chat_With_LLaMA.cssimilarity index 100%rename from dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.csrename to dotnet/samples/AutoGen.Ollama.Sample/Chat_With_LLaMA.csdiff --git a/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs b/dotnet/samples/AutoGen.Ollama.Sample/Chat_With_LLaVA.cssimilarity index 100%rename from dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.csrename to dotnet/samples/AutoGen.Ollama.Sample/Chat_With_LLaVA.csdiff --git a/dotnet/sample/AutoGen.Ollama.Sample/Program.cs b/dotnet/samples/AutoGen.Ollama.Sample/Program.cssimilarity index 100%rename from dotnet/sample/AutoGen.Ollama.Sample/Program.csrename to dotnet/samples/AutoGen.Ollama.Sample/Program.csdiff --git a/dotnet/sample/AutoGen.OpenAI.Sample/AutoGen.OpenAI.Sample.csproj b/dotnet/samples/AutoGen.OpenAI.Sample/AutoGen.OpenAI.Sample.csprojsimilarity index 100%rename from dotnet/sample/AutoGen.OpenAI.Sample/AutoGen.OpenAI.Sample.csprojrename to dotnet/samples/AutoGen.OpenAI.Sample/AutoGen.OpenAI.Sample.csprojdiff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Azure_OpenAI.cs b/dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_Azure_OpenAI.cssimilarity index 100%rename from dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Azure_OpenAI.csrename to dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_Azure_OpenAI.csdiff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs b/dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_Ollama.cssimilarity index 100%rename from dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.csrename to dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_Ollama.csdiff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_OpenAI_o1_preview.cs b/dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_OpenAI_o1_preview.cssimilarity index 100%rename from dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_OpenAI_o1_preview.csrename to dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_OpenAI_o1_preview.csdiff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Program.cs b/dotnet/samples/AutoGen.OpenAI.Sample/Program.cssimilarity index 100%rename from dotnet/sample/AutoGen.OpenAI.Sample/Program.csrename to dotnet/samples/AutoGen.OpenAI.Sample/Program.csdiff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Structural_Output.cs b/dotnet/samples/AutoGen.OpenAI.Sample/Structural_Output.cssimilarity index 100%rename from dotnet/sample/AutoGen.OpenAI.Sample/Structural_Output.csrename to dotnet/samples/AutoGen.OpenAI.Sample/Structural_Output.csdiff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs b/dotnet/samples/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cssimilarity index 100%rename from dotnet/sample/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.csrename to dotnet/samples/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.csdiff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs b/dotnet/samples/AutoGen.OpenAI.Sample/Use_Json_Mode.cssimilarity index 100%rename from dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.csrename to dotnet/samples/AutoGen.OpenAI.Sample/Use_Json_Mode.csdiff --git a/dotnet/sample/AutoGen.SemanticKernel.Sample/AutoGen.SemanticKernel.Sample.csproj b/dotnet/samples/AutoGen.SemanticKernel.Sample/AutoGen.SemanticKernel.Sample.csprojsimilarity index 100%rename from dotnet/sample/AutoGen.SemanticKernel.Sample/AutoGen.SemanticKernel.Sample.csprojrename to dotnet/samples/AutoGen.SemanticKernel.Sample/AutoGen.SemanticKernel.Sample.csprojdiff --git a/dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Agent.cs b/dotnet/samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Agent.cssimilarity index 100%rename from dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Agent.csrename to dotnet/samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Agent.csdiff --git a/dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs b/dotnet/samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cssimilarity index 100%rename from dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.csrename to dotnet/samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.csdiff --git a/dotnet/sample/AutoGen.SemanticKernel.Sample/Program.cs b/dotnet/samples/AutoGen.SemanticKernel.Sample/Program.cssimilarity index 100%rename from dotnet/sample/AutoGen.SemanticKernel.Sample/Program.csrename to dotnet/samples/AutoGen.SemanticKernel.Sample/Program.csdiff --git a/dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Bing_Search_With_Semantic_Kernel_Agent.cs b/dotnet/samples/AutoGen.SemanticKernel.Sample/Use_Bing_Search_With_Semantic_Kernel_Agent.cssimilarity index 100%rename from dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Bing_Search_With_Semantic_Kernel_Agent.csrename to dotnet/samples/AutoGen.SemanticKernel.Sample/Use_Bing_Search_With_Semantic_Kernel_Agent.csdiff --git a/dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs b/dotnet/samples/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cssimilarity index 100%rename from dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.csrename to dotnet/samples/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.csdiff --git a/dotnet/sample/AutoGen.WebAPI.Sample/AutoGen.WebAPI.Sample.csproj b/dotnet/samples/AutoGen.WebAPI.Sample/AutoGen.WebAPI.Sample.csprojsimilarity index 100%rename from dotnet/sample/AutoGen.WebAPI.Sample/AutoGen.WebAPI.Sample.csprojrename to dotnet/samples/AutoGen.WebAPI.Sample/AutoGen.WebAPI.Sample.csprojdiff --git a/dotnet/sample/AutoGen.WebAPI.Sample/Program.cs b/dotnet/samples/AutoGen.WebAPI.Sample/Program.cssimilarity index 100%rename from dotnet/sample/AutoGen.WebAPI.Sample/Program.csrename to dotnet/samples/AutoGen.WebAPI.Sample/Program.csdiff --git a/dotnet/samples/Directory.Build.props b/dotnet/samples/Directory.Build.propsnew file mode 100644index 000000000..7d194dce8--- /dev/null+++ b/dotnet/samples/Directory.Build.props@@ -0,0 +1,9 @@+<?xml version="1.0" encoding="utf-8"?>+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">+ <Import Project="../Directory.Build.props" />+ <PropertyGroup>+ <SignAssembly>False</SignAssembly>+ <AssemblyOriginatorKeyFile></AssemblyOriginatorKeyFile>+ <PublicKey></PublicKey>+ </PropertyGroup>+</Project>diff --git a/dotnet/samples/Hello/Hello.csproj b/dotnet/samples/Hello/Hello.csprojnew file mode 100644index 000000000..3598a2acf--- /dev/null+++ b/dotnet/samples/Hello/Hello.csproj@@ -0,0 +1,19 @@+<Project Sdk="Microsoft.NET.Sdk">++ <ItemGroup>+ <ProjectReference Include="..\..\src\Microsoft.AutoGen.Agents.Client\Microsoft.AutoGen.Agents.Client.csproj" />+ <ProjectReference Include="..\..\src\Microsoft.AutoGen.Agents.Runtime\Microsoft.AutoGen.Agents.Runtime.csproj" />+ </ItemGroup>++ <ItemGroup>+ <PackageReference Include="Microsoft.Extensions.Hosting" />+ </ItemGroup>++ <PropertyGroup>+ <OutputType>Exe</OutputType>+ <TargetFramework>net8.0</TargetFramework>+ <ImplicitUsings>enable</ImplicitUsings>+ <Nullable>enable</Nullable>+ </PropertyGroup>++</Project>diff --git a/dotnet/samples/Hello/Program.cs b/dotnet/samples/Hello/Program.csnew file mode 100644index 000000000..4b9c1d6fb--- /dev/null+++ b/dotnet/samples/Hello/Program.cs@@ -0,0 +1,62 @@+using Microsoft.Extensions.Hosting;+using Microsoft.AutoGen.Agents.Abstractions;+using Microsoft.AutoGen.Agents.Client;+using Microsoft.AutoGen.Agents.Runtime;+using Microsoft.Extensions.DependencyInjection;++var builder = Host.CreateApplicationBuilder(args);+builder.AddAgentService();+builder.UseOrleans(siloBuilder =>+{+ siloBuilder.UseLocalhostClustering(); ;+});+builder.AddAgentWorker("https://localhost:5000");+var app = builder.Build();+await app.StartAsync();+app.Services.GetRequiredService<AgentWorkerRuntime>();+var evt = new NewMessageReceived+{+ Message = "World"+}.ToCloudEvent("HelloAgents");+await app.WaitForShutdownAsync();++[TopicSubscription("HelloAgents")]+public class HelloAgent(+ IAgentContext context,+ [FromKeyedServices("EventTypes")] EventTypes typeRegistry) : ConsoleAgent(+ context,+ typeRegistry),+ ISayHello,+ IHandle<NewMessageReceived>,+ IHandle<ConversationClosed>+{+ public async Task Handle(NewMessageReceived item)+ {+ var response = await SayHello(item.Message);+ var evt = new Output+ {+ Message = response+ }.ToCloudEvent(this.AgentId.Key);+ await PublishEvent(evt);+ }++ public async Task Handle(ConversationClosed item)+ {+ var goodbye = "Goodbye!";+ var evt = new Output+ {+ Message = goodbye+ }.ToCloudEvent(this.AgentId.Key);+ await PublishEvent(evt);+ }++ public async Task<string> SayHello(string ask)+ {+ var response = $"Hello {ask}";+ return response;+ }+}+public interface ISayHello+{+ public Task<string> SayHello(string ask);+}\ No newline at end of filediff --git a/dotnet/sample/HelloAgents/HelloAgents.Agents/Agents/HelloAgent/HelloAgent.cs b/dotnet/samples/HelloAgents/HelloAgents.Agents/Agents/HelloAgent/HelloAgent.cssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Agents/Agents/HelloAgent/HelloAgent.csrename to dotnet/samples/HelloAgents/HelloAgents.Agents/Agents/HelloAgent/HelloAgent.csdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Agents/Agents/HelloAgent/HelloAgentPrompts.cs b/dotnet/samples/HelloAgents/HelloAgents.Agents/Agents/HelloAgent/HelloAgentPrompts.cssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Agents/Agents/HelloAgent/HelloAgentPrompts.csrename to dotnet/samples/HelloAgents/HelloAgents.Agents/Agents/HelloAgent/HelloAgentPrompts.csdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Agents/Agents/Protos/messages.proto b/dotnet/samples/HelloAgents/HelloAgents.Agents/Agents/Protos/messages.protosimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Agents/Agents/Protos/messages.protorename to dotnet/samples/HelloAgents/HelloAgents.Agents/Agents/Protos/messages.protodiff --git a/dotnet/sample/HelloAgents/HelloAgents.Agents/Agents/Protos/states.proto b/dotnet/samples/HelloAgents/HelloAgents.Agents/Agents/Protos/states.protosimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Agents/Agents/Protos/states.protorename to dotnet/samples/HelloAgents/HelloAgents.Agents/Agents/Protos/states.protodiff --git a/dotnet/sample/HelloAgents/HelloAgents.Agents/HelloAgents.Agents.csproj b/dotnet/samples/HelloAgents/HelloAgents.Agents/HelloAgents.Agents.csprojsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Agents/HelloAgents.Agents.csprojrename to dotnet/samples/HelloAgents/HelloAgents.Agents/HelloAgents.Agents.csprojdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Agents/Program.cs b/dotnet/samples/HelloAgents/HelloAgents.Agents/Program.cssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Agents/Program.csrename to dotnet/samples/HelloAgents/HelloAgents.Agents/Program.csdiff --git a/dotnet/sample/HelloAgents/HelloAgents.ApiService/HelloAgents.ApiService.csproj b/dotnet/samples/HelloAgents/HelloAgents.ApiService/HelloAgents.ApiService.csprojsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.ApiService/HelloAgents.ApiService.csprojrename to dotnet/samples/HelloAgents/HelloAgents.ApiService/HelloAgents.ApiService.csprojdiff --git a/dotnet/sample/HelloAgents/HelloAgents.ApiService/Program.cs b/dotnet/samples/HelloAgents/HelloAgents.ApiService/Program.cssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.ApiService/Program.csrename to dotnet/samples/HelloAgents/HelloAgents.ApiService/Program.csdiff --git a/dotnet/sample/HelloAgents/HelloAgents.ApiService/appsettings.Development.json b/dotnet/samples/HelloAgents/HelloAgents.ApiService/appsettings.Development.jsonsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.ApiService/appsettings.Development.jsonrename to dotnet/samples/HelloAgents/HelloAgents.ApiService/appsettings.Development.jsondiff --git a/dotnet/sample/HelloAgents/HelloAgents.AppHost/HelloAgents.AppHost.csproj b/dotnet/samples/HelloAgents/HelloAgents.AppHost/HelloAgents.AppHost.csprojsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.AppHost/HelloAgents.AppHost.csprojrename to dotnet/samples/HelloAgents/HelloAgents.AppHost/HelloAgents.AppHost.csprojdiff --git a/dotnet/sample/HelloAgents/HelloAgents.AppHost/Program.cs b/dotnet/samples/HelloAgents/HelloAgents.AppHost/Program.cssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.AppHost/Program.csrename to dotnet/samples/HelloAgents/HelloAgents.AppHost/Program.csdiff --git a/dotnet/sample/HelloAgents/HelloAgents.AppHost/appsettings.Development.json b/dotnet/samples/HelloAgents/HelloAgents.AppHost/appsettings.Development.jsonsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.AppHost/appsettings.Development.jsonrename to dotnet/samples/HelloAgents/HelloAgents.AppHost/appsettings.Development.jsondiff --git a/dotnet/sample/HelloAgents/HelloAgents.ServiceDefaults/Extensions.cs b/dotnet/samples/HelloAgents/HelloAgents.ServiceDefaults/Extensions.cssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.ServiceDefaults/Extensions.csrename to dotnet/samples/HelloAgents/HelloAgents.ServiceDefaults/Extensions.csdiff --git a/dotnet/sample/HelloAgents/HelloAgents.ServiceDefaults/HelloAgents.ServiceDefaults.csproj b/dotnet/samples/HelloAgents/HelloAgents.ServiceDefaults/HelloAgents.ServiceDefaults.csprojsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.ServiceDefaults/HelloAgents.ServiceDefaults.csprojrename to dotnet/samples/HelloAgents/HelloAgents.ServiceDefaults/HelloAgents.ServiceDefaults.csprojdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/AgentApiClient.cs b/dotnet/samples/HelloAgents/HelloAgents.Web/AgentApiClient.cssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/AgentApiClient.csrename to dotnet/samples/HelloAgents/HelloAgents.Web/AgentApiClient.csdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/App.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/App.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/App.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/App.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Layout/MainLayout.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Layout/MainLayout.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Layout/MainLayout.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Layout/MainLayout.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Layout/MainLayout.razor.css b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Layout/MainLayout.razor.csssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Layout/MainLayout.razor.cssrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Layout/MainLayout.razor.cssdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Layout/NavMenu.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Layout/NavMenu.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Layout/NavMenu.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Layout/NavMenu.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Layout/NavMenu.razor.css b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Layout/NavMenu.razor.csssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Layout/NavMenu.razor.cssrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Layout/NavMenu.razor.cssdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Pages/Agents.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Pages/Agents.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Pages/Agents.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Pages/Agents.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Pages/Counter.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Pages/Counter.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Pages/Counter.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Pages/Counter.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Pages/Error.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Pages/Error.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Pages/Error.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Pages/Error.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Pages/Home.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Pages/Home.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Pages/Home.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Pages/Home.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/Routes.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/Routes.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/Routes.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/Routes.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Components/_Imports.razor b/dotnet/samples/HelloAgents/HelloAgents.Web/Components/_Imports.razorsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Components/_Imports.razorrename to dotnet/samples/HelloAgents/HelloAgents.Web/Components/_Imports.razordiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/HelloAgents.Web.csproj b/dotnet/samples/HelloAgents/HelloAgents.Web/HelloAgents.Web.csprojsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/HelloAgents.Web.csprojrename to dotnet/samples/HelloAgents/HelloAgents.Web/HelloAgents.Web.csprojdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/Program.cs b/dotnet/samples/HelloAgents/HelloAgents.Web/Program.cssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/Program.csrename to dotnet/samples/HelloAgents/HelloAgents.Web/Program.csdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/appsettings.Development.json b/dotnet/samples/HelloAgents/HelloAgents.Web/appsettings.Development.jsonsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/appsettings.Development.jsonrename to dotnet/samples/HelloAgents/HelloAgents.Web/appsettings.Development.jsondiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/app.css b/dotnet/samples/HelloAgents/HelloAgents.Web/wwwroot/app.csssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/app.cssrename to dotnet/samples/HelloAgents/HelloAgents.Web/wwwroot/app.cssdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/bootstrap/bootstrap.min.css b/dotnet/samples/HelloAgents/HelloAgents.Web/wwwroot/bootstrap/bootstrap.min.csssimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/bootstrap/bootstrap.min.cssrename to dotnet/samples/HelloAgents/HelloAgents.Web/wwwroot/bootstrap/bootstrap.min.cssdiff --git a/dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/bootstrap/bootstrap.min.css.map b/dotnet/samples/HelloAgents/HelloAgents.Web/wwwroot/bootstrap/bootstrap.min.css.mapsimilarity index 100%rename from dotnet/sample/HelloAgents/HelloAgents.Web/wwwroot/bootstrap/bootstrap.min.css.maprename to dotnet/samples/HelloAgents/HelloAgents.Web/wwwroot/bootstrap/bootstrap.min.css.mapdiff --git a/dotnet/sample/dev-team/DevTeam.AgentHost/DevTeam.AgentHost.csproj b/dotnet/samples/dev-team/DevTeam.AgentHost/DevTeam.AgentHost.csprojsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.AgentHost/DevTeam.AgentHost.csprojrename to dotnet/samples/dev-team/DevTeam.AgentHost/DevTeam.AgentHost.csprojdiff --git a/dotnet/sample/dev-team/DevTeam.AgentHost/Program.cs b/dotnet/samples/dev-team/DevTeam.AgentHost/Program.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.AgentHost/Program.csrename to dotnet/samples/dev-team/DevTeam.AgentHost/Program.csdiff --git a/dotnet/sample/dev-team/DevTeam.AgentHost/appsettings.Development.json b/dotnet/samples/dev-team/DevTeam.AgentHost/appsettings.Development.jsonsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.AgentHost/appsettings.Development.jsonrename to dotnet/samples/dev-team/DevTeam.AgentHost/appsettings.Development.jsondiff --git a/dotnet/sample/dev-team/DevTeam.Agents/DevTeam.Agents.csproj b/dotnet/samples/dev-team/DevTeam.Agents/DevTeam.Agents.csprojsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/DevTeam.Agents.csprojrename to dotnet/samples/dev-team/DevTeam.Agents/DevTeam.Agents.csprojdiff --git a/dotnet/sample/dev-team/DevTeam.Agents/Developer/Developer.cs b/dotnet/samples/dev-team/DevTeam.Agents/Developer/Developer.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/Developer/Developer.csrename to dotnet/samples/dev-team/DevTeam.Agents/Developer/Developer.csdiff --git a/dotnet/sample/dev-team/DevTeam.Agents/Developer/DeveloperPrompts.cs b/dotnet/samples/dev-team/DevTeam.Agents/Developer/DeveloperPrompts.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/Developer/DeveloperPrompts.csrename to dotnet/samples/dev-team/DevTeam.Agents/Developer/DeveloperPrompts.csdiff --git a/dotnet/sample/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLead.cs b/dotnet/samples/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLead.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLead.csrename to dotnet/samples/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLead.csdiff --git a/dotnet/sample/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLeadPrompts.cs b/dotnet/samples/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLeadPrompts.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLeadPrompts.csrename to dotnet/samples/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLeadPrompts.csdiff --git a/dotnet/sample/dev-team/DevTeam.Agents/ProductManager/PMPrompts.cs b/dotnet/samples/dev-team/DevTeam.Agents/ProductManager/PMPrompts.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/ProductManager/PMPrompts.csrename to dotnet/samples/dev-team/DevTeam.Agents/ProductManager/PMPrompts.csdiff --git a/dotnet/sample/dev-team/DevTeam.Agents/ProductManager/ProductManager.cs b/dotnet/samples/dev-team/DevTeam.Agents/ProductManager/ProductManager.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/ProductManager/ProductManager.csrename to dotnet/samples/dev-team/DevTeam.Agents/ProductManager/ProductManager.csdiff --git a/dotnet/sample/dev-team/DevTeam.Agents/Program.cs b/dotnet/samples/dev-team/DevTeam.Agents/Program.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/Program.csrename to dotnet/samples/dev-team/DevTeam.Agents/Program.csdiff --git a/dotnet/sample/dev-team/DevTeam.Agents/appsettings.Development.json b/dotnet/samples/dev-team/DevTeam.Agents/appsettings.Development.jsonsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Agents/appsettings.Development.jsonrename to dotnet/samples/dev-team/DevTeam.Agents/appsettings.Development.jsondiff --git a/dotnet/sample/dev-team/DevTeam.AppHost/DevTeam.AppHost.csproj b/dotnet/samples/dev-team/DevTeam.AppHost/DevTeam.AppHost.csprojsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.AppHost/DevTeam.AppHost.csprojrename to dotnet/samples/dev-team/DevTeam.AppHost/DevTeam.AppHost.csprojdiff --git a/dotnet/sample/dev-team/DevTeam.AppHost/Program.cs b/dotnet/samples/dev-team/DevTeam.AppHost/Program.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.AppHost/Program.csrename to dotnet/samples/dev-team/DevTeam.AppHost/Program.csdiff --git a/dotnet/sample/dev-team/DevTeam.AppHost/appsettings.Development.json b/dotnet/samples/dev-team/DevTeam.AppHost/appsettings.Development.jsonsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.AppHost/appsettings.Development.jsonrename to dotnet/samples/dev-team/DevTeam.AppHost/appsettings.Development.jsondiff --git a/dotnet/sample/dev-team/DevTeam.Backend/Agents/AzureGenie.cs b/dotnet/samples/dev-team/DevTeam.Backend/Agents/AzureGenie.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/Agents/AzureGenie.csrename to dotnet/samples/dev-team/DevTeam.Backend/Agents/AzureGenie.csdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/Agents/Hubber.cs b/dotnet/samples/dev-team/DevTeam.Backend/Agents/Hubber.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/Agents/Hubber.csrename to dotnet/samples/dev-team/DevTeam.Backend/Agents/Hubber.csdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/Agents/Sandbox.cs b/dotnet/samples/dev-team/DevTeam.Backend/Agents/Sandbox.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/Agents/Sandbox.csrename to dotnet/samples/dev-team/DevTeam.Backend/Agents/Sandbox.csdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/DevTeam.Backend.csproj b/dotnet/samples/dev-team/DevTeam.Backend/DevTeam.Backend.csprojsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/DevTeam.Backend.csprojrename to dotnet/samples/dev-team/DevTeam.Backend/DevTeam.Backend.csprojdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/Program.cs b/dotnet/samples/dev-team/DevTeam.Backend/Program.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/Program.csrename to dotnet/samples/dev-team/DevTeam.Backend/Program.csdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/Services/AzureService.cs b/dotnet/samples/dev-team/DevTeam.Backend/Services/AzureService.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/Services/AzureService.csrename to dotnet/samples/dev-team/DevTeam.Backend/Services/AzureService.csdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/Services/GithubAuthService.cs b/dotnet/samples/dev-team/DevTeam.Backend/Services/GithubAuthService.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/Services/GithubAuthService.csrename to dotnet/samples/dev-team/DevTeam.Backend/Services/GithubAuthService.csdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/Services/GithubService.cs b/dotnet/samples/dev-team/DevTeam.Backend/Services/GithubService.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/Services/GithubService.csrename to dotnet/samples/dev-team/DevTeam.Backend/Services/GithubService.csdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/Services/GithubWebHookProcessor.cs b/dotnet/samples/dev-team/DevTeam.Backend/Services/GithubWebHookProcessor.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/Services/GithubWebHookProcessor.csrename to dotnet/samples/dev-team/DevTeam.Backend/Services/GithubWebHookProcessor.csdiff --git a/dotnet/sample/dev-team/DevTeam.Backend/appsettings.Development.json b/dotnet/samples/dev-team/DevTeam.Backend/appsettings.Development.jsonsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Backend/appsettings.Development.jsonrename to dotnet/samples/dev-team/DevTeam.Backend/appsettings.Development.jsondiff --git a/dotnet/sample/dev-team/DevTeam.ServiceDefaults/DevTeam.ServiceDefaults.csproj b/dotnet/samples/dev-team/DevTeam.ServiceDefaults/DevTeam.ServiceDefaults.csprojsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.ServiceDefaults/DevTeam.ServiceDefaults.csprojrename to dotnet/samples/dev-team/DevTeam.ServiceDefaults/DevTeam.ServiceDefaults.csprojdiff --git a/dotnet/sample/dev-team/DevTeam.ServiceDefaults/Extensions.cs b/dotnet/samples/dev-team/DevTeam.ServiceDefaults/Extensions.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.ServiceDefaults/Extensions.csrename to dotnet/samples/dev-team/DevTeam.ServiceDefaults/Extensions.csdiff --git a/dotnet/sample/dev-team/DevTeam.Shared/DevTeam.Shared.csproj b/dotnet/samples/dev-team/DevTeam.Shared/DevTeam.Shared.csprojsimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Shared/DevTeam.Shared.csprojrename to dotnet/samples/dev-team/DevTeam.Shared/DevTeam.Shared.csprojdiff --git a/dotnet/sample/dev-team/DevTeam.Shared/EventExtensions.cs b/dotnet/samples/dev-team/DevTeam.Shared/EventExtensions.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Shared/EventExtensions.csrename to dotnet/samples/dev-team/DevTeam.Shared/EventExtensions.csdiff --git a/dotnet/sample/dev-team/DevTeam.Shared/Models/DevPlan.cs b/dotnet/samples/dev-team/DevTeam.Shared/Models/DevPlan.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Shared/Models/DevPlan.csrename to dotnet/samples/dev-team/DevTeam.Shared/Models/DevPlan.csdiff --git a/dotnet/sample/dev-team/DevTeam.Shared/Options/AzureOptions.cs b/dotnet/samples/dev-team/DevTeam.Shared/Options/AzureOptions.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Shared/Options/AzureOptions.csrename to dotnet/samples/dev-team/DevTeam.Shared/Options/AzureOptions.csdiff --git a/dotnet/sample/dev-team/DevTeam.Shared/Options/GithubOptions.cs b/dotnet/samples/dev-team/DevTeam.Shared/Options/GithubOptions.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Shared/Options/GithubOptions.csrename to dotnet/samples/dev-team/DevTeam.Shared/Options/GithubOptions.csdiff --git a/dotnet/sample/dev-team/DevTeam.Shared/ParseExtensions.cs b/dotnet/samples/dev-team/DevTeam.Shared/ParseExtensions.cssimilarity index 100%rename from dotnet/sample/dev-team/DevTeam.Shared/ParseExtensions.csrename to dotnet/samples/dev-team/DevTeam.Shared/ParseExtensions.csdiff --git a/dotnet/sample/dev-team/Protos/messages.proto b/dotnet/samples/dev-team/Protos/messages.protosimilarity index 100%rename from dotnet/sample/dev-team/Protos/messages.protorename to dotnet/samples/dev-team/Protos/messages.protodiff --git a/dotnet/sample/dev-team/Protos/states.proto b/dotnet/samples/dev-team/Protos/states.protosimilarity index 100%rename from dotnet/sample/dev-team/Protos/states.protorename to dotnet/samples/dev-team/Protos/states.protodiff --git a/dotnet/sample/dev-team/README.md b/dotnet/samples/dev-team/README.mdsimilarity index 100%rename from dotnet/sample/dev-team/README.mdrename to dotnet/samples/dev-team/README.mddiff --git a/dotnet/sample/dev-team/azure.yaml b/dotnet/samples/dev-team/azure.yamlsimilarity index 100%rename from dotnet/sample/dev-team/azure.yamlrename to dotnet/samples/dev-team/azure.yamldiff --git a/dotnet/sample/dev-team/docs/github-flow-getting-started.md b/dotnet/samples/dev-team/docs/github-flow-getting-started.mdsimilarity index 100%rename from dotnet/sample/dev-team/docs/github-flow-getting-started.mdrename to dotnet/samples/dev-team/docs/github-flow-getting-started.mddiff --git a/dotnet/sample/dev-team/seed-memory/Dockerfile b/dotnet/samples/dev-team/seed-memory/Dockerfilesimilarity index 100%rename from dotnet/sample/dev-team/seed-memory/Dockerfilerename to dotnet/samples/dev-team/seed-memory/Dockerfilediff --git a/dotnet/sample/dev-team/seed-memory/Program.cs b/dotnet/samples/dev-team/seed-memory/Program.cssimilarity index 100%rename from dotnet/sample/dev-team/seed-memory/Program.csrename to dotnet/samples/dev-team/seed-memory/Program.csdiff --git a/dotnet/sample/dev-team/seed-memory/README.md b/dotnet/samples/dev-team/seed-memory/README.mdsimilarity index 100%rename from dotnet/sample/dev-team/seed-memory/README.mdrename to dotnet/samples/dev-team/seed-memory/README.mddiff --git a/dotnet/sample/dev-team/seed-memory/azure-well-architected.pdf b/dotnet/samples/dev-team/seed-memory/azure-well-architected.pdfsimilarity index 100%rename from dotnet/sample/dev-team/seed-memory/azure-well-architected.pdfrename to dotnet/samples/dev-team/seed-memory/azure-well-architected.pdfdiff --git a/dotnet/sample/dev-team/seed-memory/config/KernelSettings.cs b/dotnet/samples/dev-team/seed-memory/config/KernelSettings.cssimilarity index 100%rename from dotnet/sample/dev-team/seed-memory/config/KernelSettings.csrename to dotnet/samples/dev-team/seed-memory/config/KernelSettings.csdiff --git a/dotnet/sample/dev-team/seed-memory/config/appsettings.template.json b/dotnet/samples/dev-team/seed-memory/config/appsettings.template.jsonsimilarity index 100%rename from dotnet/sample/dev-team/seed-memory/config/appsettings.template.jsonrename to dotnet/samples/dev-team/seed-memory/config/appsettings.template.jsondiff --git a/dotnet/sample/dev-team/seed-memory/seed-memory.csproj b/dotnet/samples/dev-team/seed-memory/seed-memory.csprojsimilarity index 100%rename from dotnet/sample/dev-team/seed-memory/seed-memory.csprojrename to dotnet/samples/dev-team/seed-memory/seed-memory.csprojdiff --git a/dotnet/src/AutoGen.DotnetInteractive/Extension/AgentExtension.cs b/dotnet/src/AutoGen.DotnetInteractive/Extension/AgentExtension.csindex de1e2a68c..06acf27f1 100644--- a/dotnet/src/AutoGen.DotnetInteractive/Extension/AgentExtension.cs+++ b/dotnet/src/AutoGen.DotnetInteractive/Extension/AgentExtension.cs@@ -18,7 +18,7 @@ public static class AgentExtension/// <param name="maximumOutputToKeep">maximum output to keep</param>/// <example>/// <]+ /// [!code-csharp[Example04_Dynamic_GroupChat_Coding_Task](~/../samples/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.cs)]/// ]]>/// </example>[Obsolete]diff --git a/dotnet/src/AutoGen.Gemini/GeminiChatAgent.cs b/dotnet/src/AutoGen.Gemini/GeminiChatAgent.csindex e759ba26d..cf5fe36ea 100644--- a/dotnet/src/AutoGen.Gemini/GeminiChatAgent.cs+++ b/dotnet/src/AutoGen.Gemini/GeminiChatAgent.cs@@ -68,7 +68,7 @@ public class GeminiChatAgent : IStreamingAgent/// <param name="responseMimeType">response mime type, available values are ['application/json', 'text/plain'], default is 'text/plain'</param>/// /// <example>/// <]+ /// [!code-csharp[Chat_With_Google_Gemini](~/../samples/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs?name=Create_Gemini_Agent)]/// ]]>/// </example>public GeminiChatAgent(@@ -107,7 +107,7 @@ public class GeminiChatAgent : IStreamingAgent/// <param name="responseMimeType">response mime type, available values are ['application/json', 'text/plain'], default is 'text/plain'</param>/// <example>/// <]+ /// [!code-csharp[Chat_With_Vertex_Gemini](~/../samples/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs?name=Create_Gemini_Agent)]/// ]]>/// </example>public GeminiChatAgent(diff --git a/dotnet/src/AutoGen.LMStudio/LMStudioAgent.cs b/dotnet/src/AutoGen.LMStudio/LMStudioAgent.csindex c4808b443..534e54537 100644--- a/dotnet/src/AutoGen.LMStudio/LMStudioAgent.cs+++ b/dotnet/src/AutoGen.LMStudio/LMStudioAgent.cs@@ -16,7 +16,7 @@ namespace AutoGen.LMStudio;/// agent that consumes local server from LM Studio/// </summary>/// <example>-/// [!code-csharp[LMStudioAgent](../../sample/AutoGen.BasicSamples/Example08_LMStudio.cs?name=lmstudio_example_1)]+/// [!code-csharp[LMStudioAgent](../../samples/AutoGen.BasicSamples/Example08_LMStudio.cs?name=lmstudio_example_1)]/// </example>[Obsolete("Use OpenAIChatAgent to connect to LM Studio")]public class LMStudioAgent : IAgentdiff --git a/dotnet/src/AutoGen.SourceGenerator/README.md b/dotnet/src/AutoGen.SourceGenerator/README.mdindex a40fbe604..9339cccce 100644--- a/dotnet/src/AutoGen.SourceGenerator/README.md+++ b/dotnet/src/AutoGen.SourceGenerator/README.md@@ -109,5 +109,5 @@ Add two numbers.```For more examples, please check out the following project-- [AutoGen.BasicSamples](../sample/AutoGen.BasicSamples/)+- [AutoGen.BasicSamples](../samples/AutoGen.BasicSamples/)- [AutoGen.SourceGenerator.Tests](../../test/AutoGen.SourceGenerator.Tests/)diff --git a/dotnet/test/AutoGen.Gemini.Tests/AutoGen.Gemini.Tests.csproj b/dotnet/test/AutoGen.Gemini.Tests/AutoGen.Gemini.Tests.csprojindex a08778800..2e9e020ab 100644--- a/dotnet/test/AutoGen.Gemini.Tests/AutoGen.Gemini.Tests.csproj+++ b/dotnet/test/AutoGen.Gemini.Tests/AutoGen.Gemini.Tests.csproj@@ -11,7 +11,7 @@</PropertyGroup><ItemGroup>- <ProjectReference Include="..\..\sample\AutoGen.Gemini.Sample\AutoGen.Gemini.Sample.csproj" />+ <ProjectReference Include="..\..\samples\AutoGen.Gemini.Sample\AutoGen.Gemini.Sample.csproj" /><ProjectReference Include="..\..\src\AutoGen.Gemini\AutoGen.Gemini.csproj" /><ProjectReference Include="..\AutoGen.Tests\AutoGen.Tests.csproj" /><ProjectReference Include="..\..\src\AutoGen.SourceGenerator\AutoGen.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />diff --git a/dotnet/test/AutoGen.OpenAI.Tests/AutoGen.OpenAI.Tests.csproj b/dotnet/test/AutoGen.OpenAI.Tests/AutoGen.OpenAI.Tests.csprojindex ab65f9800..c12ae4629 100644--- a/dotnet/test/AutoGen.OpenAI.Tests/AutoGen.OpenAI.Tests.csproj+++ b/dotnet/test/AutoGen.OpenAI.Tests/AutoGen.OpenAI.Tests.csproj@@ -13,7 +13,7 @@</ItemGroup><ItemGroup>- <ProjectReference Include="..\..\sample\AutoGen.OpenAI.Sample\AutoGen.OpenAI.Sample.csproj" />+ <ProjectReference Include="..\..\samples\AutoGen.OpenAI.Sample\AutoGen.OpenAI.Sample.csproj" /><ProjectReference Include="..\..\src\AutoGen.OpenAI\AutoGen.OpenAI.csproj" /><ProjectReference Include="..\..\src\AutoGen.SourceGenerator\AutoGen.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" /><ProjectReference Include="..\AutoGen.Test.Share\AutoGen.Tests.Share.csproj" />diff --git a/dotnet/test/AutoGen.Tests/AutoGen.Tests.csproj b/dotnet/test/AutoGen.Tests/AutoGen.Tests.csprojindex 70ac98a77..12c31e1a4 100644--- a/dotnet/test/AutoGen.Tests/AutoGen.Tests.csproj+++ b/dotnet/test/AutoGen.Tests/AutoGen.Tests.csproj@@ -8,7 +8,7 @@</PropertyGroup><ItemGroup>- <ProjectReference Include="..\..\sample\AutoGen.BasicSamples\AutoGen.BasicSample.csproj" />+ <ProjectReference Include="..\..\samples\AutoGen.BasicSamples\AutoGen.BasicSample.csproj" /><ProjectReference Include="..\..\src\AutoGen.Anthropic\AutoGen.Anthropic.csproj" /><ProjectReference Include="..\..\src\AutoGen.SourceGenerator\AutoGen.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" /><ProjectReference Include="..\..\src\AutoGen\AutoGen.csproj" />diff --git a/dotnet/website/articles/Agent-overview.md b/dotnet/website/articles/Agent-overview.mdindex 586d231a6..5b3227815 100644--- a/dotnet/website/articles/Agent-overview.md+++ b/dotnet/website/articles/Agent-overview.md@@ -16,16 +16,16 @@ To chat with an agent, typically you can invoke @AutoGen.Core.IAgent.GenerateRep> AutoGen provides a list of built-in message types like @AutoGen.Core.TextMessage, @AutoGen.Core.ImageMessage, @AutoGen.Core.MultiModalMessage, @AutoGen.Core.ToolCallMessage, @AutoGen.Core.ToolCallResultMessage, etc. You can use these message types to chat with an agent. For further details, see [built-in messages](./Built-in-messages.md).- Send a @AutoGen.Core.TextMessage to an agent via @AutoGen.Core.IAgent.GenerateReplyAsync*:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.cs?name=ChatWithAnAgent_GenerateReplyAsync)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.cs?name=ChatWithAnAgent_GenerateReplyAsync)]- Send a message to an agent via @AutoGen.Core.AgentExtension.SendAsync*:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.cs?name=ChatWithAnAgent_SendAsync)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.cs?name=ChatWithAnAgent_SendAsync)]## Streaming chatIf an agent implements @AutoGen.Core.IStreamingAgent, you can use @AutoGen.Core.IStreamingAgent.GenerateStreamingReplyAsync* to chat with the agent in a streaming way. You would need to process the streaming updates on your side though.- Send a @AutoGen.Core.TextMessage to an agent via @AutoGen.Core.IStreamingAgent.GenerateStreamingReplyAsync*, and print the streaming updates to console:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.cs?name=ChatWithAnAgent_GenerateStreamingReplyAsync)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/AgentCodeSnippet.cs?name=ChatWithAnAgent_GenerateStreamingReplyAsync)]## Register middleware to an agent@AutoGen.Core.IMiddleware and @AutoGen.Core.IStreamingMiddleware are used to extend the behavior of @AutoGen.Core.IAgent.GenerateReplyAsync* and @AutoGen.Core.IStreamingAgent.GenerateStreamingReplyAsync*. You can register middleware to an agent to customize the behavior of the agent on things like function call support, converting message of different types, print message, gather user input, etc.diff --git a/dotnet/website/articles/AutoGen-Mistral-Overview.md b/dotnet/website/articles/AutoGen-Mistral-Overview.mdindex df5e154d0..c64f09ee7 100644--- a/dotnet/website/articles/AutoGen-Mistral-Overview.md+++ b/dotnet/website/articles/AutoGen-Mistral-Overview.md@@ -17,10 +17,10 @@ dotnet add package AutoGen.Mistral### ExampleImport the required namespace-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=using_statement)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=using_statement)]Create a @AutoGen.Mistral.MistralClientAgent and start chatting!-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=create_mistral_agent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=create_mistral_agent)]Use @AutoGen.Core.IStreamingAgent.GenerateStreamingReplyAsync* to stream the chat completion.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=streaming_chat)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=streaming_chat)]\ No newline at end of filediff --git a/dotnet/website/articles/AutoGen.Gemini/Chat-with-google-gemini.md b/dotnet/website/articles/AutoGen.Gemini/Chat-with-google-gemini.mdindex 92907af98..54bf61da0 100644--- a/dotnet/website/articles/AutoGen.Gemini/Chat-with-google-gemini.md+++ b/dotnet/website/articles/AutoGen.Gemini/Chat-with-google-gemini.md@@ -3,7 +3,7 @@ This example shows how to use @AutoGen.Gemini.GeminiChatAgent to connect to GoogTo run this example, you need to have a Google AI Gemini API key. For how to get a Google Gemini API key, please refer to [Google Gemini](https://gemini.google.com/).> [!NOTE]-> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs)+> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs)> [!NOTE]> What's the difference between Google AI Gemini and Vertex AI Gemini?@@ -20,12 +20,12 @@ dotnet add package AutoGen.Gemini### Step 2: Add using statement-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs?name=Using)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs?name=Using)]### Step 3: Create a Gemini agent-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs?name=Create_Gemini_Agent)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs?name=Create_Gemini_Agent)]### Step 4: Chat with Gemini-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs?name=Chat_With_Google_Gemini)]\ No newline at end of file+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Chat_With_Google_Gemini.cs?name=Chat_With_Google_Gemini)]\ No newline at end of filediff --git a/dotnet/website/articles/AutoGen.Gemini/Chat-with-vertex-gemini.md b/dotnet/website/articles/AutoGen.Gemini/Chat-with-vertex-gemini.mdindex 81f0b1c70..77cfb5ef6 100644--- a/dotnet/website/articles/AutoGen.Gemini/Chat-with-vertex-gemini.md+++ b/dotnet/website/articles/AutoGen.Gemini/Chat-with-vertex-gemini.md@@ -3,7 +3,7 @@ This example shows how to use @AutoGen.Gemini.GeminiChatAgent to connect to VertTo run this example, you need to have a project on Google Cloud with access to Vertex AI API. For more information please refer to [Google Vertex AI](https://cloud.google.com/vertex-ai/docs).> [!NOTE]-> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs)+> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs)> [!NOTE]> What's the difference between Google AI Gemini and Vertex AI Gemini?@@ -20,13 +20,13 @@ dotnet add package AutoGen.Gemini### Step 2: Add using statement-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs?name=Using)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs?name=Using)]### Step 3: Create a Gemini agent-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs?name=Create_Gemini_Agent)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs?name=Create_Gemini_Agent)]### Step 4: Chat with Gemini-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs?name=Chat_With_Vertex_Gemini)]\ No newline at end of file+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Chat_With_Vertex_Gemini.cs?name=Chat_With_Vertex_Gemini)]\ No newline at end of filediff --git a/dotnet/website/articles/AutoGen.Gemini/Function-call-with-gemini.md b/dotnet/website/articles/AutoGen.Gemini/Function-call-with-gemini.mdindex 354e1cd28..c9294dff5 100644--- a/dotnet/website/articles/AutoGen.Gemini/Function-call-with-gemini.md+++ b/dotnet/website/articles/AutoGen.Gemini/Function-call-with-gemini.md@@ -4,7 +4,7 @@ To run this example, you need to have a project on Google Cloud with access to V> [!NOTE]-> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.Gemini.Sample/Function_Call_With_Gemini.cs)+> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.Gemini.Sample/Function_Call_With_Gemini.cs)### Step 1: Install AutoGen.Gemini and AutoGen.SourceGenerator@@ -18,21 +18,21 @@ dotnet add package AutoGen.SourceGeneratorThe AutoGen.SourceGenerator package is required to generate the @AutoGen.Core.FunctionContract. For more information, please refer to [Create-type-safe-function-call](../Create-type-safe-function-call.md)### Step 2: Add using statement-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=Using)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=Using)]### Step 3: Create `MovieFunction`-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=MovieFunction)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=MovieFunction)]### Step 4: Create a Gemini agent-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=Create_Gemini_Agent)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=Create_Gemini_Agent)]### Step 5: Single turn function call-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=Single_turn)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=Single_turn)]### Step 6: Multi-turn function call-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=Multi_turn)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Function_call_with_gemini.cs?name=Multi_turn)]diff --git a/dotnet/website/articles/AutoGen.Gemini/Image-chat-with-gemini.md b/dotnet/website/articles/AutoGen.Gemini/Image-chat-with-gemini.mdindex c72159712..969bed123 100644--- a/dotnet/website/articles/AutoGen.Gemini/Image-chat-with-gemini.md+++ b/dotnet/website/articles/AutoGen.Gemini/Image-chat-with-gemini.md@@ -4,7 +4,7 @@ To run this example, you need to have a project on Google Cloud with access to V> [!NOTE]-> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs)+> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs)### Step 1: Install AutoGen.Gemini@@ -15,11 +15,11 @@ dotnet add package AutoGen.Gemini```### Step 2: Add using statement-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs?name=Using)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs?name=Using)]### Step 3: Create a Gemini agent-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs?name=Create_Gemini_Agent)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs?name=Create_Gemini_Agent)]### Step 4: Send image to Gemini-[!code-csharp[](../../../sample/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs?name=Send_Image_Request)]+[!code-csharp[](../../../samples/AutoGen.Gemini.Sample/Image_Chat_With_Vertex_Gemini.cs?name=Send_Image_Request)]diff --git a/dotnet/website/articles/AutoGen.Gemini/Overview.md b/dotnet/website/articles/AutoGen.Gemini/Overview.mdindex 3f921805a..eb55e49ba 100644--- a/dotnet/website/articles/AutoGen.Gemini/Overview.md+++ b/dotnet/website/articles/AutoGen.Gemini/Overview.md@@ -9,4 +9,4 @@ AutoGen.Gemini also provides the following middleware:## Examples-You can find more examples under the [gemini sample project](https://github.com/microsoft/autogen/tree/main/dotnet/sample/AutoGen.Gemini.Sample)\ No newline at end of file+You can find more examples under the [gemini sample project](https://github.com/microsoft/autogen/tree/main/dotnet/samples/AutoGen.Gemini.Sample)\ No newline at end of filediff --git a/dotnet/website/articles/AutoGen.Ollama/Chat-with-llama.md b/dotnet/website/articles/AutoGen.Ollama/Chat-with-llama.mdindex 731113e41..e8d7f0620 100644--- a/dotnet/website/articles/AutoGen.Ollama/Chat-with-llama.md+++ b/dotnet/website/articles/AutoGen.Ollama/Chat-with-llama.md@@ -3,7 +3,7 @@ This example shows how to use @AutoGen.Ollama.OllamaAgent to connect to Ollama sTo run this example, you need to have an Ollama server running aside and have `llama3:latest` model installed. For how to setup an Ollama server, please refer to [Ollama](https://ollama.com/).> [!NOTE]-> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs)+> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs)### Step 1: Install AutoGen.Ollama@@ -17,11 +17,11 @@ For how to install from nightly build, please refer to [Installation](../Install### Step 2: Add using statement-[!code-csharp[](../../../sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs?name=Using)]+[!code-csharp[](../../../samples/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs?name=Using)]### Step 3: Create and chat @AutoGen.Ollama.OllamaAgentIn this step, we create an @AutoGen.Ollama.OllamaAgent and connect it to the Ollama server.-[!code-csharp[](../../../sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs?name=Create_Ollama_Agent)]+[!code-csharp[](../../../samples/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs?name=Create_Ollama_Agent)]diff --git a/dotnet/website/articles/AutoGen.Ollama/Chat-with-llava.md b/dotnet/website/articles/AutoGen.Ollama/Chat-with-llava.mdindex 18a1900fa..5e7b751cd 100644--- a/dotnet/website/articles/AutoGen.Ollama/Chat-with-llava.md+++ b/dotnet/website/articles/AutoGen.Ollama/Chat-with-llava.md@@ -3,7 +3,7 @@ This sample shows how to use @AutoGen.Ollama.OllamaAgent to chat with LLaVA modeTo run this example, you need to have an Ollama server running aside and have `llava:latest` model installed. For how to setup an Ollama server, please refer to [Ollama](https://ollama.com/).> [!NOTE]-> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs)+> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs)### Step 1: Install AutoGen.Ollama@@ -17,13 +17,13 @@ For how to install from nightly build, please refer to [Installation](../Install### Step 2: Add using statement-[!code-csharp[](../../../sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs?name=Using)]+[!code-csharp[](../../../samples/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs?name=Using)]### Step 3: Create @AutoGen.Ollama.OllamaAgent-[!code-csharp[](../../../sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs?name=Create_Ollama_Agent)]+[!code-csharp[](../../../samples/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs?name=Create_Ollama_Agent)]### Step 4: Start MultiModal ChatLLaVA is a multimodal model that supports both text and image inputs. In this step, we create an image message along with a question about the image.-[!code-csharp[](../../../sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs?name=Send_Message)]\ No newline at end of file+[!code-csharp[](../../../samples/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs?name=Send_Message)]\ No newline at end of filediff --git a/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.md b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.mdindex 728cb7a56..9bdee1680 100644--- a/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.md+++ b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.md@@ -2,8 +2,8 @@ You can chat with @AutoGen.SemanticKernel.SemanticKernelAgent using both streamiThe following example shows how to create an @AutoGen.SemanticKernel.SemanticKernelAgent and chat with it using non-streaming method:-[!code-csharp[](../../../sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=create_semantic_kernel_agent)]+[!code-csharp[](../../../samples/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=create_semantic_kernel_agent)]@AutoGen.SemanticKernel.SemanticKernelAgent also supports streaming chat via @AutoGen.Core.IStreamingAgent.GenerateStreamingReplyAsync*.-[!code-csharp[](../../../sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=create_semantic_kernel_agent_streaming)]+[!code-csharp[](../../../samples/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=create_semantic_kernel_agent_streaming)]diff --git a/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.md b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.mdindex 139b6efa6..52259eda4 100644--- a/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.md+++ b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.md@@ -7,4 +7,4 @@>> Function call message type like @AutoGen.Core.ToolCallMessage and @AutoGen.Core.ToolCallResultMessage are not supported yet.-[!code-csharp[](../../../sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=register_semantic_kernel_chat_message_content_connector)]\ No newline at end of file+[!code-csharp[](../../../samples/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=register_semantic_kernel_chat_message_content_connector)]\ No newline at end of filediff --git a/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelChatAgent-simple-chat.md b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelChatAgent-simple-chat.mdindex dc282966c..22bdf9d07 100644--- a/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelChatAgent-simple-chat.md+++ b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelChatAgent-simple-chat.md@@ -3,20 +3,20 @@The following step-by-step example shows how to create an @AutoGen.SemanticKernel.SemanticKernelChatCompletionAgent and chat with it:> [!NOTE]-> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs).+> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs).### Step 1: add using statement-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Using)]+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Using)]### Step 2: create kernel-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Create_Kernel)]+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Create_Kernel)]### Step 3: create ChatCompletionAgent-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Create_ChatCompletionAgent)]+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Create_ChatCompletionAgent)]### Step 4: create @AutoGen.SemanticKernel.SemanticKernelChatCompletionAgentIn this step, we create an @AutoGen.SemanticKernel.SemanticKernelChatCompletionAgent and register it with @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector. The @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector will convert the message from AutoGen built-in message types to `ChatMessageContent` and vice versa.-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Create_SemanticKernelChatCompletionAgent)]+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Create_SemanticKernelChatCompletionAgent)]### Step 5: chat with @AutoGen.SemanticKernel.SemanticKernelChatCompletionAgent-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Send_Message)]\ No newline at end of file+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Send_Message)]\ No newline at end of filediff --git a/dotnet/website/articles/AutoGen.SemanticKernel/Use-kernel-plugin-in-other-agents.md b/dotnet/website/articles/AutoGen.SemanticKernel/Use-kernel-plugin-in-other-agents.mdindex 9e1d511c9..da4495649 100644--- a/dotnet/website/articles/AutoGen.SemanticKernel/Use-kernel-plugin-in-other-agents.md+++ b/dotnet/website/articles/AutoGen.SemanticKernel/Use-kernel-plugin-in-other-agents.md@@ -3,25 +3,25 @@ In semantic kernel, a kernel plugin is a collection of kernel functions that can`AutoGen.SemanticKernel` provides a middleware called @AutoGen.SemanticKernel.KernelPluginMiddleware that allows you to use semantic kernel plugins in other AutoGen agents like @AutoGen.OpenAI.OpenAIChatAgent. The following example shows how to define a simple plugin with a single `GetWeather` function and use it in @AutoGen.OpenAI.OpenAIChatAgent.> [!NOTE]-> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs)+> You can find the complete sample code [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs)### Step 1: add using statement-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Using)]+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Using)]### Step 2: create pluginIn this step, we create a simple plugin with a single `GetWeather` function that takes a location as input and returns the weather information for that location.-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Create_plugin)]+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Create_plugin)]### Step 3: create OpenAIChatAgent and use the pluginIn this step, we firstly create a @AutoGen.SemanticKernel.KernelPluginMiddleware and register the previous plugin with it. The `KernelPluginMiddleware` will load the plugin and make the functions available for use in other agents. Followed by creating an @AutoGen.OpenAI.OpenAIChatAgent and register it with the `KernelPluginMiddleware`.-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Use_plugin)]+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Use_plugin)]### Step 4: chat with OpenAIChatAgentIn this final step, we start the chat with the @AutoGen.OpenAI.OpenAIChatAgent by asking the weather in Seattle. The `OpenAIChatAgent` will use the `GetWeather` function from the plugin to get the weather information for Seattle.-[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Send_message)]\ No newline at end of file+[!code-csharp[](../../../samples/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Send_message)]\ No newline at end of filediff --git a/dotnet/website/articles/Built-in-messages.md b/dotnet/website/articles/Built-in-messages.mdindex 3a3754a30..0ddbd43fd 100644--- a/dotnet/website/articles/Built-in-messages.md+++ b/dotnet/website/articles/Built-in-messages.md@@ -30,8 +30,8 @@ AutoGen also introduces @AutoGen.Core.IStreamingMessage and @AutoGen.Core.IStrea#### UsageThe below code snippet shows how to print a streaming update to console and update the final result on the caller side.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/BuildInMessageCodeSnippet.cs?name=StreamingCallCodeSnippet)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/BuildInMessageCodeSnippet.cs?name=StreamingCallCodeSnippet)]If the agent returns a final result instead of the last update as the last message in the streaming call method, the caller can directly use the final result without assembling the final result from multiple updates.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/BuildInMessageCodeSnippet.cs?name=StreamingCallWithFinalMessage)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/BuildInMessageCodeSnippet.cs?name=StreamingCallWithFinalMessage)]\ No newline at end of filediff --git a/dotnet/website/articles/Consume-LLM-server-from-LM-Studio.md b/dotnet/website/articles/Consume-LLM-server-from-LM-Studio.mdindex dff384a26..61263cf51 100644--- a/dotnet/website/articles/Consume-LLM-server-from-LM-Studio.md+++ b/dotnet/website/articles/Consume-LLM-server-from-LM-Studio.md@@ -16,5 +16,5 @@ You can use @AutoGen.LMStudio.LMStudioAgent from `AutoGen.LMStudio` package to c### UsageThe following code shows how to use `LMStudioAgent` to write a piece of C# code to calculate 100th of fibonacci. Before running the code, make sure you have local server from LM Studio running on `localhost:1234`.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example08_LMStudio.cs?name=lmstudio_using_statements)]-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example08_LMStudio.cs?name=lmstudio_example_1)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example08_LMStudio.cs?name=lmstudio_using_statements)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example08_LMStudio.cs?name=lmstudio_example_1)]diff --git a/dotnet/website/articles/Create-a-user-proxy-agent.md b/dotnet/website/articles/Create-a-user-proxy-agent.mdindex 44441ed34..f7472165c 100644--- a/dotnet/website/articles/Create-a-user-proxy-agent.md+++ b/dotnet/website/articles/Create-a-user-proxy-agent.md@@ -10,7 +10,7 @@### Create a `UserProxyAgent` with `HumanInputMode` set to `ALWAYS`-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/UserProxyAgentCodeSnippet.cs?name=code_snippet_1)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/UserProxyAgentCodeSnippet.cs?name=code_snippet_1)]When running the code, the user proxy agent will ask user for input and use the input as response.\ No newline at end of filediff --git a/dotnet/website/articles/Create-an-agent.md b/dotnet/website/articles/Create-an-agent.mdindex 1b56666da..93535d3ef 100644--- a/dotnet/website/articles/Create-an-agent.md+++ b/dotnet/website/articles/Create-an-agent.md@@ -4,8 +4,8 @@## Create an `AssistantAgent` using OpenAI model.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.cs?name=code_snippet_1)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.cs?name=code_snippet_1)]## Create an `AssistantAgent` using Azure OpenAI model.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.cs?name=code_snippet_2)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/CreateAnAgent.cs?name=code_snippet_2)]diff --git a/dotnet/website/articles/Create-type-safe-function-call.md b/dotnet/website/articles/Create-type-safe-function-call.mdindex 82bc5e844..a12869661 100644--- a/dotnet/website/articles/Create-type-safe-function-call.md+++ b/dotnet/website/articles/Create-type-safe-function-call.md@@ -25,11 +25,11 @@ Then, create a `public partial` class to host the methods you want to use in AutFirstly, import the required namespaces:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs?name=weather_report_using_statement)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs?name=weather_report_using_statement)]Then, create a `WeatherReport` function and mark it with @AutoGen.Core.FunctionAttribute:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs?name=weather_report)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs?name=weather_report)]The source generator will generate the @AutoGen.Core.FunctionContract and function call wrapper for `WeatherReport` in another partial class based on its signature and structural comments. The @AutoGen.Core.FunctionContract is introduced by [#1736](https://github.com/microsoft/autogen/pull/1736) and contains all the necessary metadata such as function name, parameters, and return type. It is LLM independent and can be used to generate openai function definition or semantic kernel function. The function call wrapper is a helper class that provides a type-safe way to call the function.@@ -38,4 +38,4 @@ The source generator will generate the @AutoGen.Core.FunctionContract and functiThe following code shows how to generate openai function definition from the @AutoGen.Core.FunctionContract and call the function using the function call wrapper.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs?name=weather_report_consume)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs?name=weather_report_consume)]diff --git a/dotnet/website/articles/Function-call-with-ollama-and-litellm.md b/dotnet/website/articles/Function-call-with-ollama-and-litellm.mdindex 2dc595ba3..afde8a1d8 100644--- a/dotnet/website/articles/Function-call-with-ollama-and-litellm.md+++ b/dotnet/website/articles/Function-call-with-ollama-and-litellm.md@@ -1,6 +1,6 @@This example shows how to use function call with local LLM models where [Ollama](https://ollama.com/) as local model provider and [LiteLLM](https://docs.litellm.ai/docs/) proxy server which provides an openai-api compatible interface.-[](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs)+[](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs)To run this example, the following prerequisites are required:- Install [Ollama](https://ollama.com/) and [LiteLLM](https://docs.litellm.ai/docs/) on your local machine.@@ -64,16 +64,16 @@ And in your project file, enable structural xml document support by setting theCreate a `public partial` class to host the methods you want to use in AutoGen agents. The method has to be a `public` instance method and its return type must be `Task<string>`. After the methods are defined, mark them with `AutoGen.Core.FunctionAttribute` attribute.-[!code-csharp[Define WeatherReport function](../../sample/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs?name=Function)]+[!code-csharp[Define WeatherReport function](../../samples/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs?name=Function)]Then create a @AutoGen.Core.FunctionCallMiddleware and add the `WeatherReport` function to the middleware. The middleware will pass the `FunctionContract` to the agent when generating a response, and process the tool call response when receiving a `ToolCallMessage`.-[!code-csharp[Define WeatherReport function](../../sample/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs?name=Create_tools)]+[!code-csharp[Define WeatherReport function](../../samples/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs?name=Create_tools)]## Create @AutoGen.OpenAI.OpenAIChatAgent with `GetWeatherReport` tool and chat with itBecause LiteLLM proxy server is openai-api compatible, we can use @AutoGen.OpenAI.OpenAIChatAgent to connect to it as a third-party openai-api provider. The agent is also registered with a @AutoGen.Core.FunctionCallMiddleware which contains the `WeatherReport` tool. Therefore, the agent can call the `WeatherReport` tool when generating a response.-[!code-csharp[Create an agent with tools](../../sample/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs?name=Create_Agent)]+[!code-csharp[Create an agent with tools](../../samples/AutoGen.OpenAI.Sample/Tool_Call_With_Ollama_And_LiteLLM.cs?name=Create_Agent)]The reply from the agent will similar to the following:```bashdiff --git a/dotnet/website/articles/Group-chat.md b/dotnet/website/articles/Group-chat.mdindex 058f4f252..561065529 100644--- a/dotnet/website/articles/Group-chat.md+++ b/dotnet/website/articles/Group-chat.md@@ -33,7 +33,7 @@ flowchart LRThe code below shows how to create a dynamic group chat with @AutoGen.Core.GroupChat. In this example, we will create a dynamic group chat with 4 agents: `admin`, `coder`, `reviewer` and `runner`. In this case we don't pass a workflow to the group chat, so the group chat will use driven by the admin agent.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_group_chat)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_group_chat)]> [!TIP]> You can set up initial context for the group chat using @AutoGen.Core.GroupChatExtension.SendIntroduction*. The initial context can help group admin orchestrates the conversation flow.@@ -48,26 +48,26 @@ Output:The code below shows how to create `admin` agent. `admin` agent will create a task for group to work on and terminate the conversation when task is completed.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_admin)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_admin)]- Create coder agent-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_coder)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_coder)]- Create reviewer agentThe code below shows how to create `reviewer` agent. `reviewer` agent is a dotnet code reviewer who can review code written by `coder`. In this example, a `function` is used to examine if the code written by `coder` follows the condition.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=reviewer_function)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=reviewer_function)]> [!TIP]> You can use @AutoGen.Core.FunctionAttribute to generate type-safe function definition and function call wrapper for the function. For more information, please check out [Create type safe function call](./Create-type-safe-function-call.md).-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_reviewer)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_reviewer)]- Create runner agent> [!TIP]> `AutoGen` provides a built-in support for running code snippet. For more information, please check out [Execute code snippet](./Run-dotnet-code.md).-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_runner)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_runner)]diff --git a/dotnet/website/articles/Middleware-overview.md b/dotnet/website/articles/Middleware-overview.mdindex 42355de33..5ba4d822a 100644--- a/dotnet/website/articles/Middleware-overview.md+++ b/dotnet/website/articles/Middleware-overview.md@@ -8,15 +8,15 @@ Here are a few examples of how middleware is used in AutoGen.Net:To use middleware in an existing agent, you can either create a @AutoGen.Core.MiddlewareAgent on top of the original agent or register middleware functions to the original agent.### Create @AutoGen.Core.MiddlewareAgent on top of the original agent-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=create_middleware_agent_with_original_agent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=create_middleware_agent_with_original_agent)]### Register middleware functions to the original agent-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=register_middleware_agent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=register_middleware_agent)]## Short-circuit the next agentThe example below shows how to short-circuit the inner agent-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=short_circuit_middleware_agent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=short_circuit_middleware_agent)]> [!Note]> When multiple middleware functions are registered, the order of middleware functions is first registered, last invoked.@@ -24,4 +24,4 @@ The example below shows how to short-circuit the inner agent## Streaming middlewareYou can also modify the behavior of @AutoGen.Core.IStreamingAgent.GenerateStreamingReplyAsync* by registering streaming middleware to it. One example is @AutoGen.OpenAI.OpenAIChatRequestMessageConnector which converts `StreamingChatCompletionsUpdate` to one of `AutoGen.Core.TextMessageUpdate` or `AutoGen.Core.ToolCallMessageUpdate`.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=register_streaming_middleware)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=register_streaming_middleware)]\ No newline at end of filediff --git a/dotnet/website/articles/MistralChatAgent-count-token-usage.md b/dotnet/website/articles/MistralChatAgent-count-token-usage.mdindex 261845cf6..5d73fe7f1 100644--- a/dotnet/website/articles/MistralChatAgent-count-token-usage.md+++ b/dotnet/website/articles/MistralChatAgent-count-token-usage.md@@ -4,22 +4,22 @@ The following example shows how to create a `MistralAITokenCounterMiddleware` @ATo collect the token usage for the entire chat session, one easy solution is simply collect all the responses from agent and sum up the token usage for each response. To collect all the agent responses, we can create a middleware which simply saves all responses to a list and register it with the agent. To get the token usage information for each response, because in the example we are using @AutoGen.Mistral.MistralClientAgent, we can simply get the token usage from the response object.> [!NOTE]-> You can find the complete example in the [Example13_OpenAIAgent_JsonMode](https://github.com/microsoft/autogen/tree/main/dotnet/sample/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs).+> You can find the complete example in the [Example13_OpenAIAgent_JsonMode](https://github.com/microsoft/autogen/tree/main/dotnet/samples/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs).- Step 1: Adding using statement-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=using_statements)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=using_statements)]- Step 2: Create a `MistralAITokenCounterMiddleware` class which implements @AutoGen.Core.IMiddleware. This middleware will collect all the responses from the agent and sum up the token usage for each response.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=token_counter_middleware)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=token_counter_middleware)]- Step 3: Create a `MistralClientAgent`-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=create_mistral_client_agent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=create_mistral_client_agent)]- Step 4: Register the `MistralAITokenCounterMiddleware` with the `MistralClientAgent`. Note that the order of each middlewares matters. The token counter middleware needs to be registered before `mistralMessageConnector` because it collects response only when the responding message type is `IMessage<ChatCompletionResponse>` while the `mistralMessageConnector` will convert `IMessage<ChatCompletionResponse>` to one of @AutoGen.Core.TextMessage, @AutoGen.Core.ToolCallMessage or @AutoGen.Core.ToolCallResultMessage.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=register_middleware)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=register_middleware)]- Step 5: Chat with the `MistralClientAgent` and get the token usage information from the response object.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=chat_with_agent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example14_MistralClientAgent_TokenCount.cs?name=chat_with_agent)]### OutputWhen running the example, the completion token count will be printed to the console.diff --git a/dotnet/website/articles/MistralChatAgent-use-function-call.md b/dotnet/website/articles/MistralChatAgent-use-function-call.mdindex 56ea0ffd0..3dd3c6f6a 100644--- a/dotnet/website/articles/MistralChatAgent-use-function-call.md+++ b/dotnet/website/articles/MistralChatAgent-use-function-call.md@@ -18,24 +18,24 @@ dotnet add package AutoGen.SourceGenerator> If you are using VSCode as your editor, you may need to restart the editor to see the generated code.Import the required namespace-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=using_statement)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=using_statement)]Then define a public partial `MistralAgentFunction` class and `GetWeather` method. The `GetWeather` method is a simple function that returns the weather of a given location that marked with @AutoGen.Core.FunctionAttribute. Marking the class as `public partial` together with the @AutoGen.Core.FunctionAttribute attribute allows the source generator to generate the @AutoGen.Core.FunctionContract for the `GetWeather` method.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=weather_function)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=weather_function)]Then create an @AutoGen.Mistral.MistralClientAgent and register it with @AutoGen.Mistral.Extension.MistralAgentExtension.RegisterMessageConnector* so it can support @AutoGen.Core.ToolCallMessage and @AutoGen.Core.ToolCallResultMessage. These message types are necessary to use @AutoGen.Core.FunctionCallMiddleware, which provides support for processing and invoking function calls.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=create_mistral_function_call_agent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=create_mistral_function_call_agent)]Then create an @AutoGen.Core.FunctionCallMiddleware with `GetWeather` function When creating the middleware, we also pass a `functionMap` object which means the function will be automatically invoked when the agent replies a `GetWeather` function call.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=create_get_weather_function_call_middleware)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=create_get_weather_function_call_middleware)]After the function call middleware is created, register it with the agent so the `GetWeather` function will be passed to agent during chat completion.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=register_function_call_middleware)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=register_function_call_middleware)]Finally, you can chat with the @AutoGen.Mistral.MistralClientAgent about weather! The agent will automatically invoke the `GetWeather` function to "get" the weather information and return the result.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=send_message_with_function_call)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/MistralAICodeSnippet.cs?name=send_message_with_function_call)]\ No newline at end of filediff --git a/dotnet/website/articles/OpenAIChatAgent-connect-to-third-party-api.md b/dotnet/website/articles/OpenAIChatAgent-connect-to-third-party-api.mdindex 0873765b1..a2e3468c2 100644--- a/dotnet/website/articles/OpenAIChatAgent-connect-to-third-party-api.md+++ b/dotnet/website/articles/OpenAIChatAgent-connect-to-third-party-api.md@@ -1,6 +1,6 @@The following example shows how to connect to third-party OpenAI API using @AutoGen.OpenAI.OpenAIChatAgent.-[](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs)+[](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs)## OverviewA lot of LLM applications/platforms support spinning up a chat server that is compatible with OpenAI API, such as LM Studio, Ollama, Mistral etc. This means that you can connect to these servers using the @AutoGen.OpenAI.OpenAIChatAgent.@@ -24,24 +24,24 @@ ollama serve## Steps- Import the required namespaces:-[!code-csharp[](../../sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs?name=using_statement)]+[!code-csharp[](../../samples/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs?name=using_statement)]- Create a `CustomHttpClientHandler` class.The `CustomHttpClientHandler` class is used to customize the HttpClientHandler. In this example, we override the `SendAsync` method to redirect the request to local Ollama server, which is running on `http://localhost:11434`.-[!code-csharp[](../../sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs?name=CustomHttpClientHandler)]+[!code-csharp[](../../samples/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs?name=CustomHttpClientHandler)]- Create an `OpenAIChatAgent` instance and connect to the third-party API.Then create an @AutoGen.OpenAI.OpenAIChatAgent instance and connect to the OpenAI API from Ollama. You can customize the transport behavior of `OpenAIClient` by passing a customized `HttpClientTransport` instance. In the customized `HttpClientTransport` instance, we pass the `CustomHttpClientHandler` we just created which redirects all openai chat requests to the local Ollama server.-[!code-csharp[](../../sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs?name=create_agent)]+[!code-csharp[](../../samples/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs?name=create_agent)]- Chat with the `OpenAIChatAgent`.Finally, you can start chatting with the agent. In this example, we send a coding question to the agent and get the response.-[!code-csharp[](../../sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs?name=send_message)]+[!code-csharp[](../../samples/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs?name=send_message)]## Sample OutputThe following is the sample output of the code snippet above:diff --git a/dotnet/website/articles/OpenAIChatAgent-simple-chat.md b/dotnet/website/articles/OpenAIChatAgent-simple-chat.mdindex 867aff24a..7d7b08364 100644--- a/dotnet/website/articles/OpenAIChatAgent-simple-chat.md+++ b/dotnet/website/articles/OpenAIChatAgent-simple-chat.md@@ -1,11 +1,11 @@The following example shows how to create an @AutoGen.OpenAI.OpenAIChatAgent and chat with it.Firsly, import the required namespaces:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=using_statement)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=using_statement)]Then, create an @AutoGen.OpenAI.OpenAIChatAgent and chat with it:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=create_openai_chat_agent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=create_openai_chat_agent)]@AutoGen.OpenAI.OpenAIChatAgent also supports streaming chat via @AutoGen.Core.IAgent.GenerateStreamingReplyAsync*.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=create_openai_chat_agent_streaming)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=create_openai_chat_agent_streaming)]\ No newline at end of filediff --git a/dotnet/website/articles/OpenAIChatAgent-support-more-messages.md b/dotnet/website/articles/OpenAIChatAgent-support-more-messages.mdindex af6e60682..7808ebe93 100644--- a/dotnet/website/articles/OpenAIChatAgent-support-more-messages.md+++ b/dotnet/website/articles/OpenAIChatAgent-support-more-messages.md@@ -1,6 +1,6 @@By default, @AutoGen.OpenAI.OpenAIChatAgent only supports the @AutoGen.Core.IMessage<T> type where `T` is original request or response message from `Azure.AI.OpenAI`. To support more AutoGen built-in message types like @AutoGen.Core.TextMessage, @AutoGen.Core.ImageMessage, @AutoGen.Core.MultiModalMessage and so on, you can register the agent with @AutoGen.OpenAI.OpenAIChatRequestMessageConnector. The @AutoGen.OpenAI.OpenAIChatRequestMessageConnector will convert the message from AutoGen built-in message types to `Azure.AI.OpenAI.ChatRequestMessage` and vice versa.import the required namespaces:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=using_statement)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=using_statement)]-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=register_openai_chat_message_connector)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=register_openai_chat_message_connector)]\ No newline at end of filediff --git a/dotnet/website/articles/OpenAIChatAgent-use-function-call.md b/dotnet/website/articles/OpenAIChatAgent-use-function-call.mdindex da12ae9e9..d41ce0b27 100644--- a/dotnet/website/articles/OpenAIChatAgent-use-function-call.md+++ b/dotnet/website/articles/OpenAIChatAgent-use-function-call.md@@ -15,19 +15,19 @@ Firstly, you need to install the following packages:> If you are using VSCode as your editor, you may need to restart the editor to see the generated code.Firstly, import the required namespaces:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=using_statement)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=using_statement)]Then, define a public partial class: `Function` with `GetWeather` method-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=weather_function)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=weather_function)]Then, create an @AutoGen.OpenAI.OpenAIChatAgent and register it with @AutoGen.OpenAI.OpenAIChatRequestMessageConnector so it can support @AutoGen.Core.ToolCallMessage and @AutoGen.Core.ToolCallResultMessage. These message types are necessary to use @AutoGen.Core.FunctionCallMiddleware, which provides support for processing and invoking function calls.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=openai_chat_agent_get_weather_function_call)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=openai_chat_agent_get_weather_function_call)]Then, create an @AutoGen.Core.FunctionCallMiddleware with `GetWeather` function and register it with the agent above. When creating the middleware, we also pass a `functionMap` to @AutoGen.Core.FunctionCallMiddleware, which means the function will be automatically invoked when the agent replies a `GetWeather` function call.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=create_function_call_middleware)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=create_function_call_middleware)]Finally, you can chat with the @AutoGen.OpenAI.OpenAIChatAgent and invoke the `GetWeather` function.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=chat_agent_send_function_call)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/OpenAICodeSnippet.cs?name=chat_agent_send_function_call)]\ No newline at end of filediff --git a/dotnet/website/articles/OpenAIChatAgent-use-json-mode.md b/dotnet/website/articles/OpenAIChatAgent-use-json-mode.mdindex 22f0ced00..f22be28be 100644--- a/dotnet/website/articles/OpenAIChatAgent-use-json-mode.md+++ b/dotnet/website/articles/OpenAIChatAgent-use-json-mode.md@@ -1,6 +1,6 @@The following example shows how to enable JSON mode in @AutoGen.OpenAI.OpenAIChatAgent.-[](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs)+[](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.OpenAI.Sample/Use_Json_Mode.cs)## What is JSON mode?JSON mode is a new feature in OpenAI which allows you to instruct model to always respond with a valid JSON object. This is useful when you want to constrain the model output to JSON format only.@@ -12,15 +12,15 @@ JSON mode is a new feature in OpenAI which allows you to instruct model to alwayTo enable JSON mode for @AutoGen.OpenAI.OpenAIChatAgent, set `responseFormat` to `ChatCompletionsResponseFormat.JsonObject` when creating the agent. Note that when enabling JSON mode, you also need to instruct the agent to output JSON format in its system message.-[!code-csharp[](../../sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs?name=create_agent)]+[!code-csharp[](../../samples/AutoGen.OpenAI.Sample/Use_Json_Mode.cs?name=create_agent)]After enabling JSON mode, the `openAIClientAgent` will always respond in JSON format when it receives a message.-[!code-csharp[](../../sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs?name=chat_with_agent)]+[!code-csharp[](../../samples/AutoGen.OpenAI.Sample/Use_Json_Mode.cs?name=chat_with_agent)]When running the example, the output from `openAIClientAgent` will be a valid JSON object which can be parsed as `Person` class defined below. Note that in the output, the `address` field is missing because the address information is not provided in user input.-[!code-csharp[](../../sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs?name=person_class)]+[!code-csharp[](../../samples/AutoGen.OpenAI.Sample/Use_Json_Mode.cs?name=person_class)]The output will be:```bashdiff --git a/dotnet/website/articles/Print-message-middleware.md b/dotnet/website/articles/Print-message-middleware.mdindex b0115970d..b269973d7 100644--- a/dotnet/website/articles/Print-message-middleware.md+++ b/dotnet/website/articles/Print-message-middleware.md@@ -13,7 +13,7 @@## Use @AutoGen.Core.PrintMessageMiddleware in an agentYou can use @AutoGen.Core.PrintMessageMiddlewareExtension.RegisterPrintMessage* to register the @AutoGen.Core.PrintMessageMiddleware to an agent.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/PrintMessageMiddlewareCodeSnippet.cs?name=PrintMessageMiddleware)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/PrintMessageMiddlewareCodeSnippet.cs?name=PrintMessageMiddleware)]@AutoGen.Core.PrintMessageMiddlewareExtension.RegisterPrintMessage* will format the message and print it to console@@ -22,6 +22,6 @@ You can use @AutoGen.Core.PrintMessageMiddlewareExtension.RegisterPrintMessage*@AutoGen.Core.PrintMessageMiddleware also supports streaming message types like @AutoGen.Core.TextMessageUpdate and @AutoGen.Core.ToolCallMessageUpdate. If you register @AutoGen.Core.PrintMessageMiddleware to a @AutoGen.Core.IStreamingAgent, it will format the streaming message and print it to console if the message is of supported type.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/PrintMessageMiddlewareCodeSnippet.cs?name=print_message_streaming)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/PrintMessageMiddlewareCodeSnippet.cs?name=print_message_streaming)]diff --git a/dotnet/website/articles/Roundrobin-chat.md b/dotnet/website/articles/Roundrobin-chat.mdindex 20fd19b4d..24cc52ecb 100644--- a/dotnet/website/articles/Roundrobin-chat.md+++ b/dotnet/website/articles/Roundrobin-chat.md@@ -10,23 +10,23 @@ flowchart LR```> [!NOTE]-> Complete code can be found in [Example11_Sequential_GroupChat_Example](https://github.com/microsoft/autogen/blob/dotnet/dotnet/sample/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs);+> Complete code can be found in [Example11_Sequential_GroupChat_Example](https://github.com/microsoft/autogen/blob/dotnet/dotnet/samples/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs);Step 1: Add required using statements-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs?name=using_statement)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs?name=using_statement)]Step 2: Create a `bingSearch` agent using @AutoGen.SemanticKernel.SemanticKernelAgent-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs?name=CreateBingSearchAgent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs?name=CreateBingSearchAgent)]Step 3: Create a `summarization` agent using @AutoGen.SemanticKernel.SemanticKernelAgent-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs?name=CreateSummarizerAgent)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs?name=CreateSummarizerAgent)]Step 4: Create a @AutoGen.Core.RoundRobinGroupChat and add `bingSearch` and `summarization` agents to it-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs?name=Sequential_GroupChat_Example)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example11_Sequential_GroupChat_Example.cs?name=Sequential_GroupChat_Example)]Output:diff --git a/dotnet/website/articles/Run-dotnet-code.md b/dotnet/website/articles/Run-dotnet-code.mdindex bee7e1aa3..a32b77a02 100644--- a/dotnet/website/articles/Run-dotnet-code.md+++ b/dotnet/website/articles/Run-dotnet-code.md@@ -6,7 +6,7 @@ More languages will be supported in the future.## What is a code snippet?A code snippet in agent response is a code block with a language identifier. For example:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs?name=code_snippet_1_3)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs?name=code_snippet_1_3)]## Why running code snippet is useful?The ability of running code snippet can greatly extend the ability of an agent. Because it enables agent to resolve tasks by writing code and run it, which is much more powerful than just returning a text response.@@ -24,10 +24,10 @@ The built-in feature of running dotnet code snippet is provided by [dotnet-inter```Then you can use @AutoGen.DotnetInteractive.DotnetInteractiveKernelBuilder* to create a in-process dotnet-interactive composite kernel with C# and F# kernels.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs?name=code_snippet_1_1)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs?name=code_snippet_1_1)]After that, use @AutoGen.DotnetInteractive.Extension.RunSubmitCodeCommandAsync* method to run code snippet. The method will return the result of the code snippet.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs?name=code_snippet_1_2)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs?name=code_snippet_1_2)]## Run python code snippetTo run python code, firstly you need to have python installed on your machine, then you need to set up ipykernel and jupyter in your environment.@@ -53,9 +53,9 @@ Available kernels:Then you can add the python kernel to the dotnet-interactive composite kernel by calling `AddPythonKernel` method.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs?name=code_snippet_1_4)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/RunCodeSnippetCodeSnippet.cs?name=code_snippet_1_4)]## Further readingYou can refer to the following examples for running code snippet in agentic workflow:-- Dynamic_GroupChat_Coding_Task: [](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.BasicSample/Example04_Dynamic_GroupChat_Coding_Task.cs)-- Dynamic_GroupChat_Calculate_Fibonacci: [](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.BasicSample/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs)+- Dynamic_GroupChat_Coding_Task: [](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.BasicSample/Example04_Dynamic_GroupChat_Coding_Task.cs)+- Dynamic_GroupChat_Calculate_Fibonacci: [](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.BasicSample/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs)diff --git a/dotnet/website/articles/Two-agent-chat.md b/dotnet/website/articles/Two-agent-chat.mdindex 2fe5f8401..693692ea6 100644--- a/dotnet/website/articles/Two-agent-chat.md+++ b/dotnet/website/articles/Two-agent-chat.md@@ -16,4 +16,4 @@ The following example shows how to start a conversation between the teacher agen> [!NOTE]> The teacher agent uses @AutoGen.Core.MiddlewareExtension.RegisterPostProcess* to register a post process function which returns a hard-coded termination message when a certain condition is met. Comparing with putting the @AutoGen.Core.GroupChatExtension.TERMINATE keyword in the prompt, this approach is more robust especially when a weaker LLM model is used.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example02_TwoAgent_MathChat.cs?name=code_snippet_1)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example02_TwoAgent_MathChat.cs?name=code_snippet_1)]diff --git a/dotnet/website/articles/Use-function-call.md b/dotnet/website/articles/Use-function-call.mdindex 8c0f172e7..e34c41a8d 100644--- a/dotnet/website/articles/Use-function-call.md+++ b/dotnet/website/articles/Use-function-call.md@@ -12,32 +12,32 @@ Typically, there are three ways to pass a function definition to an agent to enaIn some agents like @AutoGen.AssistantAgent or @AutoGen.OpenAI.GPTAgent, you can pass function definitions when creating the agentSuppose the `TypeSafeFunctionCall` is defined in the following code snippet:-[!code-csharp[TypeSafeFunctionCall](../../sample/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs?name=weather_report)]+[!code-csharp[TypeSafeFunctionCall](../../samples/AutoGen.BasicSamples/CodeSnippet/TypeSafeFunctionCallCodeSnippet.cs?name=weather_report)]You can then pass the `WeatherReport` to the agent when creating it:-[!code-csharp[assistant agent](../../sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=code_snippet_4)]+[!code-csharp[assistant agent](../../samples/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=code_snippet_4)]## Passing function definitions in @AutoGen.Core.GenerateReplyOptions when invoking an agentYou can also pass function definitions in @AutoGen.Core.GenerateReplyOptions when invoking an agent. This is useful when you want to override the function definitions passed to the agent when creating it.-[!code-csharp[assistant agent](../../sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=overrider_function_contract)]+[!code-csharp[assistant agent](../../samples/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=overrider_function_contract)]## Register an agent with @AutoGen.Core.FunctionCallMiddleware to process and invoke function callsYou can also register an agent with @AutoGen.Core.FunctionCallMiddleware to process and invoke function calls. This is useful when you want to process and invoke function calls in a more flexible way.-[!code-csharp[assistant agent](../../sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=register_function_call_middleware)]+[!code-csharp[assistant agent](../../samples/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=register_function_call_middleware)]## Invoke function call inside an agentTo invoke a function instead of returning the function call object, you can pass its function call wrapper to the agent via `functionMap`.You can then pass the `WeatherReportWrapper` to the agent via `functionMap`:-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=code_snippet_6)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=code_snippet_6)]When a function call object is returned, the agent will invoke the function and uses the return value as response rather than returning the function call object.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=code_snippet_6_1)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=code_snippet_6_1)]## Invoke function call by another agentYou can also use another agent to invoke the function call from one agent. This is a useful pattern in two-agent chat, where one agent is used as a function proxy to invoke the function call from another agent. Once the function call is invoked, the result can be returned to the original agent for further processing.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=two_agent_weather_chat)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=two_agent_weather_chat)]\ No newline at end of filediff --git a/dotnet/website/articles/Use-graph-in-group-chat.md b/dotnet/website/articles/Use-graph-in-group-chat.mdindex 1cc97e50f..055780351 100644--- a/dotnet/website/articles/Use-graph-in-group-chat.md+++ b/dotnet/website/articles/Use-graph-in-group-chat.md@@ -18,8 +18,8 @@ The following code shows how to create a graph that represents the diagram above> [!TIP]> @AutoGen.Core.Graph supports conditional transitions. To create a conditional transition, you can pass a lambda function to `canTransitionAsync` when creating a @AutoGen.Core.Transition. The lambda function should return a boolean value indicating if the transition can be taken.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_workflow)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_workflow)]Once the graph is created, you can pass it to the group chat. The group chat will then use the graph along with admin agent to orchestrate the conversation flow.-[!code-csharp[](../../sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_group_chat_with_workflow)]\ No newline at end of file+[!code-csharp[](../../samples/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs?name=create_group_chat_with_workflow)]\ No newline at end of filediff --git a/dotnet/website/articles/getting-start.md b/dotnet/website/articles/getting-start.mdindex 9db8494ff..fe10a597a 100644--- a/dotnet/website/articles/getting-start.md+++ b/dotnet/website/articles/getting-start.md@@ -14,13 +14,13 @@ dotnet add package AutoGenThen you can start with the following code snippet to create a conversable agent and chat with it.-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/GetStartCodeSnippet.cs?name=snippet_GetStartCodeSnippet)]-[!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/GetStartCodeSnippet.cs?name=code_snippet_1)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/GetStartCodeSnippet.cs?name=snippet_GetStartCodeSnippet)]+[!code-csharp[](../../samples/AutoGen.BasicSamples/CodeSnippet/GetStartCodeSnippet.cs?name=code_snippet_1)]### TutorialGetting started with AutoGen.Net by following the [tutorial](../tutorial/Chat-with-an-agent.md) series.### Examples-You can find more examples under the [sample project](https://github.com/microsoft/autogen/tree/dotnet/dotnet/sample/AutoGen.BasicSamples).+You can find more examples under the [sample project](https://github.com/microsoft/autogen/tree/dotnet/dotnet/samples/AutoGen.BasicSamples).### Report a bug or request a featureYou can report a bug or request a feature by creating a new issue in the [github issue](https://github.com/microsoft/autogen/issues) and specifying label the label "donet"diff --git a/dotnet/website/release_note/0.2.0.md b/dotnet/website/release_note/0.2.0.mdindex ceff532b6..991e2553c 100644--- a/dotnet/website/release_note/0.2.0.md+++ b/dotnet/website/release_note/0.2.0.md@@ -1,7 +1,7 @@# Release Notes for AutoGen.Net v0.2.0 🚀## New Features 🌟-- **OpenAI Structural Format Output**: Added support for structural output format in the OpenAI integration. You can check out the example [here](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Structural_Output.cs) ([#3482](https://github.com/microsoft/autogen/issues/3482)).+- **OpenAI Structural Format Output**: Added support for structural output format in the OpenAI integration. You can check out the example [here](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.OpenAI.Sample/Structural_Output.cs) ([#3482](https://github.com/microsoft/autogen/issues/3482)).- **Structural Output Configuration**: Introduced a property for overriding the structural output schema when generating replies with `GenerateReplyOption` ([#3436](https://github.com/microsoft/autogen/issues/3436)).## Bug Fixes 🐛diff --git a/dotnet/website/release_note/0.2.1.md b/dotnet/website/release_note/0.2.1.mdindex 353cdd080..03e333d7e 100644--- a/dotnet/website/release_note/0.2.1.md+++ b/dotnet/website/release_note/0.2.1.md@@ -4,4 +4,4 @@- **Support for OpenAi o1-preview** : Added support for OpenAI o1-preview model ([#3522](https://github.com/microsoft/autogen/issues/3522))## Example 📚-- **OpenAI o1-preview**: [Connect_To_OpenAI_o1_preview](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_OpenAI_o1_preview.cs)\ No newline at end of file+- **OpenAI o1-preview**: [Connect_To_OpenAI_o1_preview](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.OpenAI.Sample/Connect_To_OpenAI_o1_preview.cs)\ No newline at end of filediff --git a/dotnet/website/release_note/update.md b/dotnet/website/release_note/update.mdindex 7c81130ed..d3f7b4f59 100644--- a/dotnet/website/release_note/update.md+++ b/dotnet/website/release_note/update.md@@ -1,7 +1,7 @@##### Update on 0.0.15 (2024-06-13) Milestone: [AutoGen.Net 0.0.15](https://github.com/microsoft/autogen/milestone/3)###### Highlights-- [Issue 2851](https://github.com/microsoft/autogen/issues/2851) `AutoGen.Gemini` package for Gemini support. Examples can be found [here](https://github.com/microsoft/autogen/tree/main/dotnet/sample/AutoGen.Gemini.Sample)+- [Issue 2851](https://github.com/microsoft/autogen/issues/2851) `AutoGen.Gemini` package for Gemini support. Examples can be found [here](https://github.com/microsoft/autogen/tree/main/dotnet/samples/AutoGen.Gemini.Sample)##### Update on 0.0.14 (2024-05-28)###### New featuresdiff --git a/dotnet/website/tutorial/Chat-with-an-agent.md b/dotnet/website/tutorial/Chat-with-an-agent.mdindex 11a73de34..32b375a51 100644--- a/dotnet/website/tutorial/Chat-with-an-agent.md+++ b/dotnet/website/tutorial/Chat-with-an-agent.md@@ -11,7 +11,7 @@ This tutorial shows how to generate response using an @AutoGen.Core.IAgent by ta> - @AutoGen.Gemini.GeminiChatAgent> [!NOTE]-> The complete code example can be found in [Chat_With_Agent.cs](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs)+> The complete code example can be found in [Chat_With_Agent.cs](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs)## Step 1: Install AutoGen@@ -23,7 +23,7 @@ dotnet add package AutoGen## Step 2: add Using Statements-[!code-csharp[Using Statements](../../sample/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Using)]+[!code-csharp[Using Statements](../../samples/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Using)]## Step 3: Create an @AutoGen.OpenAI.OpenAIChatAgent@@ -31,20 +31,20 @@ dotnet add package AutoGen> The @AutoGen.OpenAI.Extension.OpenAIAgentExtension.RegisterMessageConnector* method registers an @AutoGen.OpenAI.OpenAIChatRequestMessageConnector middleware which converts OpenAI message types to AutoGen message types. This step is necessary when you want to use AutoGen built-in message types like @AutoGen.Core.TextMessage, @AutoGen.Core.ImageMessage, etc.> For more information, see [Built-in-messages](../articles/Built-in-messages.md)-[!code-csharp[Create an OpenAIChatAgent](../../sample/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Create_Agent)]+[!code-csharp[Create an OpenAIChatAgent](../../samples/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Create_Agent)]## Step 4: Generate ResponseTo generate response, you can use one of the overloaded method of @AutoGen.Core.AgentExtension.SendAsync* method. The following code shows how to generate response with text message:-[!code-csharp[Generate Response](../../sample/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Chat_With_Agent)]+[!code-csharp[Generate Response](../../samples/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Chat_With_Agent)]To generate response with chat history, you can pass the chat history to the @AutoGen.Core.AgentExtension.SendAsync* method:-[!code-csharp[Generate Response with Chat History](../../sample/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Chat_With_History)]+[!code-csharp[Generate Response with Chat History](../../samples/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Chat_With_History)]To streamingly generate response, use @AutoGen.Core.IStreamingAgent.GenerateStreamingReplyAsync*-[!code-csharp[Generate Streaming Response](../../sample/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Streaming_Chat)]+[!code-csharp[Generate Streaming Response](../../samples/AutoGen.BasicSamples/GettingStart/Chat_With_Agent.cs?name=Streaming_Chat)]## Further Reading- [Chat with google gemini](../articles/AutoGen.Gemini/Chat-with-google-gemini.md)diff --git a/dotnet/website/tutorial/Create-agent-with-tools.md b/dotnet/website/tutorial/Create-agent-with-tools.mdindex 5d6318903..dd2103e90 100644--- a/dotnet/website/tutorial/Create-agent-with-tools.md+++ b/dotnet/website/tutorial/Create-agent-with-tools.md@@ -14,7 +14,7 @@ Tools are pre-defined functions in user's project that agent can invoke. Agent c> This tutorial uses the latest `GPT-3.5-turbo` as example.> [!NOTE]-> The complete code example can be found in [Use_Tools_With_Agent.cs](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs)+> The complete code example can be found in [Use_Tools_With_Agent.cs](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs)## Key Concepts- @AutoGen.Core.FunctionContract: The contract of a function that agent can invoke. It contains the function name, description, parameters schema, and return type.@@ -45,21 +45,21 @@ Also, you might need to enable structural xml document support by setting `Gener## Add Using Statements-[!code-csharp[Using Statements](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Using)]+[!code-csharp[Using Statements](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Using)]## Create agentCreate an @AutoGen.OpenAI.OpenAIChatAgent with `GPT-3.5-turbo` as the backend LLM model.-[!code-csharp[Create an agent with tools](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Create_Agent)]+[!code-csharp[Create an agent with tools](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Create_Agent)]## Define `Tool` class and create toolsCreate a `public partial` class to host the tools you want to use in AutoGen agents. The method has to be a `public` instance method and its return type must be `Task<string>`. After the methods is defined, mark them with @AutoGen.Core.FunctionAttribute attribute.In the following example, we define a `GetWeather` tool that returns the weather information of a city.-[!code-csharp[Define Tool class](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Tools)]-[!code-csharp[Create tools](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Create_tools)]+[!code-csharp[Define Tool class](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Tools)]+[!code-csharp[Create tools](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Create_tools)]## Tool call without auto-invokeIn this case, when receiving a @AutoGen.Core.ToolCallMessage, the agent will not automatically invoke the tool. Instead, the agent will return the original message back to the user. The user can then decide whether to invoke the tool or not.@@ -68,11 +68,11 @@ In this case, when receiving a @AutoGen.Core.ToolCallMessage, the agent will notTo implement this, you can create the @AutoGen.Core.FunctionCallMiddleware without passing the `functionMap` parameter to the constructor so that the middleware will not automatically invoke the tool once it receives a @AutoGen.Core.ToolCallMessage from its inner agent.-[!code-csharp[Single-turn tool call without auto-invoke](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Create_no_invoke_middleware)]+[!code-csharp[Single-turn tool call without auto-invoke](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Create_no_invoke_middleware)]After creating the function call middleware, you can register it to the agent using `RegisterMiddleware` method, which will return a new agent which can use the methods defined in the `Tool` class.-[!code-csharp[Generate Response](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Single_Turn_No_Invoke)]+[!code-csharp[Generate Response](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Single_Turn_No_Invoke)]## Tool call with auto-invokeIn this case, the agent will automatically invoke the tool when receiving a @AutoGen.Core.ToolCallMessage and return the @AutoGen.Core.ToolCallAggregateMessage which contains both the tool call request and the tool call result.@@ -81,21 +81,21 @@ In this case, the agent will automatically invoke the tool when receiving a @AutTo implement this, you can create the @AutoGen.Core.FunctionCallMiddleware with the `functionMap` parameter so that the middleware will automatically invoke the tool once it receives a @AutoGen.Core.ToolCallMessage from its inner agent.-[!code-csharp[Single-turn tool call with auto-invoke](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Create_auto_invoke_middleware)]+[!code-csharp[Single-turn tool call with auto-invoke](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Create_auto_invoke_middleware)]After creating the function call middleware, you can register it to the agent using `RegisterMiddleware` method, which will return a new agent which can use the methods defined in the `Tool` class.-[!code-csharp[Generate Response](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Single_Turn_Auto_Invoke)]+[!code-csharp[Generate Response](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Single_Turn_Auto_Invoke)]## Send the tool call result back to LLM to generate further responseIn some cases, you may want to send the tool call result back to the LLM to generate further response. To do this, you can send the tool call response from agent back to the LLM by calling the `SendAsync` method of the agent.-[!code-csharp[Generate Response](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Multi_Turn_Tool_Call)]+[!code-csharp[Generate Response](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=Multi_Turn_Tool_Call)]## Parallel tool callSome LLM models support parallel tool call, which returns multiple tool calls in one single message. Note that @AutoGen.Core.FunctionCallMiddleware has already handled the parallel tool call for you. When it receives a @AutoGen.Core.ToolCallMessage that contains multiple tool calls, it will automatically invoke all the tools in the sequantial order and return the @AutoGen.Core.ToolCallAggregateMessage which contains all the tool call requests and results.-[!code-csharp[Generate Response](../../sample/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=parallel_tool_call)]+[!code-csharp[Generate Response](../../samples/AutoGen.BasicSamples/GettingStart/Use_Tools_With_Agent.cs?name=parallel_tool_call)]## Further Reading- [Function call with openai](../articles/OpenAIChatAgent-use-function-call.md)diff --git a/dotnet/website/tutorial/Image-chat-with-agent.md b/dotnet/website/tutorial/Image-chat-with-agent.mdindex 1e6d4b0ae..c6398d21e 100644--- a/dotnet/website/tutorial/Image-chat-with-agent.md+++ b/dotnet/website/tutorial/Image-chat-with-agent.md@@ -11,7 +11,7 @@ This tutorial shows how to perform image chat with an agent using the @AutoGen.O> In this example, we are using the gpt-4o model as the backend model for the agent.> [!NOTE]-> The complete code example can be found in [Image_Chat_With_Agent.cs](https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs)+> The complete code example can be found in [Image_Chat_With_Agent.cs](https://github.com/microsoft/autogen/blob/main/dotnet/samples/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs)## Step 1: Install AutoGen@@ -23,27 +23,27 @@ dotnet add package AutoGen## Step 2: Add Using Statements-[!code-csharp[Using Statements](../../sample/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Using)]+[!code-csharp[Using Statements](../../samples/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Using)]## Step 3: Create an @AutoGen.OpenAI.OpenAIChatAgent-[!code-csharp[Create an OpenAIChatAgent](../../sample/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Create_Agent)]+[!code-csharp[Create an OpenAIChatAgent](../../samples/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Create_Agent)]## Step 4: Prepare Image MessageIn AutoGen, you can create an image message using either @AutoGen.Core.ImageMessage or @AutoGen.Core.MultiModalMessage. The @AutoGen.Core.ImageMessage takes a single image as input, whereas the @AutoGen.Core.MultiModalMessage allows you to pass multiple modalities like text or image.Here is how to create an image message using @AutoGen.Core.ImageMessage:-[!code-csharp[Create Image Message](../../sample/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Prepare_Image_Input)]+[!code-csharp[Create Image Message](../../samples/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Prepare_Image_Input)]Here is how to create a multimodal message using @AutoGen.Core.MultiModalMessage:-[!code-csharp[Create MultiModal Message](../../sample/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Prepare_Multimodal_Input)]+[!code-csharp[Create MultiModal Message](../../samples/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Prepare_Multimodal_Input)]## Step 5: Generate ResponseTo generate response, you can use one of the overloaded methods of @AutoGen.Core.AgentExtension.SendAsync* method. The following code shows how to generate response with an image message:-[!code-csharp[Generate Response](../../sample/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Chat_With_Agent)]+[!code-csharp[Generate Response](../../samples/AutoGen.BasicSamples/GettingStart/Image_Chat_With_Agent.cs?name=Chat_With_Agent)]## Further Reading- [Image chat with gemini](../articles/AutoGen.Gemini/Image-chat-with-gemini.md)diff --git a/protos/agent_events.proto b/protos/agent_events.protoindex 5be3f2549..6384a7e3b 100644--- a/protos/agent_events.proto+++ b/protos/agent_events.proto@@ -7,7 +7,6 @@ option csharp_namespace = "Microsoft.AutoGen.Agents.Abstractions";message Input {string message = 1;}-message InputProcessed {string route = 1;}@@ -20,3 +19,19 @@ message OutputWritten {message IOError {string message = 1;}+message NewMessageReceived {+ string message = 1;+}+message ResponseGenerated {+ string response = 1;+}+message GoodBye {+ string message = 1;+}+message MessageStored {+ string message = 1;+}+message ConversationClosed {+ string user_id = 1;+ string user_message = 2;+}