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

core: allow artifact in create_retriever_tool #28903

Merged
merged 7 commits into from
Jan 3, 2025

Conversation

ianchi
Copy link
Contributor

@ianchi ianchi commented Dec 24, 2024

Add option to return content and artifacts, to also be able to access the full info of the retrieved documents.

They are returned as a list of dicts in the artifacts property if parameter response_format is set to "content_and_artifact".

Defaults to "content" to keep current behavior.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 24, 2024
Copy link

vercel bot commented Dec 24, 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 Jan 3, 2025 10:06pm

@dosubot dosubot bot added Ɑ: core Related to langchain-core Ɑ: retriever Related to retriever module labels Dec 24, 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.

2 questions/suggestions, and will need some unit tests to be mergable

libs/core/langchain_core/tools/retriever.py Outdated Show resolved Hide resolved
libs/core/langchain_core/tools/retriever.py Outdated Show resolved Hide resolved
libs/core/langchain_core/tools/retriever.py Show resolved Hide resolved
@efriis efriis self-assigned this Dec 24, 2024
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jan 3, 2025
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jan 3, 2025
@efriis efriis enabled auto-merge (squash) January 3, 2025 22:07
@efriis efriis merged commit acddfc7 into langchain-ai:master Jan 3, 2025
82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: core Related to langchain-core lgtm PR looks good. Use to confirm that a PR is ready for merging. Ɑ: retriever Related to retriever module 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