Skip to content

Update Microsoft.Extensions.AI to stable version #838

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

Closed
wants to merge 1 commit into from

Conversation

stephentoub
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings May 16, 2025 04:27
Copy link

@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.

Pull Request Overview

This PR updates the Microsoft.Extensions.AI dependencies to a newer stable version and adapts the code accordingly.

  • Update the method call in CatalogAI.cs to use the new GenerateVectorAsync API.
  • Update package versions in Directory.Packages.props for Microsoft.Extensions.AI and related packages.

Reviewed Changes

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

File Description
src/Catalog.API/Services/CatalogAI.cs Replaces the old GenerateEmbeddingVectorAsync call with the new GenerateVectorAsync method call.
Directory.Packages.props Updates dependency versions to newer stable releases for Microsoft.Extensions.AI packages.
Comments suppressed due to low confidence (2)

src/Catalog.API/Services/CatalogAI.cs:61

  • Verify that the new GenerateVectorAsync method returns an array with the expected number of dimensions to support slicing with [0..EmbeddingDimensions].
var embedding = await _embeddingGenerator.GenerateVectorAsync(text);

Directory.Packages.props:66

  • [nitpick] Ensure consistency across the Microsoft.Extensions.AI packages, as the stable and preview versions are mixed; aligning versions may simplify maintenance and prevent unexpected behavior.
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.5.0" />

@eerhardt
Copy link
Member

I'm doing the same in #837.

@stephentoub
Copy link
Member Author

I'm doing the same in #837.

Ok, feel free to close this one then.

@eerhardt
Copy link
Member

I'm doing the same in #837.

Ok, feel free to close this one then.

Sounds good. The Ollama updates are needed as well, so I'll just close this one. All these deps will be updated at once.

@eerhardt eerhardt closed this May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants