Skip to content

langchain: return attachments in _get_response #30853

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

georgi-stefanov
Copy link
Contributor

This is a PR to return the message attachments in _get_response, as when files are generated these attachments are not returned thus generated files cannot be retrieved

Fixes issue: #30851

Copy link

vercel bot commented Apr 15, 2025

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 15, 2025 4:35pm

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. langchain Related to the langchain package Ɑ: agent Related to agents module 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Apr 15, 2025
@@ -584,6 +584,9 @@ def _get_response(self, run: Any) -> Any:
answer: Any = [
msg_content for msg in new_messages for msg_content in msg.content
]
attachments = [
attachment for msg in new_messages for attachment in msg.attachments
Copy link
Collaborator

Choose a reason for hiding this comment

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

does msg always have an attachments attribute, even when there are no attachments?

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Apr 25, 2025
@ccurme ccurme merged commit d30c56a into langchain-ai:master Apr 25, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: agent Related to agents module 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature langchain Related to the langchain package lgtm PR looks good. Use to confirm that a PR is ready for merging. size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants