AspireOpenAIClientBuilderChatClientExtensions Methods
ClassMethods2 members
Provides extension methods for registering
AI.IChatClient as a singleton in the services provided by the Hosting.IHostApplicationBuilder . AddChatClient(AspireOpenAIClientBuilder, string?) Section titled AddChatClient(AspireOpenAIClientBuilder, string?)extensionChatClientBuilder Registers a singleton
AI.IChatClient in the services provided by the builder. public static class AspireOpenAIClientBuilderChatClientExtensions{ public static ChatClientBuilder AddChatClient( this AspireOpenAIClientBuilder builder, string? deploymentName = null) { // ... }}Parameters
deploymentName string?optionalOptionally specifies which model deployment to use. If not specified, a value will be taken from the connection string.Returns
ChatClientBuilder A AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient .AddKeyedChatClient(AspireOpenAIClientBuilder, string, string?) Section titled AddKeyedChatClient(AspireOpenAIClientBuilder, string, string?)extensionChatClientBuilder Registers a keyed singleton
AI.IChatClient in the services provided by the builder. public static class AspireOpenAIClientBuilderChatClientExtensions{ public static ChatClientBuilder AddKeyedChatClient( this AspireOpenAIClientBuilder builder, string serviceKey, string? deploymentName = null) { // ... }}Parameters
serviceKey stringThe service key with which the AI.IChatClient will be registered.deploymentName string?optionalOptionally specifies which model deployment to use. If not specified, a value will be taken from the connection string.Returns
ChatClientBuilder A AI.ChatClientBuilder that can be used to build a pipeline around the inner AI.IChatClient .