gllm-datastore-binary 0.0.15__cp312-cp312-win_amd64.whl → 0.0.16__cp312-cp312-win_amd64.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.

@@ -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 as 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): Function to generate embeddings.
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 langchain_core.embeddings import Embeddings as Embeddings
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: Embeddings | None = None, 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
+ 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 (Embeddings | None, optional): The Embeddings object for vector operations. Defaults to None.
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,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gllm-datastore-binary
3
- Version: 0.0.15
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
7
- Requires-Python: >=3.11,<4.0
7
+ Requires-Python: >=3.11,<3.13
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.11
10
10
  Classifier: Programming Language :: Python :: 3.12
@@ -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=YE0R6kzfJGi0LVj12JDTYJBTXr2sFdDnPUKw1k6
26
26
  gllm_datastore/utils/converter.pyi,sha256=H4_O-diiWw33TDEqHWB24SR25tpbuSE6Lu6-G7o_X28,610
27
27
  gllm_datastore/utils/ttl.pyi,sha256=CPGdxD3HpWABw149t-kS_usPReNMj-jRaVRnrd8TDWk,778
28
28
  gllm_datastore/vector_data_store/__init__.pyi,sha256=U1x8eo3OJ5jTjoC4fz2zgyapxZmn-e3ZtI8D32PQ_-g,331
29
- gllm_datastore/vector_data_store/chroma_vector_data_store.pyi,sha256=NQNTcOztwiHhzApsweT_5xotEk_CUTZHYuP7kl8WEjA,6529
29
+ gllm_datastore/vector_data_store/chroma_vector_data_store.pyi,sha256=RCevJFssGYEoxFiirO2XbHNWWstJCYoQLeXse_WXgOY,6302
30
30
  gllm_datastore/vector_data_store/elasticsearch_data_store.pyi,sha256=1-lXVSacRhm0FIwykJwUI9lOwRQmrYCVF5cYOx7qjaw,450
31
- gllm_datastore/vector_data_store/elasticsearch_vector_data_store.pyi,sha256=Bja4Woio3cAw5SY1FPQRRYAjbPzenb02iYDxePw6i7o,8086
31
+ gllm_datastore/vector_data_store/elasticsearch_vector_data_store.pyi,sha256=_AiU29bZeb4NxD32KdUVNk-2g0m9CUclvxlSdbYjGFI,8233
32
32
  gllm_datastore/vector_data_store/vector_data_store.pyi,sha256=GoeW_BxpZywJ11oEWHEXw7P0kap7LWxE-3p3KpaHhk4,2695
33
33
  gllm_datastore.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
34
- gllm_datastore.cp312-win_amd64.pyd,sha256=sqZcOVWLjNuK3c_ff56tOrV8pAa-F_4NuKPyUop-Kas,1125888
35
- gllm_datastore.pyi,sha256=gSGm1EVJP80w3dv9DffuYdvDilHCT67qkJc8dPtJpFA,1299
36
- gllm_datastore_binary-0.0.15.dist-info/METADATA,sha256=7rSZVe65XYS1QNvliXvw0gnZDHpcrIPtnZACyeMIxis,3900
37
- gllm_datastore_binary-0.0.15.dist-info/WHEEL,sha256=4N0hGcnWMI_Ty6ATf4qJqqSl-UNI-Ln828iTWGIywmU,98
38
- gllm_datastore_binary-0.0.15.dist-info/RECORD,,
34
+ gllm_datastore.cp312-win_amd64.pyd,sha256=we3zTwcMdDPDvz7_wjO6y-ejgOhS_uove_mUzVTeEJU,1129472
35
+ gllm_datastore.pyi,sha256=RtR6Nw07RMT9x5dPNhbP7XCDdEvjHZIamBLh2cNYAjU,1398
36
+ gllm_datastore_binary-0.0.16.dist-info/METADATA,sha256=vyWCLl0OOuAZDCYxYSNhzjwoi3GEIOP2ujXNqtCyDPY,3938
37
+ gllm_datastore_binary-0.0.16.dist-info/WHEEL,sha256=4N0hGcnWMI_Ty6ATf4qJqqSl-UNI-Ln828iTWGIywmU,98
38
+ gllm_datastore_binary-0.0.16.dist-info/RECORD,,