Skip to content

Commit 734c757

Browse files
gunpal5Gunpal Jain
andauthored
Update to M.E.AI 9.4.0-preview.1.25207.5 (#34)
* fix: Functions without parameters * tests fixex * Update to M.E.AI 9.4.0-preview.1.25207.5 --------- Co-authored-by: Gunpal Jain <[email protected]>
1 parent afd05fd commit 734c757

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

src/libs/CSharpToJsonSchema/CSharpToJsonSchema.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.3.0-preview.1.25161.3" />
20+
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.4.0-preview.1.25207.5" />
2121
<PackageReference Include="System.Text.Json" Version="9.0.2" />
2222
</ItemGroup>
2323

src/libs/CSharpToJsonSchema/MeaiFunction.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,16 @@ private JsonSerializerOptions InitializeReflectionOptions()
8080
return _options;
8181
#pragma warning restore IL2026, IL3050 // Reflection is used only when enabled
8282
}
83-
8483

84+
85+
8586
/// <summary>
8687
/// Invokes the tool with the given arguments asynchronously.
8788
/// </summary>
8889
/// <param name="arguments">The arguments to pass to the tool.</param>
8990
/// <param name="cancellationToken">A cancellation token to cancel the operation, if needed.</param>
9091
/// <returns>The result of the tool's execution as a deserialized object.</returns>
91-
protected override async Task<object?> InvokeCoreAsync(IEnumerable<KeyValuePair<string, object?>> arguments,
92+
protected override async ValueTask<object?> InvokeCoreAsync(AIFunctionArguments arguments,
9293
CancellationToken cancellationToken)
9394
{
9495
var json = GetArgsString(arguments);

src/tests/AotConsole/AotConsole.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25161.3" />
18+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
1919
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
2020
<PackageReference Include="OpenAI" Version="2.2.0-beta.4" />
2121
</ItemGroup>

src/tests/CSharpToJsonSchema.MeaiTests/CSharpToJsonSchema.MeaiTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
18-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25161.3" />
18+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
1919
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
2020
<PackageReference Include="MSTest" Version="3.8.3" />
2121
<PackageReference Include="FluentAssertions" Version="8.2.0" />

src/tests/CSharpToJsonSchema.MeaiTests/Meai_Tests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public async Task ShouldInvokeTheFunctions_NoParameters()
6464
Console.WriteLine(response.Text);
6565
}
6666

67+
6768
//[TestMethod]
6869
public async Task ShouldInvokeTheFunctions_NoParameters2()
6970
{
@@ -90,8 +91,9 @@ public async Task ShouldInvokeTheFunctions_NoParameters2()
9091

9192
Console.WriteLine(response.Text);
9293
}
94+
9395

94-
//[TestMethod]
96+
// [TestMethod]
9597
public async Task ShouldInvokeTheBookService()
9698
{
9799
var key = Environment.GetEnvironmentVariable("OPEN_AI_APIKEY",EnvironmentVariableTarget.User);
@@ -119,7 +121,9 @@ public async Task ShouldInvokeTheBookService()
119121

120122
Console.WriteLine(response.Text);
121123
}
124+
122125
// [TestMethod]
126+
123127
public async Task ShouldInvokeTheBookService_NoParameters()
124128
{
125129
var key = Environment.GetEnvironmentVariable("OPEN_AI_APIKEY",EnvironmentVariableTarget.User);

0 commit comments

Comments
 (0)