Sdílet prostřednictvím


AspireOpenAIClientBuilder Class

Definition

A builder for configuring an OpenAI.OpenAIClient service registration.

public class AspireOpenAIClientBuilder
type AspireOpenAIClientBuilder = class
Public Class AspireOpenAIClientBuilder
Inheritance
AspireOpenAIClientBuilder
Derived

Constructors

AspireOpenAIClientBuilder(IHostApplicationBuilder, String, String, Boolean)

Constructs a new instance of AspireOpenAIClientBuilder.

Properties

ConfigurationSectionName

Gets the name of the configuration section for this component type.

ConnectionName

Gets the name used to retrieve the connection string from the ConnectionStrings configuration section.

DisableTracing

Gets a flag indicating whether tracing should be disabled.

HostBuilder

Gets the IHostApplicationBuilder with which services are being registered.

ServiceKey

Gets the service key used to register the OpenAI.OpenAIClient service, if any.

Extension Methods

AddChatClient(AspireOpenAIClientBuilder, String)

Registers a singleton IChatClient in the services provided by the builder.

AddKeyedChatClient(AspireOpenAIClientBuilder, String, String)

Registers a keyed singleton IChatClient in the services provided by the builder.

AddEmbeddingGenerator(AspireOpenAIClientBuilder, String)

Registers a singleton IEmbeddingGenerator<TInput,TEmbedding> in the services provided by the builder.

AddKeyedEmbeddingGenerator(AspireOpenAIClientBuilder, String, String)

Registers a keyed singleton IEmbeddingGenerator<TInput,TEmbedding> in the services provided by the builder.

Applies to