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

Add support for the developer role in chat completion messages #117

Merged
merged 2 commits into from
Jan 18, 2025

Conversation

nacx
Copy link
Contributor

@nacx nacx commented Jan 17, 2025

With o1 models and newer, developer messages replace the previous system messages.

@nacx nacx requested a review from a team as a code owner January 17, 2025 11:58
@yuzisun
Copy link
Contributor

yuzisun commented Jan 17, 2025

thanks @nacx ! Can you help add a test?

@nacx
Copy link
Contributor Author

nacx commented Jan 17, 2025

What kind of additional test do you mean? I already modified the unit test that unmarshals the request to make sure it it properly handled, so I think that should be enough for the scope of the change? I mean, by adding, say, an e2e test we would be jsu testing that the backend understands that developer value, but wouldn't be testing anything specific to the ai-gateway project.

@wengyao04
Copy link
Contributor

How does it translated into Bedrock request ? In OpenAIMessageToBedrockMessage, if the role is ChatMessageRoleDeveloper, it will print error.

@mathetake
Copy link
Member

ommit / External Processor Test (pull_request)Failing after 2s

fyi this is a bug in ci setting - i am working on it

@mathetake
Copy link
Member

i think the existing unit test should be good. Now the question is how to translate this in aws bedrock request. Erring seems reasonable though

@mathetake
Copy link
Member

leaving it as a TODO with a new issue would be good as well

@mathetake
Copy link
Member

@nacx can you merge the main? I think we could merge as-is

@yuzisun yuzisun merged commit 85fc9d3 into envoyproxy:main Jan 18, 2025
9 checks passed
@nacx nacx deleted the dev-role branch January 18, 2025 19:08
mathetake pushed a commit that referenced this pull request Jan 20, 2025
This is a follow-up PR for:
#117 (comment)

I think it makes sense to do the same conversions and set it as
"system"? The "developer" role is a replacement for "system" in OpenAI,
so it should be fine?

Signed-off-by: Ignasi Barrera <[email protected]>
aabchoo pushed a commit that referenced this pull request Jan 21, 2025
This is a follow-up PR for:
#117 (comment)

I think it makes sense to do the same conversions and set it as
"system"? The "developer" role is a replacement for "system" in OpenAI,
so it should be fine?

Signed-off-by: Ignasi Barrera <[email protected]>
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.

4 participants