Skip to content

Commit 76c470d

Browse files
Merge pull request #44997 from dotnet/main
Merge main into live
2 parents 73b8a3d + 6173c85 commit 76c470d

File tree

49 files changed

+314
-249
lines changed

Some content is hidden

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

49 files changed

+314
-249
lines changed

docs/ai/ai-extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ IChatClient client =
4545
    new AzureAIInferenceChatClient(...);
4646
```
4747

48-
Then, regardless of the provider you're using, you can send requests by calling <xref:Microsoft.Extensions.AI.IChatClient.CompleteAsync(System.Collections.Generic.IList{Microsoft.Extensions.AI.ChatMessage},Microsoft.Extensions.AI.ChatOptions,System.Threading.CancellationToken)>, as follows:
48+
Then, regardless of the provider you're using, you can send requests by calling <xref:Microsoft.Extensions.AI.IChatClient.GetResponseAsync(System.Collections.Generic.IList{Microsoft.Extensions.AI.ChatMessage},Microsoft.Extensions.AI.ChatOptions,System.Threading.CancellationToken)>, as follows:
4949

5050
```csharp
51-
var response = await chatClient.CompleteAsync(
51+
var response = await chatClient.GetResponseAsync(
5252
      "Translate the following text into Pig Latin: I love .NET and AI");
5353

5454
Console.WriteLine(response.Message);

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" />
13-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.0.1-preview.1.24570.5" />
14-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.0.1-preview.1.24570.5" />
13+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25114.11" />
14+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25114.11" />
1515
</ItemGroup>
1616

1717
</Project>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
try
1111
{
12-
ChatCompletion completion = await client.CompleteAsync("YOUR_PROMPT");
12+
ChatResponse completion = await client.GetResponseAsync("YOUR_PROMPT");
1313

1414
Console.WriteLine(completion.Message);
15-
}
16-
catch (Exception e)
15+
}
16+
catch (Exception e)
1717
{
1818
Console.WriteLine(e.Message);
1919
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
app.MapGet("/test-prompt", async (IChatClient chatClient) =>
4242
{
43-
return await chatClient.CompleteAsync("Test prompt", new ChatOptions());
43+
return await chatClient.GetResponseAsync("Test prompt", new ChatOptions());
4444
})
4545
.WithName("Test prompt");
4646

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
@@ -11,9 +11,9 @@
1111
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
1212
<PackageReference Include="Azure.Identity" Version="1.13.2" />
1313
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
14-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.1.0-preview.1.25064.3" />
15-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.1.0-preview.1.25064.3" />
16-
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.9.0" />
14+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25114.11" />
15+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25114.11" />
16+
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.10.0" />
1717
</ItemGroup>
1818

1919
</Project>

docs/ai/quickstarts/snippets/build-chat-app/azure-openai/ChatAppAI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<ItemGroup>
1212
<PackageReference Include="Azure.Identity" Version="1.13.2" />
1313
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
14-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.0.0-preview.9.24556.5" />
14+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25114.11" />
1515
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.2" />
1616
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.2" />
1717

docs/ai/quickstarts/snippets/build-chat-app/azure-openai/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ the local nature on the hikes when making a recommendation. At the end of your
4141
Console.WriteLine("AI Response:");
4242
var response = "";
4343
await foreach (var item in
44-
chatClient.CompleteStreamingAsync(chatHistory))
44+
chatClient.GetStreamingResponseAsync(chatHistory))
4545
{
4646
Console.Write(item.Text);
4747
response += item.Text;

docs/ai/quickstarts/snippets/build-chat-app/openai/ExtensionsOpenAI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.0.0-preview.9.24556.5" />
11+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25114.11" />
1212
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.2" />
1313
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.2" />
1414
</ItemGroup>

docs/ai/quickstarts/snippets/build-chat-app/openai/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ the local nature on the hikes when making a recommendation. At the end of your
4040
Console.WriteLine("AI Response:");
4141
var response = "";
4242
await foreach (var item in
43-
chatClient.CompleteStreamingAsync(chatHistory))
43+
chatClient.GetStreamingResponseAsync(chatHistory))
4444
{
4545
Console.Write(item.Text);
4646
response += item.Text;

docs/ai/quickstarts/snippets/function-calling/openai/FunctionCallingAI.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.0.0-preview.9.24556.5" />
12-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.0.0-preview.9.24556.5" />
11+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25114.11" />
12+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25114.11" />
1313
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.2" />
1414
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.2" />
1515
</ItemGroup>

0 commit comments

Comments
 (0)