-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
community: Add support for SAP HANA Vector hnsw index creation and advanced filtering #7238
base: main
Are you sure you want to change the base?
Conversation
…h Python version - Implemented HNSW index creation method - Added advanced filtering options for enhanced data handling. - Updated examples and documentation for clarity and usability.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -58,7 +122,7 @@ export class HanaDB extends VectorStore { | |||
|
|||
private vectorColumnLength: number; | |||
|
|||
declare FilterType: Filter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll still want this for methods on the superclass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing it out! I added this declaration and used it in methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! One small comment. I'm also not familiar with SAP Hana syntax but would just ask that you scan for any injection-type attacks in the code.
Seems you're failing the new unit tests:
|
@jacoblee93 Hi Jacob, I've adjusted the unit tests for current sanitization methods. |
Hi Jacob, I am currently "human-scanning" the source code. It looks well protected against SQL injections since we have input sanitization functions and parameterized the SQL statement. I am also trying to provide the tool-scan result if possible. |
Description
This PR synchronizes the
hanavector
integration with updates made in the Python version of LangChain (PR #27884 and PR #20821). The following changes have been introduced:Index Creation Support:
createHnswIndex
, tohanavector.ts
. This function facilitates the creation of indexes for SAP HANA Vector, improving usability and alignment with Python capabilities.Advanced Filtering Support:
$eq
,$ne
,$gt
,$gte
,$lt
,$lte
$between
,$in
,$nin
$like
$and
,$or
Issue: No associated issue.
Dependencies: No new dependencies were introduced in this PR.
Twitter handle: @sapopensource
Changed integration main file
libs/langchain-community/src/vectorstores/hanavector.ts
Integration tests
libs/langchain-community/src/vectorstores/tests/hanavector.int.test.ts
Examples
examples/src/indexes/vector_stores/hana_vector/
Documentation
docs/core_docs/docs/integrations/vectorstores/hanavector.mdx
Testing