Skip to content
DocsTry Aspire
DocsTry

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)
{
// ...
}
}
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)
{
// ...
}
}
configureOpenTelemetryAction<OpenTelemetryChatClient>An optional delegate that can be used for customizing the OpenTelemetry chat client.
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)
{
// ...
}
}
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)
{
// ...
}
}
configureOpenTelemetryAction<OpenTelemetryChatClient>An optional delegate that can be used for customizing the OpenTelemetry chat client.
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)
{
// ...
}
}
serviceKeyobjectThe service key to use for registering the AI.IChatClient.
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)
{
// ...
}
}
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.
ChatClientBuilderA AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient.