llama-index-vector-stores-opensearch 0.1.11__py3-none-any.whl → 0.1.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of llama-index-vector-stores-opensearch might be problematic. Click here for more details.
- llama_index/vector_stores/opensearch/base.py +7 -2
- {llama_index_vector_stores_opensearch-0.1.11.dist-info → llama_index_vector_stores_opensearch-0.1.12.dist-info}/METADATA +1 -1
- llama_index_vector_stores_opensearch-0.1.12.dist-info/RECORD +5 -0
- llama_index_vector_stores_opensearch-0.1.11.dist-info/RECORD +0 -5
- {llama_index_vector_stores_opensearch-0.1.11.dist-info → llama_index_vector_stores_opensearch-0.1.12.dist-info}/WHEEL +0 -0
|
@@ -20,6 +20,7 @@ from llama_index.core.vector_stores.utils import (
|
|
|
20
20
|
node_to_metadata_dict,
|
|
21
21
|
)
|
|
22
22
|
from opensearchpy import AsyncOpenSearch
|
|
23
|
+
from opensearchpy.client import Client as OSClient
|
|
23
24
|
from opensearchpy.exceptions import NotFoundError
|
|
24
25
|
from opensearchpy.helpers import async_bulk
|
|
25
26
|
|
|
@@ -64,8 +65,10 @@ class OpensearchVectorClient:
|
|
|
64
65
|
embedding_field: str = "embedding",
|
|
65
66
|
text_field: str = "content",
|
|
66
67
|
method: Optional[dict] = None,
|
|
68
|
+
engine: Optional[str] = "nmslib",
|
|
67
69
|
max_chunk_bytes: int = 1 * 1024 * 1024,
|
|
68
70
|
search_pipeline: Optional[str] = None,
|
|
71
|
+
os_client: Optional[OSClient] = None,
|
|
69
72
|
**kwargs: Any,
|
|
70
73
|
):
|
|
71
74
|
"""Init params."""
|
|
@@ -73,7 +76,7 @@ class OpensearchVectorClient:
|
|
|
73
76
|
method = {
|
|
74
77
|
"name": "hnsw",
|
|
75
78
|
"space_type": "l2",
|
|
76
|
-
"engine":
|
|
79
|
+
"engine": engine,
|
|
77
80
|
"parameters": {"ef_construction": 256, "m": 48},
|
|
78
81
|
}
|
|
79
82
|
if embedding_field is None:
|
|
@@ -102,7 +105,9 @@ class OpensearchVectorClient:
|
|
|
102
105
|
}
|
|
103
106
|
},
|
|
104
107
|
}
|
|
105
|
-
self._os_client = self._get_async_opensearch_client(
|
|
108
|
+
self._os_client = os_client or self._get_async_opensearch_client(
|
|
109
|
+
self._endpoint, **kwargs
|
|
110
|
+
)
|
|
106
111
|
not_found_error = self._import_not_found_error()
|
|
107
112
|
|
|
108
113
|
event_loop = asyncio.get_event_loop()
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
llama_index/vector_stores/opensearch/__init__.py,sha256=U1_XAkZb6zcskOk4s10NB8Tjs9AZRGdRQLzOGpbWdBA,176
|
|
2
|
+
llama_index/vector_stores/opensearch/base.py,sha256=sSR4o3c14oTM9s8LCWJRh_7LJxViVk7vOb98Xk4E-jA,19952
|
|
3
|
+
llama_index_vector_stores_opensearch-0.1.12.dist-info/METADATA,sha256=uXlsSYc_ruWaDwmaB3I29LYEYXtOoRDs-Fie_7b1aWA,729
|
|
4
|
+
llama_index_vector_stores_opensearch-0.1.12.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
5
|
+
llama_index_vector_stores_opensearch-0.1.12.dist-info/RECORD,,
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
llama_index/vector_stores/opensearch/__init__.py,sha256=U1_XAkZb6zcskOk4s10NB8Tjs9AZRGdRQLzOGpbWdBA,176
|
|
2
|
-
llama_index/vector_stores/opensearch/base.py,sha256=bHE7FV-CLU-x_ChG9CdoE4WzT1YkkZyIg23PYB7Eg30,19780
|
|
3
|
-
llama_index_vector_stores_opensearch-0.1.11.dist-info/METADATA,sha256=JrqjHpIkrncELU0t2pNIKbbYaAahVnFP8r9Tz0LeYrE,729
|
|
4
|
-
llama_index_vector_stores_opensearch-0.1.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
5
|
-
llama_index_vector_stores_opensearch-0.1.11.dist-info/RECORD,,
|