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

feat: add NestedDictInput filter and non-vector search for AstraVectorStoreComponent #4564

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

mieslep
Copy link
Contributor

@mieslep mieslep commented Nov 13, 2024

This pull request introduces several enhancements and refactorings to the AstraDB vector store component. The most significant changes include the introduction of a new NestedDictInput for advanced search filters, improvements to how search arguments are built, and better error handling during the search process.

Enhancements to search filters and arguments:

  • Introduced NestedDictInput for advanced_search_filter and deprecated the existing search_filter (src/backend/base/langflow/components/vectorstores/astradb.py).
  • Enhanced _build_search_args method to clean and validate search filters, and to log deprecated usage of search_filter (src/backend/base/langflow/components/vectorstores/astradb.py).

Error handling and logging improvements:

  • Improved error handling in search_documents method by adding specific error messages and logging steps (src/backend/base/langflow/components/vectorstores/astradb.py).

Codebase improvements:

  • Added a cached vector store attribute _cached_vector_store to AstraVectorStoreComponent (src/backend/base/langflow/components/vectorstores/astradb.py).
  • Updated import statements to include AstraDBVectorStore and NestedDictInput (src/backend/base/langflow/components/vectorstores/astradb.py).

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 13, 2024
Copy link

codspeed-hq bot commented Nov 13, 2024

CodSpeed Performance Report

Merging #4564 will degrade performances by 38.01%

Comparing mieslep:phil/astra-metadata-component (5fc6db5) with main (563b90e)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 13 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main mieslep:phil/astra-metadata-component Change
test_successful_run_with_input_type_text 127.5 ms 205.7 ms -38.01%
test_successful_run_with_output_type_debug 206 ms 126.8 ms +62.44%

@ogabrielluiz ogabrielluiz changed the title NestedDictInput filter and non-vector search for AstraVectorStoreComp… feat: addNestedDictInput filter and non-vector search for AstraVectorStoreComponent Nov 13, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Nov 13, 2024
@ogabrielluiz ogabrielluiz changed the title feat: addNestedDictInput filter and non-vector search for AstraVectorStoreComponent feat: add NestedDictInput filter and non-vector search for AstraVectorStoreComponent Nov 13, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Nov 13, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 14, 2024
@erichare erichare self-requested a review November 14, 2024 14:58
Copy link
Collaborator

@erichare erichare left a comment

Choose a reason for hiding this comment

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

One small param issue (possibly)

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Nov 14, 2024
@erichare erichare self-requested a review November 14, 2024 15:52
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 14, 2024
@erichare erichare enabled auto-merge (squash) November 14, 2024 20:44
@erichare erichare merged commit 44b0531 into langflow-ai:main Nov 14, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer 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