Skip to content

refactor(common): restructure convertMessageContentToParts #8005

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andantonyan
Copy link

This update modifies convertMessageContentToParts to ensure that tool_calls on a message are processed even when the message also contains content (either as a string or an array). Previously, the presence of content could lead to tool_calls being overlooked. This change correctly converts both textual/array content and any accompanying tool_calls into their respective Google AI Part structures within the same message conversion.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 10, 2025
Copy link

vercel bot commented Apr 10, 2025

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Apr 10, 2025 10:12pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Apr 10, 2025 10:12pm

@dosubot dosubot bot added the auto:refactor A large refactor of a feature(s) or restructuring of many files label Apr 10, 2025
@jacoblee93
Copy link
Collaborator

CC @afirstenberg if you have a minute!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:refactor A large refactor of a feature(s) or restructuring of many files google size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants