Skip to content

Commit aaf52be

Browse files
Merge pull request #45770 from dotnet/main
Merge main into live
2 parents 0eed6d3 + f3091f7 commit aaf52be

File tree

200 files changed

+714
-519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+714
-519
lines changed

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ jobs:
7171

7272
# Upload the results to GitHub's code scanning dashboard.
7373
- name: "Upload to code-scanning"
74-
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
74+
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
7575
with:
7676
sarif_file: results.sarif

docs/ai/azure-ai-services-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Authenticate to Azure OpenAI using .NET
33
description: Learn about the different options to authenticate to Azure OpenAI and other services using .NET
44
author: alexwolfmsft
55
ms.topic: conceptual
6-
ms.date: 06/27/2024
6+
ms.date: 04/09/2025
77
---
88

99
# Azure AI services authentication and authorization using .NET

docs/ai/conceptual/prompt-engineering-dotnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Prompt Engineering concepts
33
description: Learn basic prompt engineering concepts and how to implement them using .NET tools such as the Semantic Kernel SDK
44
author: catbutler
55
ms.topic: concept-article #Don't change.
6-
ms.date: 06/21/2024
6+
ms.date: 04/09/2025
77

88
#customer intent: As a .NET developer, I want to understand prompt engineering techniques for .NET so that I can build more efficient and targeted AI apps.
99

docs/ai/get-started/dotnet-ai-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Develop .NET applications with AI features
33
description: Learn how you can build .NET applications that include AI features.
4-
ms.date: 07/30/2024
4+
ms.date: 04/09/2025
55
ms.topic: overview
66
ms.custom: devx-track-dotnet, devx-track-dotnet-ai
77
---

docs/ai/how-to/app-service-aoai-auth.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ az role assignment create --assignee "<managedIdentityObjectID>" \
153153
1. Add the following NuGet packages to your app:
154154

155155
```dotnetcli
156-
dotnet package add Azure.Identity
157-
dotnet package add Azure.AI.OpenAI
158-
dotnet package add Microsoft.Extensions.Azure
159-
dotnet package add Microsoft.Extensions.AI
160-
dotnet package add Microsoft.Extensions.AI.OpenAI
156+
dotnet add package Azure.Identity
157+
dotnet add package Azure.AI.OpenAI
158+
dotnet add package Microsoft.Extensions.Azure
159+
dotnet add package Microsoft.Extensions.AI
160+
dotnet add package Microsoft.Extensions.AI.OpenAI
161161
```
162162
163163
The preceding packages each handle the following concerns for this scenario:

docs/ai/how-to/content-filtering.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ To use the sample code in this article, you need to create and assign a content
3131

3232
1. Add the [`Azure.AI.OpenAI`](https://www.nuget.org/packages/Azure.AI.OpenAI) NuGet package to your project.
3333

34-
```dotnetcli
35-
dotnet package add Azure.AI.OpenAI
36-
```
34+
```dotnetcli
35+
dotnet add package Azure.AI.OpenAI
36+
```
37+
38+
Or, in .NET 10+:
39+
40+
```dotnetcli
41+
dotnet package add Azure.AI.OpenAI
42+
```
3743

3844
1. Create a simple chat completion flow in your .NET app using the `AzureOpenAiClient`. Replace the `YOUR_MODEL_ENDPOINT` and `YOUR_MODEL_DEPLOYMENT_NAME` values with your own.
3945

docs/ai/how-to/snippets/content-filtering/AIContentFiltering.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<ItemGroup>
1111
<PackageReference Include="Azure.AI.OpenAI" />
1212
<PackageReference Include="Azure.Identity" Version="1.13.2" />
13-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25161.3" />
14-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
13+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
14+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.0-preview.1.25207.5" />
1515
</ItemGroup>
1616

1717
</Project>

docs/ai/how-to/snippets/content-filtering/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
IChatClient client =
66
new AzureOpenAIClient(
77
new Uri("YOUR_MODEL_ENDPOINT"),
8-
new DefaultAzureCredential()).AsChatClient("YOUR_MODEL_DEPLOYMENT_NAME");
8+
new DefaultAzureCredential()).GetChatClient("YOUR_MODEL_DEPLOYMENT_NAME").AsIChatClient();
99

1010
try
1111
{

docs/ai/how-to/snippets/hosted-app-auth/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626

2727
builder.Services.AddChatClient(
2828
new AzureOpenAIClient(new Uri(endpoint), credential)
29-
.AsChatClient(deployment));
29+
.GetChatClient(deployment)
30+
.AsIChatClient());
3031

3132
var app = builder.Build();
3233

docs/ai/how-to/snippets/hosted-app-auth/hosted-app-auth.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<ItemGroup>
1111
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
1212
<PackageReference Include="Azure.Identity" Version="1.13.2" />
13-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.3" />
14-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25161.3" />
15-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
13+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.4" />
14+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
15+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.0-preview.1.25207.5" />
1616
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.11.0" />
1717
</ItemGroup>
1818

0 commit comments

Comments
 (0)