Skip to content

Commit b8224ed

Browse files
authored
.Net: Update M.E.AI to 9.1.0-preview.1.25064.3 (#10199)
1 parent a44e802 commit b8224ed

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

dotnet/Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
<PackageVersion Include="Microsoft.DeepDev.TokenizerLib" Version="1.3.3" />
6464
<PackageVersion Include="SharpToken" Version="2.0.3" />
6565
<!-- Microsoft.Extensions.* -->
66-
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.0.1-preview.1.24570.5" />
67-
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.1-preview.1.24570.5" />
68-
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="9.0.1-preview.1.24570.5" />
66+
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.1.0-preview.1.25064.3" />
67+
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.1.0-preview.1.25064.3" />
68+
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="9.1.0-preview.1.25064.3" />
6969
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
7070
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
7171
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />

dotnet/src/SemanticKernel.Abstractions/AI/ChatCompletion/ChatClientChatCompletionService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public async IAsyncEnumerable<StreamingChatMessageContent> GetStreamingChatMessa
162162
{
163163
"text" => ChatResponseFormat.Text,
164164
"json_object" => ChatResponseFormat.Json,
165-
JsonElement e => ChatResponseFormat.ForJsonSchema(e.ToString()),
165+
JsonElement e => ChatResponseFormat.ForJsonSchema(e),
166166
_ => null,
167167
};
168168
}

dotnet/src/SemanticKernel.Abstractions/AI/ChatCompletion/ChatCompletionServiceChatClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ public void Dispose()
155155
}
156156
else if (options.ResponseFormat is ChatResponseFormatJson json)
157157
{
158-
settings.ExtensionData["response_format"] = json.Schema is not null ?
159-
JsonSerializer.Deserialize(json.Schema, AbstractionsJsonContext.Default.JsonElement) :
158+
settings.ExtensionData["response_format"] = json.Schema is JsonElement schema ?
159+
JsonSerializer.Deserialize(schema, AbstractionsJsonContext.Default.JsonElement) :
160160
"json_object";
161161
}
162162
}

dotnet/src/SemanticKernel.UnitTests/AI/ServiceConversionExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ public async Task AsChatClientNonStreamingResponseFormatHandled()
256256
oaiSettings = JsonSerializer.Deserialize<OpenAIPromptExecutionSettings>(JsonSerializer.Serialize(actualSettings));
257257
Assert.Equal("json_object", oaiSettings?.ResponseFormat?.ToString());
258258

259-
await client.CompleteAsync(messages, new() { ResponseFormat = ChatResponseFormat.ForJsonSchema("""
259+
await client.CompleteAsync(messages, new() { ResponseFormat = ChatResponseFormat.ForJsonSchema(JsonSerializer.Deserialize<JsonElement>("""
260260
{"type": "string"}
261-
""") });
261+
""")) });
262262
oaiSettings = JsonSerializer.Deserialize<OpenAIPromptExecutionSettings>(JsonSerializer.Serialize(actualSettings));
263263
Assert.Equal(JsonValueKind.Object, Assert.IsType<JsonElement>(oaiSettings?.ResponseFormat).ValueKind);
264264
}

0 commit comments

Comments
 (0)