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

bedrock[minor]: Allow knowledge bases to use filters and searchType #6189

Conversation

jl4nz
Copy link
Contributor

@jl4nz jl4nz commented Jul 24, 2024

Adds optional filter and optional overrideSearchType parameters to the Bedrock knowledge base client:

export interface AmazonKnowledgeBaseRetrieverArgs {
  knowledgeBaseId: string;
  topK: number;
  region: string;
  clientOptions?: BedrockAgentRuntimeClientConfig;
  filter?: RetrievalFilter;
  overrideSearchType?: SearchType;
}

Also, updates the source location of the document depending on the KB configuration: S3, WEB, CONFLUENCE, SALESFORCE, SHAREPOINT

…eSearchType, Update the KB to support other locations as sources
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 24, 2024
Copy link

vercel bot commented Jul 24, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2024 6:47pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Jul 24, 2024 6:47pm

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Jul 24, 2024
@@ -39,15 +39,15 @@
"author": "LangChain",
Copy link

Choose a reason for hiding this comment

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

Hey there! 👋 I noticed that this PR includes a change in the dependencies, specifically the update of "@aws-sdk/client-bedrock-agent-runtime" and "@aws-sdk/types". This is flagged for maintainers to review as it affects the peer/dev dependencies of the project. Keep up the great work! 🚀

Copy link
Member

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

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

lgtm, thank you for pushing this improvement!

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Jul 24, 2024
@bracesproul bracesproul merged commit 63305a0 into langchain-ai:main Jul 24, 2024
30 checks passed
@jl4nz
Copy link
Contributor Author

jl4nz commented Jul 26, 2024

Thanks for the review and merge @bracesproul. Is it possible to bump the aws package? or there's a release process/waiting?

@bracesproul
Copy link
Member

Thanks for the review and merge @bracesproul. Is it possible to bump the aws package? or there's a release process/waiting?

Yes! Just cut a release. Should be avail in v0.0.6 (#6233)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases lgtm PRs that are ready to be merged as-is size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants