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

anthropic[patch]: correctly handle tool msg with empty list #27109

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

baskaryan
Copy link
Collaborator

No description provided.

@efriis efriis added the partner label Oct 4, 2024
@efriis efriis self-assigned this Oct 4, 2024
Copy link

vercel bot commented Oct 4, 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 Oct 4, 2024 4:12pm

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 4, 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. should we add testing for this to standard tests instead? seems like an edge case we should test across all providers

for block in curr.content
if (
isinstance(curr.content, list)
and curr.content
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe worth adding a code comment for posterity

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Oct 4, 2024
@baskaryan baskaryan merged commit 1e768a9 into master Oct 4, 2024
26 checks passed
@baskaryan baskaryan deleted the bagatur/anthropic_empty_list_tool_msg branch October 4, 2024 18:30
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. partner size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants