A programming framework for agentic AI
[.Net] Update website for AutoGen.SemanticKernel and AutoGen.Ollama (#2814)
Xiaoyun Zhang7f635b4309eb
diff --git a/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs b/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.csindex e1af08c57..09df4a48d 100644--- a/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs+++ b/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs@@ -1,8 +1,10 @@// Copyright (c) Microsoft Corporation. All rights reserved.// Chat_With_LLaMA.cs+#region Usingusing AutoGen.Core;using AutoGen.Ollama.Extension;+#endregion Usingnamespace AutoGen.Ollama.Sample;@@ -10,9 +12,10 @@ public class Chat_With_LLaMA{public static async Task RunAsync(){+ #region Create_Ollama_Agentusing var httpClient = new HttpClient(){- BaseAddress = new Uri("https://2xbvtxd1-11434.usw2.devtunnels.ms")+ BaseAddress = new Uri("http://localhost:11434"),};var ollamaAgent = new OllamaAgent(@@ -24,5 +27,6 @@ public class Chat_With_LLaMA.RegisterPrintMessage();var reply = await ollamaAgent.SendAsync("Can you write a piece of C# code to calculate 100th of fibonacci?");+ #endregion Create_Ollama_Agent}}diff --git a/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs b/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.csindex b1b310e39..d52afb075 100644--- a/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs+++ b/dotnet/sample/AutoGen.Ollama.Sample/Chat_With_LLaVA.cs@@ -1,8 +1,10 @@// Copyright (c) Microsoft Corporation. All rights reserved.// Chat_With_LLaVA.cs+#region Usingusing AutoGen.Core;using AutoGen.Ollama.Extension;+#endregion Usingnamespace AutoGen.Ollama.Sample;@@ -10,9 +12,10 @@ public class Chat_With_LLaVA{public static async Task RunAsync(){+ #region Create_Ollama_Agentusing var httpClient = new HttpClient(){- BaseAddress = new Uri("https://2xbvtxd1-11434.usw2.devtunnels.ms")+ BaseAddress = new Uri("http://localhost:11434"),};var ollamaAgent = new OllamaAgent(@@ -22,13 +25,17 @@ public class Chat_With_LLaVAsystemMessage: "You are a helpful AI assistant").RegisterMessageConnector().RegisterPrintMessage();+ #endregion Create_Ollama_Agent+ #region Send_Messagevar image = Path.Combine("images", "background.png");var binaryData = BinaryData.FromBytes(File.ReadAllBytes(image), "image/png");var imageMessage = new ImageMessage(Role.User, binaryData);var textMessage = new TextMessage(Role.User, "what's in this image?");var reply = await ollamaAgent.SendAsync(chatHistory: [textMessage, imageMessage]);+ #endregion Send_Message+ #region Send_MultiModal_Message// You can also use MultiModalMessage to put text and image together in one message// In this case, all the messages in the multi-modal message will be put into single piece of message// where the text is the concatenation of all the text messages seperated by \n@@ -36,5 +43,6 @@ public class Chat_With_LLaVAvar multiModalMessage = new MultiModalMessage(Role.User, [textMessage, imageMessage]);reply = await ollamaAgent.SendAsync(chatHistory: [multiModalMessage]);+ #endregion Send_MultiModal_Message}}diff --git a/dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs b/dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.csindex 0caea6f03..9b72a2e0f 100644--- a/dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs+++ b/dotnet/sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs@@ -1,22 +1,26 @@// Copyright (c) Microsoft Corporation. All rights reserved.// Create_Semantic_Kernel_Chat_Agent.cs+#region Usingusing AutoGen.Core;using Microsoft.SemanticKernel;using Microsoft.SemanticKernel.Agents;-+#endregion Usingnamespace AutoGen.SemanticKernel.Sample;public class Create_Semantic_Kernel_Chat_Agent{public static async Task RunAsync(){+ #region Create_Kernelvar openAIKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY") ?? throw new Exception("Please set OPENAI_API_KEY environment variable.");var modelId = "gpt-3.5-turbo";var kernel = Kernel.CreateBuilder().AddOpenAIChatCompletion(modelId: modelId, apiKey: openAIKey).Build();+ #endregion Create_Kernel+ #region Create_ChatCompletionAgent// The built-in ChatCompletionAgent from semantic kernel.var chatAgent = new ChatCompletionAgent(){@@ -24,12 +28,17 @@ public class Create_Semantic_Kernel_Chat_AgentName = "assistant",Description = "You are a helpful AI assistant",};+ #endregion Create_ChatCompletionAgent+ #region Create_SemanticKernelChatCompletionAgentvar messageConnector = new SemanticKernelChatMessageContentConnector();var skAgent = new SemanticKernelChatCompletionAgent(chatAgent).RegisterMiddleware(messageConnector) // register message connector so it support AutoGen built-in message types like TextMessage..RegisterPrintMessage(); // pretty print the message to the console+ #endregion Create_SemanticKernelChatCompletionAgent+ #region Send_Messageawait skAgent.SendAsync("Hey tell me a long tedious joke");+ #endregion Send_Message}}diff --git a/dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs b/dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.csindex d91d72766..2beb1ee7d 100644--- a/dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs+++ b/dotnet/sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs@@ -1,11 +1,13 @@// Copyright (c) Microsoft Corporation. All rights reserved.// Use_Kernel_Functions_With_Other_Agent.cs+#region Usingusing AutoGen.Core;using AutoGen.OpenAI;using AutoGen.OpenAI.Extension;using Azure.AI.OpenAI;using Microsoft.SemanticKernel;+#endregion Usingnamespace AutoGen.SemanticKernel.Sample;@@ -13,6 +15,7 @@ public class Use_Kernel_Functions_With_Other_Agent{public static async Task RunAsync(){+ #region Create_pluginvar openAIKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY") ?? throw new Exception("Please set OPENAI_API_KEY environment variable.");var modelId = "gpt-3.5-turbo";var kernelBuilder = Kernel.CreateBuilder();@@ -22,7 +25,9 @@ public class Use_Kernel_Functions_With_Other_AgentfunctionName: "GetWeather",description: "Get the weather for a location.");var plugin = kernel.CreatePluginFromFunctions("my_plugin", [getWeatherFunction]);+ #endregion Create_plugin+ #region Use_plugin// Create a middleware to handle the plugin functionsvar kernelPluginMiddleware = new KernelPluginMiddleware(kernel, plugin);@@ -34,11 +39,14 @@ public class Use_Kernel_Functions_With_Other_Agent.RegisterMessageConnector() // register message connector so it support AutoGen built-in message types like TextMessage..RegisterMiddleware(kernelPluginMiddleware) // register the middleware to handle the plugin functions.RegisterPrintMessage(); // pretty print the message to the console+ #endregion Use_plugin+ #region Send_messagevar toolAggregateMessage = await openAIAgent.SendAsync("Tell me the weather in Seattle");// The aggregate message will be converted to [ToolCallMessage, ToolCallResultMessage] when flowing into the agent// send the aggregated message to llm to generate the final responsevar finalReply = await openAIAgent.SendAsync(toolAggregateMessage);+ #endregion Send_message}}diff --git a/dotnet/src/AutoGen.Ollama/AutoGen.Ollama.csproj b/dotnet/src/AutoGen.Ollama/AutoGen.Ollama.csprojindex 20924a476..a939f138c 100644--- a/dotnet/src/AutoGen.Ollama/AutoGen.Ollama.csproj+++ b/dotnet/src/AutoGen.Ollama/AutoGen.Ollama.csproj@@ -6,6 +6,16 @@<GenerateDocumentationFile>True</GenerateDocumentationFile></PropertyGroup>+ <Import Project="$(RepoRoot)/nuget/nuget-package.props" />++ <PropertyGroup>+ <!-- NuGet Package Settings -->+ <Title>AutoGen.Ollama</Title>+ <Description>+ Provide support for Ollama server in AutoGen+ </Description>+ </PropertyGroup>+<ItemGroup><ProjectReference Include="..\AutoGen.Core\AutoGen.Core.csproj" /></ItemGroup>diff --git a/dotnet/website/articles/Agent-overview.md b/dotnet/website/articles/Agent-overview.mdindex 08aa7a93d..0b84cdc49 100644--- a/dotnet/website/articles/Agent-overview.md+++ b/dotnet/website/articles/Agent-overview.md@@ -6,7 +6,7 @@## Create an agent- Create an @AutoGen.AssistantAgent: [Create an assistant agent](./Create-an-agent.md)- Create an @AutoGen.OpenAI.OpenAIChatAgent: [Create an OpenAI chat agent](./OpenAIChatAgent-simple-chat.md)-- Create a @AutoGen.SemanticKernel.SemanticKernelAgent: [Create a semantic kernel agent](./SemanticKernelAgent-simple-chat.md)+- Create a @AutoGen.SemanticKernel.SemanticKernelAgent: [Create a semantic kernel agent](./AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.md)- Create a @AutoGen.LMStudio.LMStudioAgent: [Connect to LM Studio](./Consume-LLM-server-from-LM-Studio.md)- Create your own agent: [Create your own agent](./Create-your-own-agent.md)@@ -33,7 +33,7 @@ If an agent implements @AutoGen.Core.IStreamingAgent, you can use @AutoGen.Core.- Middleware overview: [Middleware overview](./Middleware-overview.md)- Write message to console: [Print message middleware](./Print-message-middleware.md)-- Convert message type: [SemanticKernelChatMessageContentConnector](./SemanticKernelAgent-support-more-messages.md) and [OpenAIChatRequestMessageConnector](./OpenAIChatAgent-support-more-messages.md)+- Convert message type: [SemanticKernelChatMessageContentConnector](./AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.md) and [OpenAIChatRequestMessageConnector](./OpenAIChatAgent-support-more-messages.md)- Create your own middleware: [Create your own middleware](./Create-your-own-middleware.md)## Group chatdiff --git a/dotnet/website/articles/AutoGen.Ollama/Chat-with-llama.md b/dotnet/website/articles/AutoGen.Ollama/Chat-with-llama.mdnew file mode 100644index 000000000..731113e41--- /dev/null+++ b/dotnet/website/articles/AutoGen.Ollama/Chat-with-llama.md@@ -0,0 +1,27 @@+This example shows how to use @AutoGen.Ollama.OllamaAgent to connect to Ollama server and chat with LLaVA model.++To 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)++### Step 1: Install AutoGen.Ollama++First, install the AutoGen.Ollama package using the following command:++```bash+dotnet add package AutoGen.Ollama+```++For how to install from nightly build, please refer to [Installation](../Installation.md).++### Step 2: Add using statement++[!code-csharp[](../../../sample/AutoGen.Ollama.Sample/Chat_With_LLaMA.cs?name=Using)]++### Step 3: Create and chat @AutoGen.Ollama.OllamaAgent++In 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)]+diff --git a/dotnet/website/articles/AutoGen.Ollama/Chat-with-llava.md b/dotnet/website/articles/AutoGen.Ollama/Chat-with-llava.mdnew file mode 100644index 000000000..18a1900fa--- /dev/null+++ b/dotnet/website/articles/AutoGen.Ollama/Chat-with-llava.md@@ -0,0 +1,29 @@+This sample shows how to use @AutoGen.Ollama.OllamaAgent to chat with LLaVA model.++To 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)++### Step 1: Install AutoGen.Ollama++First, install the AutoGen.Ollama package using the following command:++```bash+dotnet add package AutoGen.Ollama+```++For how to install from nightly build, please refer to [Installation](../Installation.md).++### Step 2: Add using statement++[!code-csharp[](../../../sample/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)]++### Step 4: Start MultiModal Chat+LLaVA 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 filediff --git a/dotnet/website/articles/AutoGen-SemanticKernel-Overview.md b/dotnet/website/articles/AutoGen.SemanticKernel/AutoGen-SemanticKernel-Overview.mdsimilarity index 68%rename from dotnet/website/articles/AutoGen-SemanticKernel-Overview.mdrename to dotnet/website/articles/AutoGen.SemanticKernel/AutoGen-SemanticKernel-Overview.mdindex 581430b26..d28c762f5 100644--- a/dotnet/website/articles/AutoGen-SemanticKernel-Overview.md+++ b/dotnet/website/articles/AutoGen.SemanticKernel/AutoGen-SemanticKernel-Overview.md@@ -1,14 +1,16 @@## AutoGen.SemanticKernel Overview-AutoGen.SemanticKernel is a package that provides seamless integration with Semantic Kernel. It provides the following agent:+AutoGen.SemanticKernel is a package that provides seamless integration with Semantic Kernel. It provides the following agents:- @AutoGen.SemanticKernel.SemanticKernelAgent: A slim wrapper agent over `Kernel` that only support original `ChatMessageContent` type via `IMessage<ChatMessageContent>`. To support more AutoGen built-in message type, register the agent with @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector.+- @AutoGen.SemanticKernel.SemanticKernelChatCompletionAgent: A slim wrapper agent over `Microsoft.SemanticKernel.Agents.ChatCompletionAgent`.AutoGen.SemanticKernel also provides the following middleware:- @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector: A connector that convert the message from AutoGen built-in message types to `ChatMessageContent` and vice versa. At the current stage, it only supports conversation between @AutoGen.Core.TextMessage, @AutoGen.Core.ImageMessage and @AutoGen.Core.MultiModalMessage. Function call message type like @AutoGen.Core.ToolCallMessage and @AutoGen.Core.ToolCallResultMessage are not supported yet.+- @AutoGen.SemanticKernel.KernelPluginMiddleware: A middleware that allows you to use semantic kernel plugins in other AutoGen agents like @AutoGen.OpenAI.OpenAIChatAgent.### Get start with AutoGen.SemanticKernel-To get start with AutoGen.SemanticKernel, firstly, follow the [installation guide](Installation.md) to make sure you add the AutoGen feed correctly. Then add `AutoGen.SemanticKernel` package to your project file.+To get start with AutoGen.SemanticKernel, firstly, follow the [installation guide](../Installation.md) to make sure you add the AutoGen feed correctly. Then add `AutoGen.SemanticKernel` package to your project file.```xml<ItemGroup>diff --git a/dotnet/website/articles/SemanticKernelAgent-simple-chat.md b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.mdsimilarity index 63%rename from dotnet/website/articles/SemanticKernelAgent-simple-chat.mdrename to dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.mdindex 9b16ceb4e..728cb7a56 100644--- a/dotnet/website/articles/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[](../../../sample/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[](../../../sample/AutoGen.BasicSamples/CodeSnippet/SemanticKernelCodeSnippet.cs?name=create_semantic_kernel_agent_streaming)]diff --git a/dotnet/website/articles/SemanticKernelAgent-support-more-messages.md b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.mdsimilarity index 85%rename from dotnet/website/articles/SemanticKernelAgent-support-more-messages.mdrename to dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.mdindex 3dfcf5b0d..139b6efa6 100644--- a/dotnet/website/articles/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[](../../../sample/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.mdnew file mode 100644index 000000000..dc282966c--- /dev/null+++ b/dotnet/website/articles/AutoGen.SemanticKernel/SemanticKernelChatAgent-simple-chat.md@@ -0,0 +1,22 @@+`AutoGen.SemanticKernel` provides built-in support for `ChatCompletionAgent` via @AutoGen.SemanticKernel.SemanticKernelChatCompletionAgent. By default the @AutoGen.SemanticKernel.SemanticKernelChatCompletionAgent only supports the original `ChatMessageContent` type via `IMessage<ChatMessageContent>`. To support more AutoGen built-in message types like @AutoGen.Core.TextMessage, @AutoGen.Core.ImageMessage, @AutoGen.Core.MultiModalMessage, you can register the agent with @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector. The @AutoGen.SemanticKernel.SemanticKernelChatMessageContentConnector will convert the message from AutoGen built-in message types to `ChatMessageContent` and vice versa.++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).++### Step 1: add using statement+[!code-csharp[](../../../sample/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)]++### Step 3: create ChatCompletionAgent+[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Create_Semantic_Kernel_Chat_Agent.cs?name=Create_ChatCompletionAgent)]++### Step 4: create @AutoGen.SemanticKernel.SemanticKernelChatCompletionAgent+In 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)]++### 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 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.mdnew file mode 100644index 000000000..9e1d511c9--- /dev/null+++ b/dotnet/website/articles/AutoGen.SemanticKernel/Use-kernel-plugin-in-other-agents.md@@ -0,0 +1,27 @@+In semantic kernel, a kernel plugin is a collection of kernel functions that can be invoked during LLM calls. Semantic kernel provides a list of built-in plugins, like [core plugins](https://github.com/microsoft/semantic-kernel/tree/main/dotnet/src/Plugins/Plugins.Core), [web search plugin](https://github.com/microsoft/semantic-kernel/tree/main/dotnet/src/Plugins/Plugins.Web) and many more. You can also create your own plugins and use them in semantic kernel. Kernel plugins greatly extend the capabilities of semantic kernel and can be used to perform various tasks like web search, image search, text summarization, etc.++`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)++### Step 1: add using statement+[!code-csharp[](../../../sample/AutoGen.SemanticKernel.Sample/Use_Kernel_Functions_With_Other_Agent.cs?name=Using)]++### Step 2: create plugin++In 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)]++### Step 3: create OpenAIChatAgent and use the plugin++In 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)]++### Step 4: chat with OpenAIChatAgent++In 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 filediff --git a/dotnet/website/articles/Installation.md b/dotnet/website/articles/Installation.mdindex 59699a957..86067a650 100644--- a/dotnet/website/articles/Installation.md+++ b/dotnet/website/articles/Installation.md@@ -8,6 +8,8 @@ AutoGen.Net provides the following packages, you can choose to install one or mo- `AutoGen.Core`: The core package, this package provides the abstraction for message type, agent and group chat.- `AutoGen.OpenAI`: This package provides the integration agents over openai models.- `AutoGen.Mistral`: This package provides the integration agents for Mistral.AI models.+- `AutoGen.Ollama`: This package provides the integration agents for [Ollama](https://ollama.com/).+- `AutoGen.Anthropic`: This package provides the integration agents for [Anthropic](https://www.anthropic.com/api)- `AutoGen.LMStudio`: This package provides the integration agents from LM Studio.- `AutoGen.SemanticKernel`: This package provides the integration agents over semantic kernel.- `AutoGen.SourceGenerator`: This package carries a source generator that adds support for type-safe function definition generation.diff --git a/dotnet/website/articles/toc.yml b/dotnet/website/articles/toc.ymlindex 325578ad4..2496d5d36 100644--- a/dotnet/website/articles/toc.yml+++ b/dotnet/website/articles/toc.yml@@ -70,11 +70,23 @@- name: AutoGen.SemanticKernelitems:- name: Overview- href: AutoGen-SemanticKernel-Overview.md- - name: Simple chat and streaming chat- href: SemanticKernelAgent-simple-chat.md- - name: Use SemanticKernelChatMessageContentConnector to support more AutoGen built-in messages- href: SemanticKernelAgent-support-more-messages.md+ href: AutoGen.SemanticKernel/AutoGen-SemanticKernel-Overview.md+ - name: Chat with Semantic Kernel Agent+ href: AutoGen.SemanticKernel/SemanticKernelAgent-simple-chat.md+ - name: Chat with Semantic Kernel Chat Agent+ href: AutoGen.SemanticKernel/SemanticKernelChatAgent-simple-chat.md+ - name: Support AutoGen built-in messages+ href: AutoGen.SemanticKernel/SemanticKernelAgent-support-more-messages.md+ - name: Use kernel plugin in other agents+ href: AutoGen.SemanticKernel/Use-kernel-plugin-in-other-agents.md+- name: AutoGen.Ollama+ items:+ - name: Examples+ items:+ - name: Chat with LLaMA+ href: AutoGen.Ollama/Chat-with-LLaMA.md+ - name: MultiModal Chat with LLaVA+ href: AutoGen.Ollama/Chat-with-LLaVA.md- name: AutoGen.Mistralitems:- name: Overview