Skip to content
Docs Try Aspire

AspireAzureAIInferenceExtensions

Class static net10.0
📦 Aspire.Azure.AI.Inference v13.2.0-preview.1.26170.3
Extension methods for adding Azure AI Inference services to an Aspire application.
namespace Microsoft.Extensions.Hosting;
public static class AspireAzureAIInferenceExtensions
{
// ...
}
AddAzureChatCompletionsClient(IHostApplicationBuilder, string, Action<ChatCompletionsClientSettings>, Action<IAzureClientBuilder<ChatCompletionsClient, AzureAIInferenceClientOptions>>)extension
Adds a Inference.ChatCompletionsClient to the application and configures it with the specified settings.
AddAzureEmbeddingsClient(IHostApplicationBuilder, string, Action<ChatCompletionsClientSettings>, Action<IAzureClientBuilder<EmbeddingsClient, AzureAIInferenceClientOptions>>)extension
Adds a Inference.EmbeddingsClient to the application and configures it with the specified settings.
AddChatClient(AspireChatCompletionsClientBuilder, string?)extension
ChatClientBuilder
Creates a AI.IChatClient from the Inference.ChatCompletionsClient registered in the service collection.
AddEmbeddingGenerator(AspireEmbeddingsClientBuilder, string?)extension
EmbeddingGeneratorBuilder<string, Embedding<float>>
Creates a AI.IEmbeddingGenerator`2 from the Inference.EmbeddingsClient registered in the service collection.
AddKeyedAzureChatCompletionsClient(IHostApplicationBuilder, string, Action<ChatCompletionsClientSettings>, Action<IAzureClientBuilder<ChatCompletionsClient, AzureAIInferenceClientOptions>>)extension
Adds a Inference.ChatCompletionsClient to the application and configures it with the specified settings.
AddKeyedAzureEmbeddingsClient(IHostApplicationBuilder, string, Action<ChatCompletionsClientSettings>, Action<IAzureClientBuilder<EmbeddingsClient, AzureAIInferenceClientOptions>>)extension
Adds a Inference.EmbeddingsClient to the application and configures it with the specified settings.
AddKeyedChatClient(AspireChatCompletionsClientBuilder, string, string?)extension
ChatClientBuilder
Creates a AI.IChatClient from the Inference.ChatCompletionsClient registered in the service collection.
AddKeyedEmbeddingGenerator(AspireEmbeddingsClientBuilder, string, string?)extension
EmbeddingGeneratorBuilder<string, Embedding<float>>
Creates a AI.IEmbeddingGenerator`2 from the Inference.EmbeddingsClient registered in the service collection.
View all methods