diff --git a/src/CommunityToolkit.Aspire.OllamaSharp/README.md b/src/CommunityToolkit.Aspire.OllamaSharp/README.md index 85dd24a48..c08469fdd 100644 --- a/src/CommunityToolkit.Aspire.OllamaSharp/README.md +++ b/src/CommunityToolkit.Aspire.OllamaSharp/README.md @@ -1,6 +1,6 @@ # CommunityToolkit.Aspire.OllamaSharp library -Registers `IOllamaClientApi` in the DI container to interact with the [Ollama](https://ollama.com) API and optionally supports registering an `IChatClient` or `IEmbeddingGenerator` from [Microsoft.Extensions.AI](https://devblogs.microsoft.com/dotnet/introducing-microsoft-extensions-ai-preview/). +Registers `IOllamaApiClient` in the DI container to interact with the [Ollama](https://ollama.com) API and optionally supports registering an `IChatClient` or `IEmbeddingGenerator` from [Microsoft.Extensions.AI](https://devblogs.microsoft.com/dotnet/introducing-microsoft-extensions-ai-preview/). ## Getting Started @@ -18,16 +18,16 @@ dotnet add package CommunityToolkit.Aspire.OllamaSharp ### Example usage -In the _Program.cs_ file of your project, call the `AddOllamaClientApi` extension method to register the `IOllamaClientApi` in the DI container. This method takes the connection name as a parameter: +In the _Program.cs_ file of your project, call the `AddOllamaApiClient` extension method to register the `IOllamaApiClient` in the DI container. This method takes the connection name as a parameter: ```csharp -builder.AddOllamaClientApi("ollama"); +builder.AddOllamaApiClient("ollama"); ``` -Then, in your service, inject `IOllamaClientApi` and use it to interact with the Ollama API: +Then, in your service, inject `IOllamaApiClient` and use it to interact with the Ollama API: ```csharp -public class MyService(IOllamaClientApi ollamaClientApi) +public class MyService(IOllamaApiClient ollamaApiClient) { // ... } @@ -35,7 +35,7 @@ public class MyService(IOllamaClientApi ollamaClientApi) #### Integration with Microsoft.Extensions.AI -To use the integration with Microsoft.Extensions.AI, call the `AddOllamaSharpChatClient` or `AddOllamaSharpEmbeddingGenerator` extension method in the _Program.cs_ file of your project. These methods take the connection name as a parameter, just as `AddOllamaClientApi` does, and will register the `IOllamaApiClient`, as well as the `IChatClient` or `IEmbeddingGenerator` in the DI container. The `IEmbeddingsGenerator` is registered with the generic arguments of `>`. +To use the integration with Microsoft.Extensions.AI, call the `AddOllamaSharpChatClient` or `AddOllamaSharpEmbeddingGenerator` extension method in the _Program.cs_ file of your project. These methods take the connection name as a parameter, just as `AddOllamaApiClient` does, and will register the `IOllamaApiClient`, as well as the `IChatClient` or `IEmbeddingGenerator` in the DI container. The `IEmbeddingsGenerator` is registered with the generic arguments of `>`. ## Additional documentation