From 3b2fb2c1d43cadbf38709f4f93540994b874b711 Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 13 May 2025 15:24:07 -0500 Subject: [PATCH 01/11] Initial draft of Azure AI Inference content --- docs/azureai/azureai-inference-integration.md | 183 ++++++++++++++++++ docs/toc.yml | 3 + 2 files changed, 186 insertions(+) create mode 100644 docs/azureai/azureai-inference-integration.md diff --git a/docs/azureai/azureai-inference-integration.md b/docs/azureai/azureai-inference-integration.md new file mode 100644 index 0000000000..8e1c8796c8 --- /dev/null +++ b/docs/azureai/azureai-inference-integration.md @@ -0,0 +1,183 @@ +--- +title: Azure AI Inference +description: Learn how to use the .NET Aspire Azure AI Inference integration to deploy and manage machine learning models in the cloud. +ms.date: 05/13/2025 +titleSuffix: '' +--- + +# .NET Aspire Azure AI Inference integration (Preview) + +[!INCLUDE [includes-client](../includes/includes-client.md)] + +The .NET Aspire Azure AI Inference integration provides a seamless way to deploy and manage machine learning models in the cloud. This integration allows you to leverage the power of Azure's AI services while maintaining the flexibility and ease of use of the .NET Aspire framework. + +## Hosting integration + +There's currently no hosting integration for the Azure AI Inference library. However, you can model a reference to this resource in your app host project, and connect to an existing Azure AI Foundry resource using the API. + +### Connect to an existing Azure AI Foundry service + +If you already have an Azure AI Foundry service, you can easily connect to it by adding a connection string to your app host. This approach uses a simple, string-based configuration. To establish the connection, use the method: + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var aiFoundry = builder.AddConnectionString("ai-foundry"); + +builder.AddProject() + .WithReference(aiFoundry); + +// After adding all resources, run the app... +``` + +[!INCLUDE [connection-strings-alert](../includes/connection-strings-alert.md)] + +The connection string is configured in the app host's configuration, typically under User Secrets, under the `ConnectionStrings` section: + +```json +{ + "ConnectionStrings": { + "ai-foundry": "Endpoint=https://{endpoint}/;DeploymentId={deploymentName}" + } +} +``` + +For more information, see [Add existing Azure resources with connection strings](../azure/integrations-overview.md#add-existing-azure-resources-with-connection-strings). + +## Client integration + +To get started with the .NET Aspire Azure AI Inference client integration, install the [📦 Aspire.Azure.AI.Inference](https://www.nuget.org/packages/Aspire.Azure.AI.Inference) NuGet package in the client-consuming project, that is, the project for the application that uses the Azure OpenAI client. + +### [.NET CLI](#tab/dotnet-cli) + +```dotnetcli +dotnet add package Aspire.Azure.AI.Inference +``` + +### [PackageReference](#tab/package-reference) + +```xml + +``` + +--- + +For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-package) or [Manage package dependencies in .NET applications](/dotnet/core/tools/dependencies). + +### Add an Azure AI Inference client + +In the _Program.cs_ file of your client-consuming project, use the `AddChatCompletionsClient` method on any to register an for dependency injection (DI). + +```csharp +builder.AddChatCompletionsClient(connectionName: "ai-foundry"); +``` + +> [!TIP] +> The `connectionName` parameter must match the name used when adding the Azure OpenAI resource in the app host project. For more information, see [Connect to an existing Azure AI Foundry service](#connect-to-an-existing-azure-ai-foundry-service). + +After adding the `ChatCompletionsClient`, you can retrieve the client instance using dependency injection: + +```csharp +public class ExampleService(ChatCompletionsClient client) +{ + // Use client... +} +``` + +For more information, see: + +- [What is Azure AI model inference?](/azure/ai-foundry/model-inference/overview) for details on Azure AI model interfence. +- [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection) for details on dependency injection. +- [The Azure AI Foundry SDK: C#](/azure/ai-foundry/how-to/develop/sdk-overview?tabs=sync&pivots=programming-language-csharp). + +### Configuration + +The .NET Aspire Azure AI Inference library provides multiple options to configure the Azure AI Foundry Service based on the requirements and conventions of your project. + +> [!NOTE] +> Either an `Endpoint` and `DeploymentId`, or a `ConnectionString` is required to be supplied. + +#### Use a connection string + +A connection can be constructed from the `Keys`, `Deployment ID` and `Endpoint` tab with the format: + +```Connection string +Endpoint={endpoint};Key={key};DeploymentId={deploymentId}` +``` + +You can provide the name of the connection string when calling `builder.AddChatCompletionsClient()`: + +```csharp +builder.AddChatCompletionsClient( + connectionName: "connection-string-name"); +``` + +The connection string is retrieved from the `ConnectionStrings` configuration section. Two connection formats are supported: + +##### Azure AI Foundry endpoint + +The recommended approach is to use an `Endpoint`, which works with the `ChatCompletionsClientSettings.Credential` property to establish a connection. If no credential is configured, the is used. + +```json +{ + "ConnectionStrings": { + "connection-string-name": "Endpoint=https://{endpoint}/;DeploymentId={deploymentName}" + } +} +``` + +##### Connection string + +Alternatively, a custom connection string can be used. + +```json +{ + "ConnectionStrings": { + "connection-string-name": "Endpoint=https://{endpoint}/;Key={account_key};DeploymentId={deploymentName}" + } +} +``` + +#### Use configuration providers + +The .NET Aspire Azure AI Inference library supports . It loads the `ChatCompletionsClientSettings` and `AzureAIInferenceClientOptions` from configuration by using the `Aspire:Azure:AI:Inference` key. For example, consider an _appsettings.json_ that configures some of the options: + +```json +{ + "Aspire": { + "Azure": { + "AI": { + "Inference": { + "DisableTracing": false, + "ClientOptions": { + "UserAgentApplicationId": "myapp" + } + } + } + } + } +} +``` + +#### Use inline delegates + +You can also pass the `Action configureSettings` delegate to set up some or all the options inline, for example to disable tracing from code: + +```csharp +builder.AddChatCompletionsClient( + connectionName: "connection-string-name", + static settings => settings.DisableTracing = true); +``` + +#### Experimental telemetry + +Azure AI OpenAI telemetry support is experimental, and the shape of traces may change in the future without notice. It can be enabled by invoking: + +```csharp +AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true); +``` + +Alternatively, you can see the `AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE` environment variable to `"true"`. + +## See also diff --git a/docs/toc.yml b/docs/toc.yml index f7b6d48e15..43b322826e 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -159,6 +159,9 @@ items: href: azure/user-assigned-managed-identity.md - name: Manage role assignments href: azure/role-assignments.md + - name: Azure AI Inference (Preview) + displayName: azure ai,inference + href: azureai/azureai-inference-integration.md - name: Azure AI Search displayName: azure search,search,azure ai,cognitive search,cognitive services href: azureai/azureai-search-document-integration.md From a329193e62a8738a8cb15fec6c7cc0d950917911 Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 13 May 2025 15:48:50 -0500 Subject: [PATCH 02/11] Tweak text --- docs/azureai/azureai-inference-integration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/azureai/azureai-inference-integration.md b/docs/azureai/azureai-inference-integration.md index 8e1c8796c8..ba46fa4775 100644 --- a/docs/azureai/azureai-inference-integration.md +++ b/docs/azureai/azureai-inference-integration.md @@ -13,7 +13,7 @@ The .NET Aspire Azure AI Inference integration provides a seamless way to deploy ## Hosting integration -There's currently no hosting integration for the Azure AI Inference library. However, you can model a reference to this resource in your app host project, and connect to an existing Azure AI Foundry resource using the API. +Although the Azure AI Inference library doesn't currently offer direct hosting integration, you can still integrate it into your app host project. Simply add a connection string to establish a reference to an existing Azure AI Foundry resource. ### Connect to an existing Azure AI Foundry service @@ -102,7 +102,7 @@ The .NET Aspire Azure AI Inference library provides multiple options to configur A connection can be constructed from the `Keys`, `Deployment ID` and `Endpoint` tab with the format: -```Connection string +```Plaintext Endpoint={endpoint};Key={key};DeploymentId={deploymentId}` ``` From 2cd1df06818fe1e7a8bfe4ea5a944100a6212aa2 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 06:49:05 -0500 Subject: [PATCH 03/11] Tweak include text --- docs/includes/includes-client.md | 2 +- docs/includes/includes-hosting-and-client.md | 2 +- docs/includes/includes-hosting.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/includes/includes-client.md b/docs/includes/includes-client.md index 6c46eefc4d..549370670d 100644 --- a/docs/includes/includes-client.md +++ b/docs/includes/includes-client.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Client integration not :::image type="icon" source="../media/no-icon.svg" border="false"::: Hosting integration +**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Client integration only — :::image type="icon" source="../media/no-icon.svg" border="false"::: Hosting integration not included diff --git a/docs/includes/includes-hosting-and-client.md b/docs/includes/includes-hosting-and-client.md index 03b7e349b8..48a5b50d4b 100644 --- a/docs/includes/includes-hosting-and-client.md +++ b/docs/includes/includes-hosting-and-client.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Hosting integration and :::image type="icon" source="../media/yes-icon.svg" border="false"::: Client integration +**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Hosting and :::image type="icon" source="../media/yes-icon.svg" border="false"::: Client integrations diff --git a/docs/includes/includes-hosting.md b/docs/includes/includes-hosting.md index 5358c764c4..81a3f186b6 100644 --- a/docs/includes/includes-hosting.md +++ b/docs/includes/includes-hosting.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Hosting integration not :::image type="icon" source="../media/no-icon.svg" border="false"::: Client integration +**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Hosting integration only — :::image type="icon" source="../media/no-icon.svg" border="false"::: Client integration not included From 333abe52d788642c5a4ffe7da7e31c5d9f951de4 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 06:49:58 -0500 Subject: [PATCH 04/11] Remove framework --- docs/azureai/azureai-inference-integration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/azureai/azureai-inference-integration.md b/docs/azureai/azureai-inference-integration.md index ba46fa4775..a8f335e9bd 100644 --- a/docs/azureai/azureai-inference-integration.md +++ b/docs/azureai/azureai-inference-integration.md @@ -1,7 +1,7 @@ --- title: Azure AI Inference description: Learn how to use the .NET Aspire Azure AI Inference integration to deploy and manage machine learning models in the cloud. -ms.date: 05/13/2025 +ms.date: 05/14/2025 titleSuffix: '' --- @@ -9,7 +9,7 @@ titleSuffix: '' [!INCLUDE [includes-client](../includes/includes-client.md)] -The .NET Aspire Azure AI Inference integration provides a seamless way to deploy and manage machine learning models in the cloud. This integration allows you to leverage the power of Azure's AI services while maintaining the flexibility and ease of use of the .NET Aspire framework. +The .NET Aspire Azure AI Inference integration provides a seamless way to deploy and manage machine learning models in the cloud. This integration allows you to leverage the power of Azure's AI services while maintaining the flexibility and ease of use of the .NET Aspire. ## Hosting integration From 0d5ff842d6248041587b2811716795f851e378ef Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 08:33:48 -0500 Subject: [PATCH 05/11] Added logging and tracing sections. --- docs/azureai/azureai-inference-integration.md | 53 ++++++++++++++++--- docs/includes/includes-client.md | 3 +- docs/includes/includes-hosting-and-client.md | 2 +- docs/includes/includes-hosting.md | 2 +- 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/docs/azureai/azureai-inference-integration.md b/docs/azureai/azureai-inference-integration.md index a8f335e9bd..ea8e3d9e76 100644 --- a/docs/azureai/azureai-inference-integration.md +++ b/docs/azureai/azureai-inference-integration.md @@ -46,7 +46,7 @@ For more information, see [Add existing Azure resources with connection strings] ## Client integration -To get started with the .NET Aspire Azure AI Inference client integration, install the [📦 Aspire.Azure.AI.Inference](https://www.nuget.org/packages/Aspire.Azure.AI.Inference) NuGet package in the client-consuming project, that is, the project for the application that uses the Azure OpenAI client. +To get started with the .NET Aspire Azure AI Inference client integration, install the [📦 Aspire.Azure.AI.Inference](https://www.nuget.org/packages/Aspire.Azure.AI.Inference) NuGet package in the client-consuming project, that is, the project for the application that uses the Azure AI Inference client. ### [.NET CLI](#tab/dotnet-cli) @@ -74,7 +74,7 @@ builder.AddChatCompletionsClient(connectionName: "ai-foundry"); ``` > [!TIP] -> The `connectionName` parameter must match the name used when adding the Azure OpenAI resource in the app host project. For more information, see [Connect to an existing Azure AI Foundry service](#connect-to-an-existing-azure-ai-foundry-service). +> The `connectionName` parameter must match the name used when adding the Azure AI Inference resource in the app host project. For more information, see [Connect to an existing Azure AI Foundry service](#connect-to-an-existing-azure-ai-foundry-service). After adding the `ChatCompletionsClient`, you can retrieve the client instance using dependency injection: @@ -91,6 +91,31 @@ For more information, see: - [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection) for details on dependency injection. - [The Azure AI Foundry SDK: C#](/azure/ai-foundry/how-to/develop/sdk-overview?tabs=sync&pivots=programming-language-csharp). +### Add keyed Azure AI Inference clients + +There might be situations where you want to register multiple `ChatCompletionsClient` instances with different connection names. To register keyed Azure AI Inference clients, call the `AddKeyedAzureChatCompletionsClient` method: + +```csharp +builder.AddKeyedAzureChatCompletionsClient(name: "chat"); +builder.AddKeyedAzureChatCompletionsClient(name: "code"); +``` + +> [!IMPORTANT] +> When using keyed services, ensure that your Azure AI Inference resource configures two named connections, one for `chat` and one for `code`. + +Then you can retrieve the client instances using dependency injection. For example, to retrieve the clients from a service: + +```csharp +public class ExampleService( + [KeyedService("chat")] ChatCompletionsClient chatClient, + [KeyedService("code")] ChatCompletionsClient codeClient) +{ + // Use clients... +} +``` + +For more information, see [Keyed services in .NET](/dotnet/core/extensions/dependency-injection#keyed-services). + ### Configuration The .NET Aspire Azure AI Inference library provides multiple options to configure the Azure AI Foundry Service based on the requirements and conventions of your project. @@ -170,14 +195,26 @@ builder.AddChatCompletionsClient( static settings => settings.DisableTracing = true); ``` -#### Experimental telemetry +[!INCLUDE [integration-observability-and-telemetry](../includes/integration-observability-and-telemetry.md)] -Azure AI OpenAI telemetry support is experimental, and the shape of traces may change in the future without notice. It can be enabled by invoking: +### Logging -```csharp -AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true); -``` +The .NET Aspire Azure AI Inference integration uses the following log categories: + +- `Azure.Core` +- `Azure.Identity` + +### Tracing + +The .NET Aspire Azure AI Inference integration emits tracing activities using OpenTelemetry for operations performed with the `OpenAIClient`. -Alternatively, you can see the `AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE` environment variable to `"true"`. +> [!IMPORTANT] +> Azure AI Inference telemetry support is experimental, and the shape of traces may change in the future without notice. It can be enabled by invoking: +> +> ```csharp +> AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true); +> ``` +> +> Alternatively, you can set the `AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE` environment variable to `"true"`. ## See also diff --git a/docs/includes/includes-client.md b/docs/includes/includes-client.md index 549370670d..814f2755c7 100644 --- a/docs/includes/includes-client.md +++ b/docs/includes/includes-client.md @@ -2,4 +2,5 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Client integration only — :::image type="icon" source="../media/no-icon.svg" border="false"::: Hosting integration not included +**Includes:** :::image type="icon" source="../media/no-icon.svg" border="false" alt-text="Hosting integration not included"::: Hosting integration — :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration + diff --git a/docs/includes/includes-hosting-and-client.md b/docs/includes/includes-hosting-and-client.md index 48a5b50d4b..fa02d6c10e 100644 --- a/docs/includes/includes-hosting-and-client.md +++ b/docs/includes/includes-hosting-and-client.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Hosting and :::image type="icon" source="../media/yes-icon.svg" border="false"::: Client integrations +**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Hosting integration included"::: Hosting integration —&— :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration diff --git a/docs/includes/includes-hosting.md b/docs/includes/includes-hosting.md index 81a3f186b6..57528ddac8 100644 --- a/docs/includes/includes-hosting.md +++ b/docs/includes/includes-hosting.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false"::: Hosting integration only — :::image type="icon" source="../media/no-icon.svg" border="false"::: Client integration not included +**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Hosting integration included"::: Hosting integration — :::image type="icon" source="../media/no-icon.svg" border="false" alt-text="Client integration not included"::: Client integration From 84001edd1a30d3d1c97ea1e6cb6d603a8d58fcd7 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 08:37:15 -0500 Subject: [PATCH 06/11] Correct MD warning --- docs/includes/includes-client.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/includes/includes-client.md b/docs/includes/includes-client.md index 814f2755c7..fb11ca0b92 100644 --- a/docs/includes/includes-client.md +++ b/docs/includes/includes-client.md @@ -3,4 +3,3 @@ ms.topic: include --- **Includes:** :::image type="icon" source="../media/no-icon.svg" border="false" alt-text="Hosting integration not included"::: Hosting integration — :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration - From 41c210b0e7d251185fcd0f4642f1d79a2a314df8 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 09:34:12 -0500 Subject: [PATCH 07/11] Remove icon usage for alt-text --- docs/includes/includes-client.md | 2 +- docs/includes/includes-hosting-and-client.md | 2 +- docs/includes/includes-hosting.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/includes/includes-client.md b/docs/includes/includes-client.md index fb11ca0b92..41d6812289 100644 --- a/docs/includes/includes-client.md +++ b/docs/includes/includes-client.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/no-icon.svg" border="false" alt-text="Hosting integration not included"::: Hosting integration — :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration +**Includes:** :::image source="../media/no-icon.svg" border="false" alt-text="Hosting integration not included"::: Hosting integration — :::image source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration diff --git a/docs/includes/includes-hosting-and-client.md b/docs/includes/includes-hosting-and-client.md index fa02d6c10e..1511c82ca6 100644 --- a/docs/includes/includes-hosting-and-client.md +++ b/docs/includes/includes-hosting-and-client.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Hosting integration included"::: Hosting integration —&— :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration +**Includes:** :::image source="../media/yes-icon.svg" border="false" alt-text="Hosting integration included"::: Hosting integration —&— :::image source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration diff --git a/docs/includes/includes-hosting.md b/docs/includes/includes-hosting.md index 57528ddac8..5f69b15cf4 100644 --- a/docs/includes/includes-hosting.md +++ b/docs/includes/includes-hosting.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image type="icon" source="../media/yes-icon.svg" border="false" alt-text="Hosting integration included"::: Hosting integration — :::image type="icon" source="../media/no-icon.svg" border="false" alt-text="Client integration not included"::: Client integration +**Includes:** :::image source="../media/yes-icon.svg" border="false" alt-text="Hosting integration included"::: Hosting integration — :::image source="../media/no-icon.svg" border="false" alt-text="Client integration not included"::: Client integration From 73c71f4ab2f76ff4c268560076de617555077108 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 09:38:37 -0500 Subject: [PATCH 08/11] Trying something slightly different --- docs/includes/includes-client.md | 2 +- docs/includes/includes-hosting.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/includes/includes-client.md b/docs/includes/includes-client.md index 41d6812289..89393e5537 100644 --- a/docs/includes/includes-client.md +++ b/docs/includes/includes-client.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image source="../media/no-icon.svg" border="false" alt-text="Hosting integration not included"::: Hosting integration — :::image source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration +**Includes:** :::image source="../media/no-icon.svg" border="false" alt-text="Hosting integration not included"::: Hosting integration only — :::image source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration not included diff --git a/docs/includes/includes-hosting.md b/docs/includes/includes-hosting.md index 5f69b15cf4..63a234471d 100644 --- a/docs/includes/includes-hosting.md +++ b/docs/includes/includes-hosting.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image source="../media/yes-icon.svg" border="false" alt-text="Hosting integration included"::: Hosting integration — :::image source="../media/no-icon.svg" border="false" alt-text="Client integration not included"::: Client integration +**Includes:** :::image source="../media/yes-icon.svg" border="false" alt-text="Hosting integration included"::: Hosting integration only — :::image source="../media/no-icon.svg" border="false" alt-text="Client integration not included"::: Client integration not included From d911532c6448070c3450e5614eea75be9cd61a5f Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 09:39:51 -0500 Subject: [PATCH 09/11] Fix text --- docs/includes/includes-client.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/includes/includes-client.md b/docs/includes/includes-client.md index 89393e5537..56b993b315 100644 --- a/docs/includes/includes-client.md +++ b/docs/includes/includes-client.md @@ -2,4 +2,4 @@ ms.topic: include --- -**Includes:** :::image source="../media/no-icon.svg" border="false" alt-text="Hosting integration not included"::: Hosting integration only — :::image source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration not included +**Includes:** :::image source="../media/yes-icon.svg" border="false" alt-text="Client integration included"::: Client integration only — :::image source="../media/no-icon.svg" border="false" alt-text="Hosting integration not included"::: Hosting integration not included From 024033e5607d83095124e2d3196a9e3d67c6fd41 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 12:16:22 -0500 Subject: [PATCH 10/11] Apply suggestions from code review Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com> --- docs/azureai/azureai-inference-integration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/azureai/azureai-inference-integration.md b/docs/azureai/azureai-inference-integration.md index ea8e3d9e76..e2e38c0603 100644 --- a/docs/azureai/azureai-inference-integration.md +++ b/docs/azureai/azureai-inference-integration.md @@ -17,7 +17,7 @@ Although the Azure AI Inference library doesn't currently offer direct hosting i ### Connect to an existing Azure AI Foundry service -If you already have an Azure AI Foundry service, you can easily connect to it by adding a connection string to your app host. This approach uses a simple, string-based configuration. To establish the connection, use the method: +If you already have an [Azure AI Foundry](https://ai.azure.com/) service, you can easily connect to it by adding a connection string to your app host. This approach uses a simple, string-based configuration. To establish the connection, use the method: ```csharp var builder = DistributedApplication.CreateBuilder(args); @@ -142,7 +142,7 @@ The connection string is retrieved from the `ConnectionStrings` configuration se ##### Azure AI Foundry endpoint -The recommended approach is to use an `Endpoint`, which works with the `ChatCompletionsClientSettings.Credential` property to establish a connection. If no credential is configured, the is used. +The recommended approach is to use an `Endpoint`, which works with the `ChatCompletionsClientSettings.Credential` property to establish a connection. If no credential is configured, is used. ```json { @@ -187,7 +187,7 @@ The .NET Aspire Azure AI Inference library supports configureSettings` delegate to set up some or all the options inline, for example to disable tracing from code: +You can also pass the `Action configureSettings` delegate to set up some or all the options inline, for example, to disable tracing from code: ```csharp builder.AddChatCompletionsClient( From e93fa7c127e11af13b6213787c0442d5572e0367 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 14 May 2025 12:38:44 -0500 Subject: [PATCH 11/11] Update docs/azureai/azureai-inference-integration.md --- docs/azureai/azureai-inference-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/azureai/azureai-inference-integration.md b/docs/azureai/azureai-inference-integration.md index e2e38c0603..dd17ab472b 100644 --- a/docs/azureai/azureai-inference-integration.md +++ b/docs/azureai/azureai-inference-integration.md @@ -1,5 +1,5 @@ --- -title: Azure AI Inference +title: .NET Aspire Azure AI Inference integration (Preview) description: Learn how to use the .NET Aspire Azure AI Inference integration to deploy and manage machine learning models in the cloud. ms.date: 05/14/2025 titleSuffix: ''