Прочетете на английски

Споделяне чрез


OpenAIEmbeddingGenerator Class

Definition

C#
public sealed class OpenAIEmbeddingGenerator : IDisposable, Microsoft.Extensions.AI.IEmbeddingGenerator<string,Microsoft.Extensions.AI.Embedding<float>>
Inheritance
OpenAIEmbeddingGenerator
Implements

Constructors

Methods

GenerateAsync(IEnumerable<String>, EmbeddingGenerationOptions, CancellationToken)

Generates embeddings for each of the supplied values.

Explicit Interface Implementations

IDisposable.Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

IEmbeddingGenerator<String,Embedding<Single>>.GetService(Type, Object)

Asks the IEmbeddingGenerator<TInput,TEmbedding> for an object of the specified type serviceType.

Extension Methods

Applies to

Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)