-
-
Notifications
You must be signed in to change notification settings - Fork 2
Update to M.E.AI 9.4.0-preview.1.25207.5 #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request updates several project files by upgrading package versions from 9.3.0-preview.1.25161.3 to 9.4.0-preview.1.25207.5 for Microsoft.Extensions.AI and its abstractions. It also modifies the method signature of Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant MeaiFunction
participant ToolService
Caller->>MeaiFunction: InvokeCoreAsync(AIFunctionArguments, CancellationToken)
MeaiFunction->>ToolService: Invoke tool with AIFunctionArguments
ToolService-->>MeaiFunction: Return result
MeaiFunction-->>Caller: Return ValueTask<object?> with result
Possibly related PRs
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Gunpal Jain seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/tests/CSharpToJsonSchema.MeaiTests/CSharpToJsonSchema.MeaiTests.csproj (1)
18-18: Package version mismatch detected.The Microsoft.Extensions.AI package has been updated to 9.4.0-preview.1.25207.5, while Microsoft.Extensions.AI.OpenAI remains at 9.3.0-preview.1.25161.3. This version inconsistency might cause compatibility issues.
🧹 Nitpick comments (1)
src/tests/CSharpToJsonSchema.MeaiTests/Meai_Tests.cs (1)
68-93: New test method added for version 9.4.0-preview compatibilityThis new test method appears to validate function invocation with the updated Microsoft.Extensions.AI package (9.4.0-preview.1.25207.5). It's correctly structured to test the
GetStudentsList2method which likely implements the new API contract.Consider the following improvements:
- Add a comment explaining the purpose of this new test and how it differs from
ShouldInvokeTheFunctions_NoParameters- Uncomment the
[TestMethod]attribute if you want this to run as part of the test suite- Consider using a more descriptive name than
GetStudentsList2to indicate its relationship with the updated API- //[TestMethod] + [TestMethod] + // Tests function invocation with the updated Microsoft.Extensions.AI 9.4.0-preview API public async Task ShouldInvokeTheFunctions_NoParameters2()
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/libs/CSharpToJsonSchema/CSharpToJsonSchema.csproj(1 hunks)src/libs/CSharpToJsonSchema/MeaiFunction.cs(1 hunks)src/tests/AotConsole/AotConsole.csproj(1 hunks)src/tests/CSharpToJsonSchema.MeaiTests/CSharpToJsonSchema.MeaiTests.csproj(1 hunks)src/tests/CSharpToJsonSchema.MeaiTests/Meai_Tests.cs(3 hunks)
🔇 Additional comments (5)
src/libs/CSharpToJsonSchema/CSharpToJsonSchema.csproj (1)
20-20: LGTM - Package version update approved.The update of Microsoft.Extensions.AI.Abstractions to 9.4.0-preview.1.25207.5 aligns with the other package updates in this PR, maintaining consistency across the solution.
src/libs/CSharpToJsonSchema/MeaiFunction.cs (2)
92-92: Performance improvement with ValueTask.Changing the return type from
Task<object?>toValueTask<object?>is a good optimization that can reduce allocations for operations that might complete synchronously.
92-93:Details
❌ Incorrect review comment
Type mismatch between InvokeCoreAsync parameter and GetArgsString parameter.
You've changed the parameter type from
IEnumerable<KeyValuePair<string, object?>>toAIFunctionArguments, but theGetArgsStringmethod still expectsIEnumerable<KeyValuePair<string, object?>>. This will likely cause compilation or runtime errors.Let's check how AIFunctionArguments works with the GetArgsString method:
🏁 Script executed:
#!/bin/bash # Check how AIFunctionArguments is implemented and used rg -t cs "AIFunctionArguments" -A 10 -B 10 # Check for other implementations or overloads of GetArgsString rg -t cs "GetArgsString" -A 5 -B 5Length of output: 3730
Update: No Type Mismatch Detected
After verifying the current implementation, the call toGetArgsString(arguments)is valid becauseAIFunctionArgumentsis being passed where anIEnumerable<KeyValuePair<string, object?>>is expected. This implies thatAIFunctionArgumentseither implements or is implicitly convertible toIEnumerable<KeyValuePair<string, object?>>, and therefore no compilation or runtime issues should occur.
- The
InvokeCoreAsyncmethod now accepts anAIFunctionArgumentsparameter, which is directly used inGetArgsString.- The method signature for
GetArgsStringremains unchanged, and its expected parameter type aligns with howAIFunctionArgumentsis used.- Please verify that the definition of
AIFunctionArgumentsindeed includes the necessary implementation forIEnumerable<KeyValuePair<string, object?>>; if it does, no further changes are required.Likely an incorrect or invalid review comment.
src/tests/CSharpToJsonSchema.MeaiTests/Meai_Tests.cs (2)
96-96: Comment formatting updated for consistencyThe comment formatting change maintains consistency with other similar comments in the file.
124-126: Formatting adjustments for improved readabilityThese spacing changes improve code readability and maintain consistent formatting throughout the test class.
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25161.3" /> | ||
| <PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Potential version mismatch between packages.
You've updated Microsoft.Extensions.AI to 9.4.0-preview.1.25207.5, but Microsoft.Extensions.AI.OpenAI remains at 9.3.0-preview.1.25161.3. This could lead to compatibility issues.
Consider updating Microsoft.Extensions.AI.OpenAI to match the version of Microsoft.Extensions.AI. Let's check if the 9.4.0-preview.1.25207.5 version exists for the OpenAI package:
🏁 Script executed:
#!/bin/bash
# Check if the same version exists for Microsoft.Extensions.AI.OpenAI
curl -s https://api.nuget.org/v3-flatcontainer/microsoft.extensions.ai.openai/index.json | jq '.versions'Length of output: 341
Action Required: Update Microsoft.Extensions.AI.OpenAI to 9.4.0-preview.1.25207.5
The version check confirms that Microsoft.Extensions.AI.OpenAI now has a "9.4.0-preview.1.25207.5" release available on NuGet. Since the Microsoft.Extensions.AI package in src/tests/AotConsole/AotConsole.csproj is already updated to this version, please update the corresponding Microsoft.Extensions.AI.OpenAI reference from "9.3.0-preview.1.25161.3" to "9.4.0-preview.1.25207.5" to avoid compatibility issues.
- File Affected:
src/tests/AotConsole/AotConsole.csproj(for Microsoft.Extensions.AI) and the corresponding project file(s) holding the Microsoft.Extensions.AI.OpenAI reference. - Action: Update Microsoft.Extensions.AI.OpenAI to version 9.4.0-preview.1.25207.5.
Update to M.E.AI 9.4.0-preview.1.25207.5
Summary by CodeRabbit