AspireOllamaChatClientExtensions Methods
ClassMethods6 members
Extension methos for configuring the
AI.IChatClient from an OllamaApiClientAddChatClient(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
ChatClientBuilderA 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
configureOpenTelemetryAction<OpenTelemetryChatClient>An optional delegate that can be used for customizing the OpenTelemetry chat client.Returns
ChatClientBuilderA 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
ChatClientBuilderA 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
configureOpenTelemetryAction<OpenTelemetryChatClient>An optional delegate that can be used for customizing the OpenTelemetry chat client.Returns
ChatClientBuilderA 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
serviceKeyobjectThe service key to use for registering the AI.IChatClient.Returns
ChatClientBuilderA 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
serviceKeyobjectThe service key to use for registering the AI.IChatClient.configureOpenTelemetryAction<OpenTelemetryChatClient>An optional delegate that can be used for customizing the OpenTelemetry chat client.Returns
ChatClientBuilderA AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient.