GoogleAITextEmbeddingGenerationService Class

Definition

Represents a service for generating text embeddings using the Google AI Gemini API.

public sealed class GoogleAITextEmbeddingGenerationService : Microsoft.SemanticKernel.Embeddings.IEmbeddingGenerationService<string,float>, Microsoft.SemanticKernel.Embeddings.ITextEmbeddingGenerationService
type GoogleAITextEmbeddingGenerationService = class
    interface ITextEmbeddingGenerationService
    interface IEmbeddingGenerationService<string, single>
    interface IAIService
Public NotInheritable Class GoogleAITextEmbeddingGenerationService
Implements IEmbeddingGenerationService(Of String, Single), ITextEmbeddingGenerationService
Inheritance
GoogleAITextEmbeddingGenerationService
Implements

Constructors

GoogleAITextEmbeddingGenerationService(String, String, GoogleAIVersion, HttpClient, ILoggerFactory, Nullable<Int32>)

Initializes a new instance of the GoogleAITextEmbeddingGenerationService class.

Properties

Attributes

Gets the AI service attributes.

Methods

GenerateEmbeddingsAsync(IList<String>, Kernel, CancellationToken)

Generates an embedding from the given data.

Extension Methods

AsEmbeddingGenerator<TValue,TEmbedding>(IEmbeddingGenerationService<TValue,TEmbedding>)

Creates an IEmbeddingGenerator<TInput,TEmbedding> for the specified IEmbeddingGenerationService<TValue,TEmbedding>.

GenerateEmbeddingAsync<TValue,TEmbedding>(IEmbeddingGenerationService<TValue,TEmbedding>, TValue, Kernel, CancellationToken)

Generates an embedding from the given value.

GetDimensions<TValue,TEmbedding>(IEmbeddingGenerationService<TValue,TEmbedding>)

Gets the dimensions from service's IEmbeddingGenerationService<TValue,TEmbedding>.

GetApiVersion(IAIService)

Gets the API version from service's Attributes

GetEndpoint(IAIService)

Gets the endpoint from service's Attributes.

GetModelId(IAIService)

Gets the model identifier from service's Attributes.

Applies to