Skip to content

Update Microsoft.Extensions.AI to 9.3.0-preview.1.25114.11 #7388

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

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

stephentoub
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings February 17, 2025 05:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR updates the Microsoft.Extensions.AI dependency to version 9.3.0-preview.1.25114.11 and, as part of that update, renames several ChatClient methods and types to better reflect the new ChatResponse-based interface.

  • Renamed methods from CompleteAsync/CompleteStreamingAsync to GetResponseAsync/GetStreamingResponseAsync.
  • Changed return types from ChatCompletion/StreamingChatCompletionUpdate to ChatResponse/ChatResponseUpdate.
  • Refactored metadata handling by replacing the Metadata property with a private _metadata field.
  • Updated sample files to use the new method names.

Changes

File Description
src/Microsoft.ML.GenAI.Core/CausalLMPipelineChatClient.cs Updated method names and return types, and refactored metadata handling.
src/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs Renamed methods and updated base calls to reflect new ChatResponse types.
docs/samples/Microsoft.ML.GenAI.Samples/MEAI/Phi3.cs Updated sample to use the new GetStreamingResponseAsync method.
src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs Renamed methods and updated base calls to reflect new ChatResponse types.
docs/samples/Microsoft.ML.GenAI.Samples/MEAI/Llama3_1.cs Updated sample to use the new GetStreamingResponseAsync method.

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs:57

  • The initializer '[]' is not valid C# syntax for initializing a list. Consider using 'new List()' if StopSequences requires a mutable list.
options.StopSequences ??= [];

src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs:52

  • The initializer '[]' is not valid C# syntax for initializing a list. Consider using 'new List()' if StopSequences requires a mutable list.
options.StopSequences ??= [];

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 68.88%. Comparing base (e3219a9) to head (5aca506).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rosoft.ML.GenAI.Core/CausalLMPipelineChatClient.cs 0.00% 6 Missing ⚠️
...crosoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs 0.00% 2 Missing ⚠️
...rosoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7388      +/-   ##
==========================================
- Coverage   68.88%   68.88%   -0.01%     
==========================================
  Files        1473     1473              
  Lines      270814   270815       +1     
  Branches    27884    27883       -1     
==========================================
- Hits       186553   186548       -5     
- Misses      76985    76991       +6     
  Partials     7276     7276              
Flag Coverage Δ
Debug 68.88% <0.00%> (-0.01%) ⬇️
production 63.19% <0.00%> (-0.01%) ⬇️
test 89.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...crosoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs 0.00% <0.00%> (ø)
...rosoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs 0.00% <0.00%> (ø)
...rosoft.ML.GenAI.Core/CausalLMPipelineChatClient.cs 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

@ericstj
Copy link
Member

ericstj commented Feb 20, 2025

/ba-g test failure is #7393

@ericstj ericstj merged commit 8af76ac into dotnet:main Feb 20, 2025
23 of 25 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants