Partager via


MistralAIServiceCollectionExtensions.AddMistralTextEmbeddingGeneration Method

Definition

Adds an Mistral text embedding generation service with the specified configuration.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMistralTextEmbeddingGeneration (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string modelId, string apiKey, Uri? endpoint = default, string? serviceId = default);
static member AddMistralTextEmbeddingGeneration : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * Uri * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddMistralTextEmbeddingGeneration (services As IServiceCollection, modelId As String, apiKey As String, Optional endpoint As Uri = Nothing, Optional serviceId As String = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

modelId
String

The name of theMistral modelId.

apiKey
String

The API key required for accessing the Mistral service.

endpoint
Uri

Optional uri endpoint including the port where MistralAI server is hosted. Default is https://api.mistral.ai.

serviceId
String

A local identifier for the given AI service.

Returns

The same instance as services.

Applies to