Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a1cf429
Update: (#46122)
dependabot[bot] May 14, 2025
0d077aa
Update: (#46123)
dependabot[bot] May 14, 2025
44fae4c
Update: (#46124)
dependabot[bot] May 14, 2025
cadc93c
Update: (#46117)
dependabot[bot] May 14, 2025
298e248
Update: (#46116)
dependabot[bot] May 14, 2025
70a0d3d
Update: (#46120)
dependabot[bot] May 14, 2025
0792116
Update: (#46176)
dependabot[bot] May 14, 2025
6d0a093
Update: (#46169)
dependabot[bot] May 14, 2025
8949f29
Update: (#46170)
dependabot[bot] May 14, 2025
3d36ca3
Update: (#46181)
dependabot[bot] May 14, 2025
01b4a21
Update: (#46183)
dependabot[bot] May 14, 2025
92e4aee
Update: (#46179)
dependabot[bot] May 14, 2025
2ad7867
Update: (#46186)
dependabot[bot] May 14, 2025
887bd3f
Update Microsoft.Extensions.Configuration to 9.0.5 (#46188)
dependabot[bot] May 14, 2025
e7c6991
Update: (#46190)
dependabot[bot] May 14, 2025
c10d89b
Update System.Diagnostics.DiagnosticSource to 9.0.5 (#46185)
dependabot[bot] May 14, 2025
c52a72e
Update Azure.Monitor.OpenTelemetry.AspNetCore to 1.3.0 (#46189)
dependabot[bot] May 14, 2025
33ef637
Update: (#46178)
dependabot[bot] May 14, 2025
36ebb8a
Update: (#46193)
dependabot[bot] May 14, 2025
325a6a0
Update: (#46191)
dependabot[bot] May 14, 2025
4c1ee18
Update: (#46194)
dependabot[bot] May 14, 2025
c4cd868
Update Microsoft.Extensions.Telemetry.Abstractions to 9.5.0 (#46195)
dependabot[bot] May 14, 2025
ed09920
Update: (#46196)
dependabot[bot] May 14, 2025
30a777d
Update: (#46198)
dependabot[bot] May 14, 2025
9b51e85
Update Microsoft.Extensions.Primitives to 9.0.5 (#46202)
dependabot[bot] May 14, 2025
d8ac983
Update: (#46200)
dependabot[bot] May 14, 2025
6db8b0c
Update: (#46201)
dependabot[bot] May 14, 2025
4462555
Update: (#46204)
dependabot[bot] May 14, 2025
9476797
Update Microsoft.Extensions.DependencyInjection to 9.0.5 (#46206)
dependabot[bot] May 14, 2025
7521c07
Update Microsoft.Extensions.Logging to 9.0.5 (#46207)
dependabot[bot] May 14, 2025
64ce3e9
Update: (#46211)
dependabot[bot] May 14, 2025
33907ad
Update: (#46210)
dependabot[bot] May 14, 2025
970b192
Update: (#46212)
dependabot[bot] May 14, 2025
fdd9900
Update: (#46213)
dependabot[bot] May 14, 2025
1ccf627
Update: (#46214)
dependabot[bot] May 14, 2025
0b58b2a
Update package index with latest published versions (#46106)
azure-sdk May 14, 2025
c42af57
Clarify method renaming and async return types (#46110)
MBSadeghzadeh May 14, 2025
3ef6d5f
Update: (#46127)
dependabot[bot] May 14, 2025
09a17eb
Update: (#46132)
dependabot[bot] May 14, 2025
bc25e5e
Update: (#46157)
dependabot[bot] May 14, 2025
3975def
Update Azure.Identity to 1.13.2, 1.14.0 (#46158)
dependabot[bot] May 14, 2025
e569395
Bump actions/dependency-review-action from 4.6.0 to 4.7.1 (#46160)
dependabot[bot] May 14, 2025
58acbdc
Update: (#46166)
dependabot[bot] May 14, 2025
12e25f9
Update Azure.Core to 1.46.1 (#46167)
dependabot[bot] May 14, 2025
1af5cc0
Update MSTest to 3.8.3 (#46180)
dependabot[bot] May 14, 2025
e2b7980
Rename ChatThreadId to ConversationId (#46002)
gewarren May 14, 2025
63242ac
Update package index with latest published versions (#46215)
azure-sdk May 14, 2025
ad2ce3b
Update: (#46112)
dependabot[bot] May 14, 2025
81b54b8
Update package index with latest published versions (#46220)
azure-sdk May 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" />
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="Azure.Identity" Version="1.14.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.0-preview.1.25207.5" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.4" />
<PackageReference Include="Azure.Identity" Version="1.14.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.11.0" />
Expand Down
6 changes: 3 additions & 3 deletions docs/ai/microsoft-extensions-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ When working with a stateless service, callers maintain a list of all messages.

:::code language="csharp" source="snippets/microsoft-extensions-ai/ConsoleAI.StatelessStateful/Program.cs" id="Snippet1":::

For stateful services, you might already know the identifier used for the relevant conversation. You can put that identifier into <xref:Microsoft.Extensions.AI.ChatOptions.ChatThreadId?displayProperty=nameWithType>. Usage then follows the same pattern, except there's no need to maintain a history manually.
For stateful services, you might already know the identifier used for the relevant conversation. You can put that identifier into <xref:Microsoft.Extensions.AI.ChatOptions.ConversationId?displayProperty=nameWithType>. Usage then follows the same pattern, except there's no need to maintain a history manually.

:::code language="csharp" source="snippets/microsoft-extensions-ai/ConsoleAI.StatelessStateful/Program.cs" id="Snippet2":::

Some services might support automatically creating a thread ID for a request that doesn't have one. In such cases, you can transfer the <xref:Microsoft.Extensions.AI.ChatResponse.ChatThreadId?displayProperty=nameWithType> over to the `ChatOptions.ChatThreadId` for subsequent requests. For example:
Some services might support automatically creating a thread ID for a request that doesn't have one. In such cases, you can transfer the <xref:Microsoft.Extensions.AI.ChatResponse.ConversationId?displayProperty=nameWithType> over to the `ChatOptions.ConversationId` for subsequent requests. For example:

:::code language="csharp" source="snippets/microsoft-extensions-ai/ConsoleAI.StatelessStateful/Program.cs" id="Snippet3":::

If you don't know ahead of time whether the service is stateless or stateful, you can check the response <xref:Microsoft.Extensions.AI.ChatResponse.ChatThreadId> and act based on its value. If it's set, then that value is propagated to the options and the history is cleared so as to not resend the same history again. If the response `ChatThreadId` isn't set, then the response message is added to the history so that it's sent back to the service on the next turn.
If you don't know ahead of time whether the service is stateless or stateful, you can check the response <xref:Microsoft.Extensions.AI.ChatResponse.ConversationId> and act based on its value. If it's set, then that value is propagated to the options and the history is cleared so as to not resend the same history again. If the response `ConversationId` isn't set, then the response message is added to the history so that it's sent back to the service on the next turn.

:::code language="csharp" source="snippets/microsoft-extensions-ai/ConsoleAI.StatelessStateful/Program.cs" id="Snippet4":::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -9,14 +9,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="Azure.Identity" Version="1.14.0" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.3-preview.1.25230.7" />
<PackageReference Include="Microsoft.Extensions.VectorData.Abstractions" Version="9.0.0-preview.1.25229.1" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.InMemory" Version="1.48.0-preview" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0-preview.3.25171.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.0-preview.3.25171.5" />
<PackageReference Include="System.Linq.AsyncEnumerable" Version="10.0.0-preview.3.25171.5" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0-preview.4.25258.110" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.0-preview.4.25258.110" />
<PackageReference Include="System.Linq.AsyncEnumerable" Version="10.0.0-preview.4.25258.110" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="Azure.Identity" Version="1.14.0" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI.Evaluation" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI.Evaluation.Quality" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0-preview-25107-01" />
<PackageReference Include="MSTest" Version="3.8.3" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.5" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions docs/ai/quickstarts/snippets/structured-output/SOChat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="Azure.Identity" Version="1.14.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="System.Threading.RateLimiting" Version="10.0.0-preview.3.25171.5" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.4-preview.1.25259.16" />
<PackageReference Include="System.Threading.RateLimiting" Version="10.0.0-preview.4.25258.110" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0-preview.3.25171.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0-preview.4.25258.110" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.12.0" />
<ProjectReference Include="..\AI.Shared\AI.Shared.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.Ollama" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0-preview.3.25171.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0-preview.3.25171.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0-preview.4.25258.110" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0-preview.4.25258.110" />
<ProjectReference Include="..\AI.Shared\AI.Shared.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// </Snippet1>

// <Snippet2>
ChatOptions statefulOptions = new() { ChatThreadId = "my-conversation-id" };
ChatOptions statefulOptions = new() { ConversationId = "my-conversation-id" };
while (true)
{
Console.Write("Q: ");
Expand All @@ -38,7 +38,7 @@
ChatResponse response = await client.GetResponseAsync(message, options);
Console.WriteLine(response);

options.ChatThreadId = response.ChatThreadId;
options.ConversationId = response.ConversationId;
}
// </Snippet3>

Expand All @@ -53,8 +53,8 @@
ChatResponse response = await client.GetResponseAsync(chatHistory);
Console.WriteLine(response);

chatOptions.ChatThreadId = response.ChatThreadId;
if (response.ChatThreadId is not null)
chatOptions.ConversationId = response.ConversationId;
if (response.ConversationId is not null)
{
chatHistory.Clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.4-preview.1.25259.16" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions docs/ai/tutorials/snippets/llm-eval/llm-eval.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.4" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.48.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.5" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.49.0" />
</ItemGroup>

</Project>
Loading
Loading