Udostępnij za pośrednictwem


OpenAIEmbeddingGenerator Constructors

Definition

Overloads

OpenAIEmbeddingGenerator(EmbeddingClient, Nullable<Int32>)

Initializes a new instance of the OpenAIEmbeddingGenerator class.

OpenAIEmbeddingGenerator(OpenAIClient, String, Nullable<Int32>)

Initializes a new instance of the OpenAIEmbeddingGenerator class.

OpenAIEmbeddingGenerator(EmbeddingClient, Nullable<Int32>)

Initializes a new instance of the OpenAIEmbeddingGenerator class.

public OpenAIEmbeddingGenerator (OpenAI.Embeddings.EmbeddingClient embeddingClient, int? dimensions = default);
new Microsoft.Extensions.AI.OpenAIEmbeddingGenerator : OpenAI.Embeddings.EmbeddingClient * Nullable<int> -> Microsoft.Extensions.AI.OpenAIEmbeddingGenerator
Public Sub New (embeddingClient As EmbeddingClient, Optional dimensions As Nullable(Of Integer) = Nothing)

Parameters

embeddingClient
OpenAI.Embeddings.EmbeddingClient

The underlying client.

dimensions
Nullable<Int32>

The number of dimensions to generate in each embedding.

Applies to

OpenAIEmbeddingGenerator(OpenAIClient, String, Nullable<Int32>)

Initializes a new instance of the OpenAIEmbeddingGenerator class.

public OpenAIEmbeddingGenerator (OpenAI.OpenAIClient openAIClient, string modelId, int? dimensions = default);
new Microsoft.Extensions.AI.OpenAIEmbeddingGenerator : OpenAI.OpenAIClient * string * Nullable<int> -> Microsoft.Extensions.AI.OpenAIEmbeddingGenerator
Public Sub New (openAIClient As OpenAIClient, modelId As String, Optional dimensions As Nullable(Of Integer) = Nothing)

Parameters

openAIClient
OpenAI.OpenAIClient

The underlying client.

modelId
String

The model to use.

dimensions
Nullable<Int32>

The number of dimensions to generate in each embedding.

Applies to