Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite the .NET Aspire Azure OpenAI integration article #2722

Merged
merged 14 commits into from
Mar 6, 2025
Merged
340 changes: 287 additions & 53 deletions docs/azureai/azureai-openai-integration.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/caching/includes/redis-client-json-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ The .NET Aspire Stack Exchange Redis integration supports <xref:Microsoft.Extens
}
```

For the complete Redis client integration JSON schema, see [Aspire.StackExchange.Redis/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.StackExchange.Redis/ConfigurationSchema.json).
For the complete Redis client integration JSON schema, see [Aspire.StackExchange.Redis/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.StackExchange.Redis/ConfigurationSchema.json).
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ The .NET Aspire Stack Exchange Redis distributed caching integration supports <x
}
```

For the complete Redis distributed caching client integration JSON schema, see [Aspire.StackExchange.Redis.DistributedCaching/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.StackExchange.Redis.DistributedCaching/ConfigurationSchema.json).
For the complete Redis distributed caching client integration JSON schema, see [Aspire.StackExchange.Redis.DistributedCaching/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.StackExchange.Redis.DistributedCaching/ConfigurationSchema.json).
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ The .NET Aspire Stack Exchange Redis output caching integration supports <xref:M
}
```

For the complete Redis output caching client integration JSON schema, see [Aspire.StackExchange.Redis.OutputCaching/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.StackExchange.Redis.OutputCaching/ConfigurationSchema.json).
For the complete Redis output caching client integration JSON schema, see [Aspire.StackExchange.Redis.OutputCaching/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.StackExchange.Redis.OutputCaching/ConfigurationSchema.json).
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The .NET Aspire Microsoft Entity Framework Core Cosmos DB integration supports <
}
```

For the complete Cosmos DB client integration JSON schema, see [Aspire.Microsoft.EntityFrameworkCore.Cosmos/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Microsoft.EntityFrameworkCore.Cosmos/ConfigurationSchema.json).
For the complete Cosmos DB client integration JSON schema, see [Aspire.Microsoft.EntityFrameworkCore.Cosmos/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Microsoft.EntityFrameworkCore.Cosmos/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/database/azure-cosmos-db-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The .NET Aspire Azure Cosmos DB integration supports <xref:Microsoft.Extensions.
}
```

For the complete Cosmos DB client integration JSON schema, see [Aspire.Microsoft.Azure.Cosmos/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Microsoft.Azure.Cosmos/ConfigurationSchema.json).
For the complete Cosmos DB client integration JSON schema, see [Aspire.Microsoft.Azure.Cosmos/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Microsoft.Azure.Cosmos/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/database/includes/postgresql-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The following example shows an _:::no-loc text="appsettings.json":::_ file that
}
```

For the complete PostgreSQL client integration JSON schema, see [Aspire.Npgsql/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Npgsql/ConfigurationSchema.json).
For the complete PostgreSQL client integration JSON schema, see [Aspire.Npgsql/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Npgsql/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/database/includes/postgresql-ef-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ The following example shows an _:::no-loc text="appsettings.json":::_ file that
}
```

For the complete PostgreSQL Entity Framework Core client integration JSON schema, see [Aspire.Npgsql.EntityFrameworkCore.PostgreSQL/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Npgsql.EntityFrameworkCore.PostgreSQL/ConfigurationSchema.json).
For the complete PostgreSQL Entity Framework Core client integration JSON schema, see [Aspire.Npgsql.EntityFrameworkCore.PostgreSQL/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Npgsql.EntityFrameworkCore.PostgreSQL/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/database/milvus-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ The .NET Aspire Milvus client integration supports <xref:Microsoft.Extensions.Co
}
```

For the complete Milvus client integration JSON schema, see [Aspire.Milvus.Client/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Milvus.Client/ConfigurationSchema.json).
For the complete Milvus client integration JSON schema, see [Aspire.Milvus.Client/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Milvus.Client/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/database/qdrant-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ The .NET Aspire Qdrant client integration supports <xref:Microsoft.Extensions.Co
}
```

For the complete Qdrant client integration JSON schema, see [Aspire.Qdrant.Client/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Qdrant.Client/ConfigurationSchema.json).
For the complete Qdrant client integration JSON schema, see [Aspire.Qdrant.Client/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Qdrant.Client/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/logging/seq-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ The .NET Aspire Seq integration supports <xref:Microsoft.Extensions.Configuratio
}
```

For the complete Seq client integration JSON schema, see [Aspire.Seq/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Microsoft.Data.SqlClient/ConfigurationSchema.json).
For the complete Seq client integration JSON schema, see [Aspire.Seq/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Microsoft.Data.SqlClient/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/messaging/azure-service-bus-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ The .NET Aspire Azure Service Bus integration supports <xref:Microsoft.Extension
}
```

For the complete Service Bus client integration JSON schema, see [Aspire.Azure.Messaging.ServiceBus/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Azure.Messaging.ServiceBus/ConfigurationSchema.json).
For the complete Service Bus client integration JSON schema, see [Aspire.Azure.Messaging.ServiceBus/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Azure.Messaging.ServiceBus/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/messaging/kafka-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ The `Config` properties of both `Aspire:Confluent:Kafka:Producer` and `Aspire.C

`Confluent.Kafka.Consumer<TKey, TValue>` requires the `ClientId` property to be set to let the broker track consumed message offsets.

For the complete Kafka client integration JSON schema, see [Aspire.Confluent.Kafka/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Confluent.Kafka/ConfigurationSchema.json).
For the complete Kafka client integration JSON schema, see [Aspire.Confluent.Kafka/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Confluent.Kafka/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/messaging/nats-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ The .NET Aspire NATS integration supports <xref:Microsoft.Extensions.Configurati
}
```

For the complete NATS client integration JSON schema, see [Aspire.NATS.Net/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.NATS.Net/ConfigurationSchema.json).
For the complete NATS client integration JSON schema, see [Aspire.NATS.Net/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.NATS.Net/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/messaging/rabbitmq-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ The .NET Aspire RabbitMQ integration supports <xref:Microsoft.Extensions.Configu
}
```

For the complete RabbitMQ client integration JSON schema, see [Aspire.RabbitMQ.Client/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.RabbitMQ.Client/ConfigurationSchema.json).
For the complete RabbitMQ client integration JSON schema, see [Aspire.RabbitMQ.Client/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.RabbitMQ.Client/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/search/elasticsearch-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ The .NET Aspire Elasticsearch Client integration supports <xref:Microsoft.Extens
}
```

For the complete Elasticsearch client integration JSON schema, see [Aspire.Elastic.Clients.Elasticsearch/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Elastic.Clients.Elasticsearch/ConfigurationSchema.json).
For the complete Elasticsearch client integration JSON schema, see [Aspire.Elastic.Clients.Elasticsearch/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Elastic.Clients.Elasticsearch/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/security/azure-security-key-vault-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ The .NET Aspire Azure Key Vault integration supports <xref:Microsoft.Extensions.
}
```

For the complete Azure Key Vault client integration JSON schema, see [Aspire.Azure.Security.KeyVault/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Azure.Security.KeyVault/ConfigurationSchema.json).
For the complete Azure Key Vault client integration JSON schema, see [Aspire.Azure.Security.KeyVault/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Azure.Security.KeyVault/ConfigurationSchema.json).

If you have set up your configurations in the `Aspire:Azure:Security:KeyVault` section of your _:::no-loc text="appsettings.json":::_ file you can just call the method `AddAzureKeyVaultSecrets` without passing any parameters.

Expand Down
23 changes: 23 additions & 0 deletions docs/snippets/azure/AppHost/Program.ConfigureOpenAIInfra.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Azure.Provisioning.CognitiveServices;

internal static partial class Program
{
public static void ConfigureOpenAIInfra(IDistributedApplicationBuilder builder)
{
// <configure>
builder.AddAzureOpenAI("openai")
.ConfigureInfrastructure(infra =>
{
var resources = infra.GetProvisionableResources();
var account = resources.OfType<CognitiveServicesAccount>().Single();

account.Sku = new CognitiveServicesSku
{
Tier = CognitiveServicesSkuTier.Enterprise,
Name = "E0"
};
account.Tags.Add("ExampleKey", "Example value");
});
// </configure>
}
}
2 changes: 1 addition & 1 deletion docs/storage/azure-storage-blobs-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ The .NET Aspire Azure Blob Storage integration supports <xref:Microsoft.Extensio
}
```

For the complete Azure Blob Storage client integration JSON schema, see [Aspire.Azure.Storage.Blobs/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Azure.Storage.Blobs/ConfigurationSchema.json).
For the complete Azure Blob Storage client integration JSON schema, see [Aspire.Azure.Storage.Blobs/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Azure.Storage.Blobs/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/storage/azure-storage-queues-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ The .NET Aspire Azure Queue Storage integration supports <xref:Microsoft.Extensi
}
```

For the complete Azure Storage Queues client integration JSON schema, see [Aspire.Azure.Data.Queues/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Azure.Data.Queues/ConfigurationSchema.json).
For the complete Azure Storage Queues client integration JSON schema, see [Aspire.Azure.Data.Queues/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Azure.Data.Queues/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
2 changes: 1 addition & 1 deletion docs/storage/azure-storage-tables-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The .NET Aspire Azure Table Storage integration supports <xref:Microsoft.Extensi
}
```

For the complete Azure Data Tables client integration JSON schema, see [Aspire.Azure.Data.Tables/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.0.0/src/Components/Aspire.Azure.Data.Tables/ConfigurationSchema.json).
For the complete Azure Data Tables client integration JSON schema, see [Aspire.Azure.Data.Tables/ConfigurationSchema.json](https://github.com/dotnet/aspire/blob/v9.1.0/src/Components/Aspire.Azure.Data.Tables/ConfigurationSchema.json).

#### Use inline delegates

Expand Down
11 changes: 3 additions & 8 deletions docs/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ items:
- name: Azure PostgreSQL
displayName: postgres,postgresql,database,flexible server,azure for database
href: database/azure-postgresql-integration.md
- name: Azure OpenAI
- name: Azure OpenAI (Preview)
displayName: azure ai,openai
href: azureai/azureai-openai-integration.md
- name: Azure SignalR Service
Expand Down Expand Up @@ -248,13 +248,8 @@ items:
- name: Orleans voting sample
href: /samples/dotnet/aspire-samples/orleans-voting-sample-app-on-aspire/
- name: PostgreSQL
items:
- name: PostgreSQL - EF Core
displayName: postgresql,database,ef core
href: database/postgresql-entity-framework-integration.md
- name: PostgreSQL
displayName: postgresql,database
href: database/postgresql-integration.md
displayName: postgresql,database
href: database/postgresql-integration.md
- name: Qdrant
href: database/qdrant-integration.md
- name: RabbitMQ service broker
Expand Down
Loading