AspireOllamaChatClientExtensions Methods
ClassMethods6 members
Extension methos for configuring the
AI.IChatClient from an OllamaApiClient AddChatClient(AspireOllamaApiClientBuilder) Section titled AddChatClient(AspireOllamaApiClientBuilder)extensionChatClientBuilder Registers a singleton
AI.IChatClient in the services provided by the builder. public static class AspireOllamaChatClientExtensions{ public static ChatClientBuilder AddChatClient( this AspireOllamaApiClientBuilder builder) { // ... }}Parameters
Returns
ChatClientBuilder A AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient .AddChatClient(AspireOllamaApiClientBuilder, Action<OpenTelemetryChatClient>) Section titled AddChatClient(AspireOllamaApiClientBuilder, Action<OpenTelemetryChatClient>)extensionChatClientBuilder Registers a singleton
AI.IChatClient in the services provided by the builder. public static class AspireOllamaChatClientExtensions{ public static ChatClientBuilder AddChatClient( this AspireOllamaApiClientBuilder builder, Action<OpenTelemetryChatClient>? configureOpenTelemetry) { // ... }}Parameters
configureOpenTelemetry Action<OpenTelemetryChatClient> An optional delegate that can be used for customizing the OpenTelemetry chat client.Returns
ChatClientBuilder A AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient .AddKeyedChatClient(AspireOllamaApiClientBuilder) Section titled AddKeyedChatClient(AspireOllamaApiClientBuilder)extensionChatClientBuilder Registers a keyed singleton
AI.IChatClient in the services provided by the builder. public static class AspireOllamaChatClientExtensions{ public static ChatClientBuilder AddKeyedChatClient( this AspireOllamaApiClientBuilder builder) { // ... }}Parameters
Returns
ChatClientBuilder A AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient .AddKeyedChatClient(AspireOllamaApiClientBuilder, Action<OpenTelemetryChatClient>) Section titled AddKeyedChatClient(AspireOllamaApiClientBuilder, Action<OpenTelemetryChatClient>)extensionChatClientBuilder Registers a keyed singleton
AI.IChatClient in the services provided by the builder. public static class AspireOllamaChatClientExtensions{ public static ChatClientBuilder AddKeyedChatClient( this AspireOllamaApiClientBuilder builder, Action<OpenTelemetryChatClient>? configureOpenTelemetry) { // ... }}Parameters
configureOpenTelemetry Action<OpenTelemetryChatClient> An optional delegate that can be used for customizing the OpenTelemetry chat client.Returns
ChatClientBuilder A AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient .AddKeyedChatClient(AspireOllamaApiClientBuilder, object) Section titled AddKeyedChatClient(AspireOllamaApiClientBuilder, object)extensionChatClientBuilder Registers a keyed singleton
AI.IChatClient in the services provided by the builder using the specified service key. public static class AspireOllamaChatClientExtensions{ public static ChatClientBuilder AddKeyedChatClient( this AspireOllamaApiClientBuilder builder, object serviceKey) { // ... }}Parameters
serviceKey objectThe service key to use for registering the AI.IChatClient .Returns
ChatClientBuilder A AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient .AddKeyedChatClient(AspireOllamaApiClientBuilder, object, Action<OpenTelemetryChatClient>) Section titled AddKeyedChatClient(AspireOllamaApiClientBuilder, object, Action<OpenTelemetryChatClient>)extensionChatClientBuilder Registers a keyed singleton
AI.IChatClient in the services provided by the builder using the specified service key. public static class AspireOllamaChatClientExtensions{ public static ChatClientBuilder AddKeyedChatClient( this AspireOllamaApiClientBuilder builder, object serviceKey, Action<OpenTelemetryChatClient>? configureOpenTelemetry) { // ... }}Parameters
serviceKey objectThe service key to use for registering the AI.IChatClient .configureOpenTelemetry Action<OpenTelemetryChatClient> An optional delegate that can be used for customizing the OpenTelemetry chat client.Returns
ChatClientBuilder A AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient .