Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add more openai conversion helpers#6662

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
stephentoub merged 2 commits intodotnet:mainfromstephentoub:moreopenaiconversions
Jul 31, 2025

Conversation

@stephentoub
Copy link
Member

@stephentoubstephentoub commentedJul 30, 2025
edited by dotnet-policy-servicebot
Loading

Microsoft Reviewers:Open in CodeFlow

@stephentoubstephentoub requested a review froma team as acode ownerJuly 30, 2025 01:41
@github-actionsgithub-actionsbot added the area-aiMicrosoft.Extensions.AI libraries labelJul 30, 2025
Copy link
Contributor

CopilotAI 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 adds several OpenAI conversion helper methods to enable bidirectional conversion between Microsoft.Extensions.AI types and OpenAI types. The changes enhance interoperability by providing methods to convert chat messages, responses, and completions in both directions.

Key changes include:

  • Added conversion methods for ChatMessage collections to/from OpenAI types
  • Added conversion from ChatResponse to OpenAI ChatCompletion
  • Refactored common conversion logic into shared helper methods

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
OpenAIConversionTests.csComprehensive test coverage for new conversion methods including edge cases and error handling
OpenAIResponsesChatClient.csRefactored message conversion logic into reusable methods and improved raw representation handling
OpenAIClientExtensions.csAdded shared helper methods for parsing function call content from JSON
OpenAIChatClient.csEnhanced content conversion methods and improved raw representation processing
OpenAIAssistantsChatClient.csUpdated to use new shared function call parsing methods
MicrosoftExtensionsAIResponsesExtensions.csAdded new extension methods for converting between response types
MicrosoftExtensionsAIChatExtensions.csAdded comprehensive bidirectional conversion methods for chat messages and completions

Copy link
Contributor

@rogerbarretorogerbarreto left a comment
edited
Loading

Choose a reason for hiding this comment

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

LGTM

@stephentoubstephentoubenabled auto-merge (squash)July 31, 2025 02:17
@stephentoubstephentoub merged commit65c679b intodotnet:mainJul 31, 2025
6 checks passed
This was referencedAug 14, 2025
This was referencedAug 27, 2025
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 30, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

Copilot code reviewCopilotCopilot left review comments

@eiriktsarpaliseiriktsarpaliseiriktsarpalis approved these changes

@jeffhandleyjeffhandleyAwaiting requested review from jeffhandley

+1 more reviewer

@rogerbarretorogerbarretorogerbarreto approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@stephentoubstephentoub

Labels

area-aiMicrosoft.Extensions.AI libraries

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@stephentoub@eiriktsarpalis@rogerbarreto

[8]ページ先頭

©2009-2025 Movatter.jp