gllm-datastore-binary 0.0.15__cp312-cp312-macosx_14_0_arm64.whl → 0.0.16__cp312-cp312-macosx_14_0_arm64.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 gllm-datastore-binary might be problematic. Click here for more details.
- gllm_datastore/vector_data_store/chroma_vector_data_store.pyi +7 -11
- gllm_datastore/vector_data_store/elasticsearch_vector_data_store.pyi +7 -3
- gllm_datastore.cpython-312-darwin.so +0 -0
- gllm_datastore.pyi +3 -0
- {gllm_datastore_binary-0.0.15.dist-info → gllm_datastore_binary-0.0.16.dist-info}/METADATA +2 -1
- {gllm_datastore_binary-0.0.15.dist-info → gllm_datastore_binary-0.0.16.dist-info}/RECORD +7 -7
- {gllm_datastore_binary-0.0.15.dist-info → gllm_datastore_binary-0.0.16.dist-info}/WHEEL +0 -0
|
@@ -5,8 +5,9 @@ from gllm_core.schema.chunk import Chunk
|
|
|
5
5
|
from gllm_datastore.constants import DEFAULT_TOP_K as DEFAULT_TOP_K
|
|
6
6
|
from gllm_datastore.utils.converter import from_langchain as from_langchain, to_langchain as to_langchain
|
|
7
7
|
from gllm_datastore.vector_data_store.vector_data_store import BaseVectorDataStore as BaseVectorDataStore
|
|
8
|
+
from gllm_inference.em_invoker.em_invoker import BaseEMInvoker
|
|
8
9
|
from langchain_core.documents import Document as Document
|
|
9
|
-
from langchain_core.embeddings import Embeddings
|
|
10
|
+
from langchain_core.embeddings import Embeddings
|
|
10
11
|
from typing import Any
|
|
11
12
|
|
|
12
13
|
DEFAULT_NUM_CANDIDATES: int
|
|
@@ -30,25 +31,20 @@ class ChromaVectorDataStore(BaseVectorDataStore):
|
|
|
30
31
|
using the langchain-chroma integration.
|
|
31
32
|
|
|
32
33
|
Attributes:
|
|
34
|
+
store (Chroma): The langchain Chroma vector store instance.
|
|
33
35
|
collection_name (str): The name of the ChromaDB collection to use.
|
|
34
|
-
embedding: The model used to generate embeddings.
|
|
35
|
-
client: The ChromaDB client instance.
|
|
36
|
-
1. MEMORY: In-memory client (chromadb.Client)
|
|
37
|
-
2. PERSISTENT: Persistent client (chromadb.PersistentClient)
|
|
38
|
-
3. HTTP: HTTP client for client-server architecture (chromadb.HttpClient)
|
|
39
|
-
vector_store (Chroma): The langchain Chroma vector store instance.
|
|
40
36
|
num_candidates (int): The maximum number of candidates to consider during search.
|
|
41
37
|
"""
|
|
38
|
+
store: Incomplete
|
|
42
39
|
collection_name: Incomplete
|
|
43
|
-
embedding: Incomplete
|
|
44
|
-
vector_store: Incomplete
|
|
45
40
|
num_candidates: Incomplete
|
|
46
|
-
def __init__(self, collection_name: str, embedding: Embeddings | None = None, client_type: ChromaClientType = ..., persist_directory: str | None = None, host: str | None = None, port: int | None = None, num_candidates: int = ..., **kwargs: Any) -> None:
|
|
41
|
+
def __init__(self, collection_name: str, embedding: BaseEMInvoker | Embeddings | None = None, client_type: ChromaClientType = ..., persist_directory: str | None = None, host: str | None = None, port: int | None = None, num_candidates: int = ..., **kwargs: Any) -> None:
|
|
47
42
|
"""Initialize the ChromaDB vector data store with langchain-chroma.
|
|
48
43
|
|
|
49
44
|
Args:
|
|
50
45
|
collection_name (str): Name of the collection to use in ChromaDB.
|
|
51
|
-
embedding (Embeddings | None):
|
|
46
|
+
embedding (BaseEMInvoker | Embeddings | None, optional): The embedding model to perform vectorization.
|
|
47
|
+
Defaults to None.
|
|
52
48
|
client_type (ChromaClientType, optional): Type of ChromaDB client to use.
|
|
53
49
|
Defaults to ChromaClientType.MEMORY.
|
|
54
50
|
persist_directory (str | None, optional): Directory to persist vector store data.
|
|
@@ -3,7 +3,8 @@ from gllm_core.schema import Chunk
|
|
|
3
3
|
from gllm_datastore.constants import DEFAULT_REQUEST_TIMEOUT as DEFAULT_REQUEST_TIMEOUT, DEFAULT_TOP_K as DEFAULT_TOP_K
|
|
4
4
|
from gllm_datastore.utils.converter import from_langchain as from_langchain, to_langchain as to_langchain
|
|
5
5
|
from gllm_datastore.vector_data_store.vector_data_store import BaseVectorDataStore as BaseVectorDataStore
|
|
6
|
-
from
|
|
6
|
+
from gllm_inference.em_invoker.em_invoker import BaseEMInvoker
|
|
7
|
+
from langchain_core.embeddings import Embeddings
|
|
7
8
|
from typing import Any
|
|
8
9
|
|
|
9
10
|
class ElasticsearchVectorDataStore(BaseVectorDataStore):
|
|
@@ -21,12 +22,12 @@ class ElasticsearchVectorDataStore(BaseVectorDataStore):
|
|
|
21
22
|
index_name: Incomplete
|
|
22
23
|
store: Incomplete
|
|
23
24
|
logger: Incomplete
|
|
24
|
-
def __init__(self, index_name: str, embedding:
|
|
25
|
+
def __init__(self, index_name: str, embedding: BaseEMInvoker | Embeddings, connection: Any | None = None, url: str | None = None, cloud_id: str | None = None, user: str | None = None, api_key: str | None = None, password: str | None = None, vector_query_field: str = 'vector', query_field: str = 'text', distance_strategy: str | None = None, strategy: Any | None = None, request_timeout: int = ...) -> None:
|
|
25
26
|
'''Initializes an instance of the ElasticsearchVectorDataStore class.
|
|
26
27
|
|
|
27
28
|
Args:
|
|
28
29
|
index_name (str): The name of the Elasticsearch index.
|
|
29
|
-
embedding (
|
|
30
|
+
embedding (BaseEMInvoker | Embeddings): The embedding model to perform vectorization.
|
|
30
31
|
connection (Any | None, optional): The Elasticsearch connection object. Defaults to None.
|
|
31
32
|
url (str | None, optional): The URL of the Elasticsearch server. Defaults to None.
|
|
32
33
|
cloud_id (str | None, optional): The cloud ID of the Elasticsearch cluster. Defaults to None.
|
|
@@ -39,6 +40,9 @@ class ElasticsearchVectorDataStore(BaseVectorDataStore):
|
|
|
39
40
|
strategy (Any | None, optional): The retrieval strategy for retrieval. Defaults to None, in which case
|
|
40
41
|
DenseVectorStrategy() is used.
|
|
41
42
|
request_timeout (int, optional): The request timeout. Defaults to DEFAULT_REQUEST_TIMEOUT.
|
|
43
|
+
|
|
44
|
+
Raises:
|
|
45
|
+
TypeError: If `embedding` is not an instance of `BaseEMInvoker` or `Embeddings`.
|
|
42
46
|
'''
|
|
43
47
|
async def query(self, query: str, top_k: int = ..., retrieval_params: dict[str, Any] | None = None) -> list[Chunk]:
|
|
44
48
|
"""Queries the Elasticsearch data store.
|
|
Binary file
|
gllm_datastore.pyi
CHANGED
|
@@ -53,6 +53,9 @@ import langchain_core
|
|
|
53
53
|
import langchain_core.documents
|
|
54
54
|
import sys
|
|
55
55
|
import gllm_core.schema.chunk
|
|
56
|
+
import gllm_inference
|
|
57
|
+
import gllm_inference.em_invoker
|
|
58
|
+
import gllm_inference.em_invoker.em_invoker
|
|
56
59
|
import langchain_core.embeddings
|
|
57
60
|
import chromadb
|
|
58
61
|
import chromadb.types
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gllm-datastore-binary
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.16
|
|
4
4
|
Summary: A library containing data store components for Gen AI applications.
|
|
5
5
|
Author: Berty C L Tobing
|
|
6
6
|
Author-email: berty.c.l.tobing@gdplabs.id
|
|
@@ -16,6 +16,7 @@ Provides-Extra: redis
|
|
|
16
16
|
Requires-Dist: Jinja2 (>=3.1.4,<4.0.0) ; extra == "kg"
|
|
17
17
|
Requires-Dist: chromadb (>=0.6.3,<0.7.0) ; extra == "chroma"
|
|
18
18
|
Requires-Dist: gllm-core-binary
|
|
19
|
+
Requires-Dist: gllm-inference-binary
|
|
19
20
|
Requires-Dist: langchain-chroma (>=0.2.2,<0.3.0) ; extra == "chroma"
|
|
20
21
|
Requires-Dist: langchain-elasticsearch (==0.3.0) ; extra == "elasticsearch"
|
|
21
22
|
Requires-Dist: llama-index-core (>=0.12.0,<0.13.0) ; extra == "kg"
|
|
@@ -26,13 +26,13 @@ gllm_datastore/utils/__init__.pyi,sha256=bH7ZwKoCX3I5IoPLPW0EJ0D5WDWHRBpGsxk5AMy
|
|
|
26
26
|
gllm_datastore/utils/converter.pyi,sha256=omWN28Rh_Q7u3g46NkEcbXYagZc5-br8MBhT-heYxHs,589
|
|
27
27
|
gllm_datastore/utils/ttl.pyi,sha256=zUvLTHhvgRtyKRdjdJk918qYiZkDwWQrbROl00TbpvQ,753
|
|
28
28
|
gllm_datastore/vector_data_store/__init__.pyi,sha256=EAaorTfSpjIPqunbgSe_tVllahAvJJfjgfMe8fN--Tc,327
|
|
29
|
-
gllm_datastore/vector_data_store/chroma_vector_data_store.pyi,sha256=
|
|
29
|
+
gllm_datastore/vector_data_store/chroma_vector_data_store.pyi,sha256=9CCBXh6I1hBZ73J-vcRHCVyP01c6wLieH8zItIvCR3I,6187
|
|
30
30
|
gllm_datastore/vector_data_store/elasticsearch_data_store.pyi,sha256=gNLFrArc69CbhuAbGaEJE9wPqIWUVn0DJwwT8_M1zKc,441
|
|
31
|
-
gllm_datastore/vector_data_store/elasticsearch_vector_data_store.pyi,sha256=
|
|
31
|
+
gllm_datastore/vector_data_store/elasticsearch_vector_data_store.pyi,sha256=R0P0oD92dsgTnfkQo6X1bM3S3aQnf2g8Iglug9oYCO8,8089
|
|
32
32
|
gllm_datastore/vector_data_store/vector_data_store.pyi,sha256=f7LXNzFxpYR-wdct2Q0DPDvfkXYtTGerqsoreINyAG0,2622
|
|
33
33
|
gllm_datastore.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
|
|
34
|
-
gllm_datastore.cpython-312-darwin.so,sha256=
|
|
35
|
-
gllm_datastore.pyi,sha256=
|
|
36
|
-
gllm_datastore_binary-0.0.
|
|
37
|
-
gllm_datastore_binary-0.0.
|
|
38
|
-
gllm_datastore_binary-0.0.
|
|
34
|
+
gllm_datastore.cpython-312-darwin.so,sha256=uN_jIrSa7gZ9mNYa-q85j8H2pbtLnBGJ_Qmah5xEkgc,1388328
|
|
35
|
+
gllm_datastore.pyi,sha256=38s8JMeeliRQPFlsCJ9gxDxe-vVXAMQN1mErtwuCLQQ,1401
|
|
36
|
+
gllm_datastore_binary-0.0.16.dist-info/METADATA,sha256=vyWCLl0OOuAZDCYxYSNhzjwoi3GEIOP2ujXNqtCyDPY,3938
|
|
37
|
+
gllm_datastore_binary-0.0.16.dist-info/WHEEL,sha256=yhFWDruQeL16y7AZmR-YzCRfHXG6441RPQ3U5xtqaLo,106
|
|
38
|
+
gllm_datastore_binary-0.0.16.dist-info/RECORD,,
|
|
File without changes
|