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

.Net Agents - Support role-override for ChatCompletionAgent #10601

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

crickman
Copy link
Contributor

Motivation and Context

The "O*" series deep-reasoning models from OpenAI do not support System role. For certain versions, support was added for a Developer role.

Description

Allow ChatCompletionAgent make use of "O*" series models by supporting InstructionsRole that may be optionally overriden.

Contribution Checklist

@crickman crickman added .NET Issue or Pull requests regarding .NET code enhancement agents labels Feb 19, 2025
@crickman crickman self-assigned this Feb 19, 2025
@crickman crickman requested a review from a team as a code owner February 19, 2025 01:05
@github-actions github-actions bot changed the title .NET Agents - Support role-override for ChatCompletionAgent .Net Agents - Support role-override for ChatCompletionAgent Feb 19, 2025
@crickman crickman added the needs_port_to_python Indicate this item needs to also be done for Python label Feb 19, 2025
@crickman crickman requested a review from Copilot February 19, 2025 01:24

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (1)

dotnet/src/Agents/Core/ChatCompletionAgent.cs:59

  • [nitpick] The new property 'InstructionsRole' defaults to AuthorRole.System; consider enhancing the XML documentation to clearly indicate that when targeting deep-reasoning models (which require 'developer'), users need to override this property accordingly.
public AuthorRole InstructionsRole { get; init; } = AuthorRole.System;
@crickman crickman requested a review from Copilot February 19, 2025 01:28

Choose a reason for hiding this comment

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

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

@crickman crickman removed the needs_port_to_python Indicate this item needs to also be done for Python label Feb 19, 2025
@crickman crickman added this pull request to the merge queue Feb 19, 2025
Merged via the queue into main with commit a9b20b1 Feb 19, 2025
19 checks passed
@crickman crickman deleted the agents-chatcompletion-role-override branch February 19, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents enhancement .NET Issue or Pull requests regarding .NET code
Projects
Status: Sprint: Done
Development

Successfully merging this pull request may close these issues.

3 participants