Skip to content

Conversation

HillPhelmuth
Copy link

@HillPhelmuth HillPhelmuth commented Sep 20, 2025

Motivation and Context

Fix #13154

Description

Introduce an optional AuthorRole? role parameter to the ToResponseContentPart methods in KernelContentExtensions . Update the ToResponseItem method in ChatContentMessageExtensions to utilize this role for determining the correct content part type (Input or Output). Modify tests in ChatContentMessageExtensionsTests to ensure accurate validation of content part types based on the author role.

Contribution Checklist

Introduce an optional `AuthorRole? role` parameter to the `ToResponseContentPart` methods in `KernelContentExtensions` . Update the `ToResponseItem` method in `ChatContentMessageExtensions` to utilize this role for determining the correct content part type (Input or Output). Modify tests in `ChatContentMessageExtensionsTests` to ensure accurate validation of content part types based on the author role.
@HillPhelmuth HillPhelmuth requested review from Copilot and removed request for Copilot September 20, 2025 01:28
@HillPhelmuth HillPhelmuth requested a review from a team as a code owner September 20, 2025 01:28
@moonbox3 moonbox3 added the .NET Issue or Pull requests regarding .NET code label Sep 20, 2025
@github-actions github-actions bot changed the title Add optional role parameter to 'ResponseContentPart' conversion methods .Net: Add optional role parameter to 'ResponseContentPart' conversion methods Sep 20, 2025
@HillPhelmuth
Copy link
Author

@HillPhelmuth please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.Net: Bug: OpenAIResponseAgent Throws 400 Error When Assistant Message Is Included in Chat History
2 participants