Skip to content

Commit

Permalink
community[minor]: VectorStore integration for SAP HANA Cloud Vector E…
Browse files Browse the repository at this point in the history
…ngine (#16514)

- **Description:**
This PR adds a VectorStore integration for SAP HANA Cloud Vector Engine,
which is an upcoming feature in the SAP HANA Cloud database
(https://blogs.sap.com/2023/11/02/sap-hana-clouds-vector-engine-announcement/).

  - **Issue:** N/A
- **Dependencies:** [SAP HANA Python
Client](https://pypi.org/project/hdbcli/)
  - **Twitter handle:** @sapopensource

Implementation of the integration:
`libs/community/langchain_community/vectorstores/hanavector.py`

Unit tests:
`libs/community/tests/unit_tests/vectorstores/test_hanavector.py`

Integration tests:
`libs/community/tests/integration_tests/vectorstores/test_hanavector.py`

Example notebook:
`docs/docs/integrations/vectorstores/hanavector.ipynb`

Access credentials for execution of the integration tests can be
provided to the maintainers.

---------

Co-authored-by: sascha <sascha.stoll@sap.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
  • Loading branch information
3 people authored Jan 24, 2024
1 parent 1113700 commit 04651f0
Show file tree
Hide file tree
Showing 10 changed files with 2,283 additions and 4 deletions.
703 changes: 703 additions & 0 deletions docs/docs/integrations/vectorstores/hanavector.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/docs/modules/data_connection/indexing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
" * document addition by id (`add_documents` method with `ids` argument)\n",
" * delete by id (`delete` method with `ids` argument)\n",
"\n",
"Compatible Vectorstores: `AnalyticDB`, `AstraDB`, `AwaDB`, `Bagel`, `Cassandra`, `Chroma`, `DashVector`, `DatabricksVectorSearch`, `DeepLake`, `Dingo`, `ElasticVectorSearch`, `ElasticsearchStore`, `FAISS`, `MyScale`, `PGVector`, `Pinecone`, `Qdrant`, `Redis`, `ScaNN`, `SupabaseVectorStore`, `SurrealDBStore`, `TimescaleVector`, `Vald`, `Vearch`, `VespaStore`, `Weaviate`, `ZepVectorStore`.\n",
"Compatible Vectorstores: `AnalyticDB`, `AstraDB`, `AwaDB`, `Bagel`, `Cassandra`, `Chroma`, `DashVector`, `DatabricksVectorSearch`, `DeepLake`, `Dingo`, `ElasticVectorSearch`, `ElasticsearchStore`, `FAISS`, `HanaDB`, `MyScale`, `PGVector`, `Pinecone`, `Qdrant`, `Redis`, `ScaNN`, `SupabaseVectorStore`, `SurrealDBStore`, `TimescaleVector`, `Vald`, `Vearch`, `VespaStore`, `Weaviate`, `ZepVectorStore`.\n",
" \n",
"## Caution\n",
"\n",
Expand Down
9 changes: 9 additions & 0 deletions libs/community/langchain_community/vectorstores/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ def _import_faiss() -> Any:
return FAISS


def _import_hanavector() -> Any:
from langchain_community.vectorstores.hanavector import HanaDB

return HanaDB


def _import_hologres() -> Any:
from langchain_community.vectorstores.hologres import Hologres

Expand Down Expand Up @@ -527,6 +533,8 @@ def __getattr__(name: str) -> Any:
return _import_epsilla()
elif name == "FAISS":
return _import_faiss()
elif name == "HanaDB":
return _import_hanavector()
elif name == "Hologres":
return _import_hologres()
elif name == "KDBAI":
Expand Down Expand Up @@ -645,6 +653,7 @@ def __getattr__(name: str) -> Any:
"ElasticsearchStore",
"Epsilla",
"FAISS",
"HanaDB",
"Hologres",
"KDBAI",
"LanceDB",
Expand Down
Loading

0 comments on commit 04651f0

Please sign in to comment.