Skip to content
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

Reduce a bit of LINQ in M.E.AI #5663

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Nov 18, 2024

Microsoft Reviewers: Open in CodeFlow

@stephentoub stephentoub requested a review from a team as a code owner November 18, 2024 15:15
@stephentoub stephentoub enabled auto-merge (squash) November 18, 2024 15:28
@stephentoub stephentoub merged commit 5982f6a into dotnet:main Nov 18, 2024
6 checks passed
@stephentoub stephentoub deleted the reducelinq branch November 18, 2024 15:52
stephentoub added a commit to stephentoub/extensions that referenced this pull request Nov 19, 2024
@stephentoub stephentoub requested a review from Copilot December 17, 2024 00:38

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (2)

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/StreamingChatCompletionUpdate.cs:118

  • The ConcatText extension method should be used consistently across all classes. Ensure that the method is correctly implemented and used.
public override string ToString() => Contents.ConcatText();

src/Libraries/Microsoft.Extensions.AI/ChatCompletion/OpenTelemetryChatClient.cs:505

  • The change from Select(c => c.Text) to OfType<TextContent>() will result in concatenating the TextContent objects directly, which is not the intended behavior. It should be string.Concat(message.Contents.OfType<TextContent>().Select(c => c.Text)).
string content = string.Concat(message.Contents.OfType<TextContent>());

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants