AspireAzureAIInferenceExtensions
Class static net10.0
Extension methods for adding Azure AI Inference services to an Aspire application.
namespace Microsoft.Extensions.Hosting;
public static class AspireAzureAIInferenceExtensions{ // ...} 8 members
Methods8
Section titled MethodsAddAzureChatCompletionsClient(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?)extensionChatClientBuilder Creates a
AI.IChatClient from the Inference.ChatCompletionsClient registered in the service collection. AddEmbeddingGenerator(AspireEmbeddingsClientBuilder, string?)extensionEmbeddingGeneratorBuilder<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?)extensionChatClientBuilder Creates a
AI.IChatClient from the Inference.ChatCompletionsClient registered in the service collection. AddKeyedEmbeddingGenerator(AspireEmbeddingsClientBuilder, string, string?)extensionEmbeddingGeneratorBuilder<string, Embedding<float>> Creates a
AI.IEmbeddingGenerator`2 from the Inference.EmbeddingsClient registered in the service collection.