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

Handle OpenAI developer msg #28794

Merged
merged 9 commits into from
Dec 18, 2024
Merged

Handle OpenAI developer msg #28794

merged 9 commits into from
Dec 18, 2024

Conversation

baskaryan
Copy link
Collaborator

@baskaryan baskaryan commented Dec 18, 2024

  • Convert developer openai messages to SystemMessage
  • store additional_kwargs={"openai_role": "developer"} so that the correct role can be reconstructed if needed
  • update ChatOpenAI to read in openai_role

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Dec 18, 2024 9:51pm

@baskaryan baskaryan changed the title rfc: dev msg rfc: dev msg as sys msg Dec 18, 2024
@baskaryan baskaryan changed the title rfc: dev msg as sys msg Handle OpenAI developer msg Dec 18, 2024
@baskaryan baskaryan marked this pull request as ready for review December 18, 2024 19:31
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 18, 2024
@baskaryan baskaryan requested review from efriis and eyurtsev December 18, 2024 19:32
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 18, 2024
Copy link
Member

@efriis efriis left a comment

Choose a reason for hiding this comment

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

looks good. also good to add a developer message to standard tests message history

libs/core/langchain_core/messages/utils.py Outdated Show resolved Hide resolved
@baskaryan baskaryan enabled auto-merge (squash) December 18, 2024 21:51
@baskaryan baskaryan merged commit 4a53143 into master Dec 18, 2024
105 checks passed
@baskaryan baskaryan deleted the bagatur/rfc_dev_msg branch December 18, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants