gllm-datastore-binary 0.0.15__cp311-cp311-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.
- gllm_datastore/__init__.pyi +0 -0
- gllm_datastore/cache_data_store/__init__.pyi +5 -0
- gllm_datastore/cache_data_store/cache_data_store.pyi +146 -0
- gllm_datastore/cache_data_store/cache_data_store_utils.pyi +1 -0
- gllm_datastore/cache_data_store/file_system_cache_data_store.pyi +62 -0
- gllm_datastore/cache_data_store/in_memory_cache_data_store.pyi +43 -0
- gllm_datastore/cache_data_store/redis_cache_data_store.pyi +48 -0
- gllm_datastore/cache_data_store/utils.pyi +36 -0
- gllm_datastore/constants.pyi +2 -0
- gllm_datastore/graph_data_store/__init__.pyi +0 -0
- gllm_datastore/graph_data_store/graph_data_store.pyi +80 -0
- gllm_datastore/graph_data_store/graph_rag_data_store.pyi +28 -0
- gllm_datastore/graph_data_store/llama_index_graph_rag_data_store.pyi +18 -0
- gllm_datastore/graph_data_store/llama_index_neo4j_graph_rag_data_store.pyi +26 -0
- gllm_datastore/graph_data_store/nebula_graph_data_store.pyi +112 -0
- gllm_datastore/graph_data_store/neo4j_graph_data_store.pyi +81 -0
- gllm_datastore/sql_data_store/__init__.pyi +5 -0
- gllm_datastore/sql_data_store/adapter/__init__.pyi +0 -0
- gllm_datastore/sql_data_store/adapter/sqlalchemy_adapter.pyi +30 -0
- gllm_datastore/sql_data_store/constants.pyi +6 -0
- gllm_datastore/sql_data_store/sql_data_store.pyi +87 -0
- gllm_datastore/sql_data_store/sqlalchemy_data_store.pyi +9 -0
- gllm_datastore/sql_data_store/sqlalchemy_sql_data_store.pyi +183 -0
- gllm_datastore/sql_data_store/types.pyi +30 -0
- gllm_datastore/utils/__init__.pyi +4 -0
- gllm_datastore/utils/converter.pyi +21 -0
- gllm_datastore/utils/ttl.pyi +25 -0
- gllm_datastore/vector_data_store/__init__.pyi +4 -0
- gllm_datastore/vector_data_store/chroma_vector_data_store.pyi +119 -0
- gllm_datastore/vector_data_store/elasticsearch_data_store.pyi +9 -0
- gllm_datastore/vector_data_store/elasticsearch_vector_data_store.pyi +140 -0
- gllm_datastore/vector_data_store/vector_data_store.pyi +73 -0
- gllm_datastore.build/.gitignore +1 -0
- gllm_datastore.cp311-win_amd64.pyd +0 -0
- gllm_datastore.pyi +63 -0
- gllm_datastore_binary-0.0.15.dist-info/METADATA +98 -0
- gllm_datastore_binary-0.0.15.dist-info/RECORD +38 -0
- gllm_datastore_binary-0.0.15.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from gllm_core.schema import Chunk
|
|
3
|
+
from gllm_datastore.constants import DEFAULT_REQUEST_TIMEOUT as DEFAULT_REQUEST_TIMEOUT, DEFAULT_TOP_K as DEFAULT_TOP_K
|
|
4
|
+
from gllm_datastore.utils.converter import from_langchain as from_langchain, to_langchain as to_langchain
|
|
5
|
+
from gllm_datastore.vector_data_store.vector_data_store import BaseVectorDataStore as BaseVectorDataStore
|
|
6
|
+
from langchain_core.embeddings import Embeddings as Embeddings
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
class ElasticsearchVectorDataStore(BaseVectorDataStore):
|
|
10
|
+
"""DataStore for interacting with Elasticsearch.
|
|
11
|
+
|
|
12
|
+
This class provides methods for executing queries and retrieving documents
|
|
13
|
+
from Elasticsearch. It relies on the LangChain's ElasticsearchStore for
|
|
14
|
+
vector operations and the underlying Elasticsearch client management.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
store (ElasticsearchStore): The ElasticsearchStore instance for vector operations.
|
|
18
|
+
index_name (str): The name of the Elasticsearch index.
|
|
19
|
+
logger (Logger): The logger object.
|
|
20
|
+
"""
|
|
21
|
+
index_name: Incomplete
|
|
22
|
+
store: Incomplete
|
|
23
|
+
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
|
+
'''Initializes an instance of the ElasticsearchVectorDataStore class.
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
index_name (str): The name of the Elasticsearch index.
|
|
29
|
+
embedding (Embeddings | None, optional): The Embeddings object for vector operations. Defaults to None.
|
|
30
|
+
connection (Any | None, optional): The Elasticsearch connection object. Defaults to None.
|
|
31
|
+
url (str | None, optional): The URL of the Elasticsearch server. Defaults to None.
|
|
32
|
+
cloud_id (str | None, optional): The cloud ID of the Elasticsearch cluster. Defaults to None.
|
|
33
|
+
user (str | None, optional): The username for authentication. Defaults to None.
|
|
34
|
+
api_key (str | None, optional): The API key for authentication. Defaults to None.
|
|
35
|
+
password (str | None, optional): The password for authentication. Defaults to None.
|
|
36
|
+
vector_query_field (str, optional): The field name for vector queries. Defaults to "vector".
|
|
37
|
+
query_field (str, optional): The field name for text queries. Defaults to "text".
|
|
38
|
+
distance_strategy (str | None, optional): The distance strategy for retrieval. Defaults to None.
|
|
39
|
+
strategy (Any | None, optional): The retrieval strategy for retrieval. Defaults to None, in which case
|
|
40
|
+
DenseVectorStrategy() is used.
|
|
41
|
+
request_timeout (int, optional): The request timeout. Defaults to DEFAULT_REQUEST_TIMEOUT.
|
|
42
|
+
'''
|
|
43
|
+
async def query(self, query: str, top_k: int = ..., retrieval_params: dict[str, Any] | None = None) -> list[Chunk]:
|
|
44
|
+
"""Queries the Elasticsearch data store.
|
|
45
|
+
|
|
46
|
+
Args:
|
|
47
|
+
query (str): The query string.
|
|
48
|
+
top_k (int, optional): The number of top results to retrieve. Defaults to DEFAULT_TOP_K.
|
|
49
|
+
retrieval_params (dict[str, Any] | None, optional): Additional retrieval parameters. Defaults to None.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
list[Chunk]: A list of Chunk objects representing the retrieved documents.
|
|
53
|
+
"""
|
|
54
|
+
async def query_by_id(self, id_: str | list[str]) -> list[Chunk]:
|
|
55
|
+
"""Queries the data store by ID and returns a list of Chunk objects.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
id_: The ID of the document to query.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
A list of Chunk objects representing the queried documents.
|
|
62
|
+
|
|
63
|
+
Note:
|
|
64
|
+
This method not implement yet. Because the ElasticsearchStore
|
|
65
|
+
still not implement the get_by_ids method yet.
|
|
66
|
+
"""
|
|
67
|
+
async def autocomplete(self, query: str, field: str, size: int = 20, fuzzy_tolerance: int = 1, min_prefix_length: int = 3, filter_query: dict[str, Any] | None = None) -> list[str]:
|
|
68
|
+
"""Provides suggestions based on a prefix query for a specific field.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
query (str): The query string.
|
|
72
|
+
field (str): The field name for autocomplete.
|
|
73
|
+
size (int, optional): The number of suggestions to retrieve. Defaults to 20.
|
|
74
|
+
fuzzy_tolerance (int, optional): The level of fuzziness for suggestions. Defaults to 1.
|
|
75
|
+
min_prefix_length (int, optional): The minimum prefix length to trigger fuzzy matching. Defaults to 3.
|
|
76
|
+
filter_query (dict[str, Any] | None, optional): The filter query. Defaults to None.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
list[str]: A list of suggestions.
|
|
80
|
+
"""
|
|
81
|
+
async def autosuggest(self, query: str, search_fields: list[str], autocomplete_field: str, size: int = 20, min_length: int = 3, filter_query: dict[str, Any] | None = None) -> list[str]:
|
|
82
|
+
"""Generates suggestions across multiple fields using a multi_match query to broaden the search criteria.
|
|
83
|
+
|
|
84
|
+
Args:
|
|
85
|
+
query (str): The query string.
|
|
86
|
+
search_fields (list[str]): The fields to search for.
|
|
87
|
+
autocomplete_field (str): The field name for autocomplete.
|
|
88
|
+
size (int, optional): The number of suggestions to retrieve. Defaults to 20.
|
|
89
|
+
min_length (int, optional): The minimum length of the query. Defaults to 3.
|
|
90
|
+
filter_query (dict[str, Any] | None, optional): The filter query. Defaults to None.
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
list[str]: A list of suggestions.
|
|
94
|
+
"""
|
|
95
|
+
async def shingles(self, query: str, field: str, size: int = 20, min_length: int = 3, filter_query: dict[str, Any] | None = None) -> list[str]:
|
|
96
|
+
"""Searches using shingles for prefix and fuzzy matching.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
query (str): The query string.
|
|
100
|
+
field (str): The field name for autocomplete.
|
|
101
|
+
size (int, optional): The number of suggestions to retrieve. Defaults to 20.
|
|
102
|
+
min_length (int, optional): The minimum length of the query. Defaults to 3.
|
|
103
|
+
filter_query (dict[str, Any] | None, optional): The filter query. Defaults to None.
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
list[str]: A list of suggestions.
|
|
107
|
+
"""
|
|
108
|
+
async def add_chunks(self, chunk: Chunk | list[Chunk], **kwargs: Any) -> list[str]:
|
|
109
|
+
"""Adds a chunk or a list of chunks to the data store.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
chunk (Chunk | list[Chunk]): The chunk or list of chunks to add.
|
|
113
|
+
kwargs (Any): Additional keyword arguments.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
list[str]: A list of unique identifiers (IDs) assigned to the added chunks.
|
|
117
|
+
"""
|
|
118
|
+
async def add_embeddings(self, text_embeddings: list[tuple[str, list[float]]], metadatas: list[dict] | None = None, ids: list[str] | None = None, **kwargs) -> list[str]:
|
|
119
|
+
"""Adds text embeddings to the data store.
|
|
120
|
+
|
|
121
|
+
Args:
|
|
122
|
+
text_embeddings (list[tuple[str, list[float]]]): Pairs of string and embedding to add to the store.
|
|
123
|
+
metadatas (list[dict], optional): Optional list of metadatas associated with the texts. Defaults to None.
|
|
124
|
+
ids (list[str], optional): Optional list of unique IDs. Defaults to None.
|
|
125
|
+
kwargs (Any): Additional keyword arguments.
|
|
126
|
+
|
|
127
|
+
Returns:
|
|
128
|
+
list[str]: A list of unique identifiers (IDs) assigned to the added embeddings.
|
|
129
|
+
"""
|
|
130
|
+
async def delete_chunks(self, query: dict[str, Any], **kwargs: Any) -> None:
|
|
131
|
+
'''Deletes a chunk or a list of chunks from the data store.
|
|
132
|
+
|
|
133
|
+
Args:
|
|
134
|
+
query (dict[str, Any]): The query to filter the chunks to delete.
|
|
135
|
+
For example, `{"term": {"metadata.id": "doc123"}}`.
|
|
136
|
+
kwargs (Any): Additional keyword arguments.
|
|
137
|
+
|
|
138
|
+
Returns:
|
|
139
|
+
None
|
|
140
|
+
'''
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
from abc import ABC, abstractmethod
|
|
3
|
+
from gllm_core.schema.chunk import Chunk as Chunk
|
|
4
|
+
from gllm_datastore.constants import DEFAULT_TOP_K as DEFAULT_TOP_K
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
class BaseVectorDataStore(ABC, metaclass=abc.ABCMeta):
|
|
8
|
+
"""Abstract base class for vector data stores in the retrieval system.
|
|
9
|
+
|
|
10
|
+
This class defines the interface for all vector data store implementations.
|
|
11
|
+
Subclasses must implement the `query` and `query_by_id` methods.
|
|
12
|
+
"""
|
|
13
|
+
@abstractmethod
|
|
14
|
+
async def query(self, query: str, top_k: int = ..., retrieval_params: dict[str, Any] | None = None) -> list[Chunk]:
|
|
15
|
+
"""Executes a query on the data store.
|
|
16
|
+
|
|
17
|
+
This method must be implemented by subclasses.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
query (str): The query string to execute.
|
|
21
|
+
top_k (int, optional): The maximum number of results to return. Defaults to DEFAULT_TOP_K.
|
|
22
|
+
retrieval_params (dict[str, Any] | None, optional): Additional parameters for the query.
|
|
23
|
+
Defaults to None.
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
list[Chunk]: A list of query results.
|
|
27
|
+
|
|
28
|
+
Raises:
|
|
29
|
+
NotImplementedError: If the method is not implemented.
|
|
30
|
+
"""
|
|
31
|
+
@abstractmethod
|
|
32
|
+
async def query_by_id(self, id_: str | list[str]) -> list[Chunk]:
|
|
33
|
+
"""Retrieves chunks by their IDs.
|
|
34
|
+
|
|
35
|
+
This method must be implemented by subclasses.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
id_ (str | list[str]): A single ID or a list of IDs to retrieve.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
list[Chunk]: A list of retrieved chunks.
|
|
42
|
+
|
|
43
|
+
Raises:
|
|
44
|
+
NotImplementedError: If the method is not implemented.
|
|
45
|
+
"""
|
|
46
|
+
@abstractmethod
|
|
47
|
+
async def add_chunks(self, chunk: Chunk | list[Chunk], **kwargs) -> list[str]:
|
|
48
|
+
"""Adds a chunk or a list of chunks in the data store.
|
|
49
|
+
|
|
50
|
+
This method must be implemented by subclasses.
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
chunk (Chunk | list[Chunk]): A single chunk or a list of chunks to index.
|
|
54
|
+
**kwargs: Additional keyword arguments to pass to the method.
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
list[str]: A list of unique identifiers (IDs) assigned to the added chunks.
|
|
58
|
+
|
|
59
|
+
Raises:
|
|
60
|
+
NotImplementedError: If the method is not implemented.
|
|
61
|
+
"""
|
|
62
|
+
@abstractmethod
|
|
63
|
+
async def delete_chunks(self, **kwargs: Any) -> None:
|
|
64
|
+
"""Deletes a chunk or a list of chunks from the data store.
|
|
65
|
+
|
|
66
|
+
This method must be implemented by subclasses.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
kwargs: Additional keyword arguments to pass to the method.
|
|
70
|
+
|
|
71
|
+
Raises:
|
|
72
|
+
NotImplementedError: If the method is not implemented.
|
|
73
|
+
"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*
|
|
Binary file
|
gllm_datastore.pyi
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# This file was generated by Nuitka
|
|
2
|
+
|
|
3
|
+
# Stubs included by default
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
__name__ = ...
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# Modules used internally, to allow implicit dependencies to be seen:
|
|
11
|
+
import os
|
|
12
|
+
import asyncio
|
|
13
|
+
import functools
|
|
14
|
+
import abc
|
|
15
|
+
import enum
|
|
16
|
+
import typing
|
|
17
|
+
import gllm_core
|
|
18
|
+
import gllm_core.utils
|
|
19
|
+
import gllm_core.utils.imports
|
|
20
|
+
import gllm_datastore.utils.convert_ttl_to_seconds
|
|
21
|
+
import Levenshtein
|
|
22
|
+
import warnings
|
|
23
|
+
import gzip
|
|
24
|
+
import json
|
|
25
|
+
import pickle
|
|
26
|
+
import shutil
|
|
27
|
+
import time
|
|
28
|
+
import gllm_core.utils.logger_manager
|
|
29
|
+
import ntpath
|
|
30
|
+
import datetime
|
|
31
|
+
import redis
|
|
32
|
+
import hashlib
|
|
33
|
+
import llama_index
|
|
34
|
+
import llama_index.core
|
|
35
|
+
import llama_index.core.graph_stores
|
|
36
|
+
import llama_index.core.graph_stores.types
|
|
37
|
+
import llama_index.graph_stores
|
|
38
|
+
import llama_index.graph_stores.neo4j
|
|
39
|
+
import nebula3
|
|
40
|
+
import nebula3.Config
|
|
41
|
+
import nebula3.gclient
|
|
42
|
+
import nebula3.gclient.net
|
|
43
|
+
import neo4j
|
|
44
|
+
import sqlalchemy
|
|
45
|
+
import sqlalchemy.engine
|
|
46
|
+
import pandas
|
|
47
|
+
import sqlalchemy.exc
|
|
48
|
+
import sqlalchemy.orm
|
|
49
|
+
import pydantic
|
|
50
|
+
import uuid
|
|
51
|
+
import gllm_core.schema
|
|
52
|
+
import langchain_core
|
|
53
|
+
import langchain_core.documents
|
|
54
|
+
import sys
|
|
55
|
+
import gllm_core.schema.chunk
|
|
56
|
+
import langchain_core.embeddings
|
|
57
|
+
import chromadb
|
|
58
|
+
import chromadb.types
|
|
59
|
+
import langchain_chroma
|
|
60
|
+
import pysqlite3
|
|
61
|
+
import elasticsearch
|
|
62
|
+
import langchain_elasticsearch
|
|
63
|
+
import langchain_elasticsearch.vectorstores
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: gllm-datastore-binary
|
|
3
|
+
Version: 0.0.15
|
|
4
|
+
Summary: A library containing data store components for Gen AI applications.
|
|
5
|
+
Author: Berty C L Tobing
|
|
6
|
+
Author-email: berty.c.l.tobing@gdplabs.id
|
|
7
|
+
Requires-Python: >=3.11,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Provides-Extra: chroma
|
|
12
|
+
Provides-Extra: elasticsearch
|
|
13
|
+
Provides-Extra: fuzzy
|
|
14
|
+
Provides-Extra: kg
|
|
15
|
+
Provides-Extra: redis
|
|
16
|
+
Requires-Dist: Jinja2 (>=3.1.4,<4.0.0) ; extra == "kg"
|
|
17
|
+
Requires-Dist: chromadb (>=0.6.3,<0.7.0) ; extra == "chroma"
|
|
18
|
+
Requires-Dist: gllm-core-binary
|
|
19
|
+
Requires-Dist: langchain-chroma (>=0.2.2,<0.3.0) ; extra == "chroma"
|
|
20
|
+
Requires-Dist: langchain-elasticsearch (==0.3.0) ; extra == "elasticsearch"
|
|
21
|
+
Requires-Dist: llama-index-core (>=0.12.0,<0.13.0) ; extra == "kg"
|
|
22
|
+
Requires-Dist: llama-index-graph-stores-nebula (>=0.4.0,<0.5.0) ; extra == "kg"
|
|
23
|
+
Requires-Dist: llama-index-graph-stores-neo4j (>=0.4.0,<0.5.0) ; extra == "kg"
|
|
24
|
+
Requires-Dist: nebula3-python (>=3.8.3,<4.0.0)
|
|
25
|
+
Requires-Dist: neo4j (>=5.28.1,<6.0.0)
|
|
26
|
+
Requires-Dist: pandas (==2.2.2)
|
|
27
|
+
Requires-Dist: pysqlite3-binary (>=0.5.4,<0.6.0) ; sys_platform == "linux"
|
|
28
|
+
Requires-Dist: python-levenshtein (==0.26.1) ; extra == "fuzzy"
|
|
29
|
+
Requires-Dist: redis (==5.2.1) ; extra == "redis"
|
|
30
|
+
Requires-Dist: sqlalchemy (>=2.0.37,<3.0.0)
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# GLLM Datastore
|
|
34
|
+
|
|
35
|
+
## Description
|
|
36
|
+
|
|
37
|
+
A library for managing data stores for Gen AI applications.
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
1. Python v3.11 or above:
|
|
42
|
+
|
|
43
|
+
You can install Python using [Miniconda](https://docs.anaconda.com/free/miniconda/index.html).
|
|
44
|
+
|
|
45
|
+
2. Make sure you're in the `base` conda environment:
|
|
46
|
+
```bash
|
|
47
|
+
conda activate
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
3. [Poetry](https://python-poetry.org/docs/) v1.8.1 or above:
|
|
51
|
+
|
|
52
|
+
You can install Poetry using cURL (you need Python to install Poetry):
|
|
53
|
+
```bash
|
|
54
|
+
curl -sSL https://install.python-poetry.org | python3 -
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
4. Install the library using Poetry:
|
|
58
|
+
```bash
|
|
59
|
+
# Latest
|
|
60
|
+
poetry add "git+ssh://git@github.com/GDP-ADMIN/gen-ai-internal.git#subdirectory=libs/gllm-datastore"
|
|
61
|
+
|
|
62
|
+
# Specific version
|
|
63
|
+
poetry add "git+ssh://git@github.com/GDP-ADMIN/gen-ai-internal.git@gllm_datastore-v0.0.1-beta.1#subdirectory=libs/gllm-datastore"
|
|
64
|
+
|
|
65
|
+
# Specific Branch Name
|
|
66
|
+
poetry add "git+ssh://git@github.com/GDP-ADMIN/gen-ai-internal.git@<BRANCH NAME>#subdirectory=libs/gllm-datastore"
|
|
67
|
+
|
|
68
|
+
# With extra dependencies
|
|
69
|
+
poetry add "git+ssh://git@github.com/GDP-ADMIN/gen-ai-internal.git#subdirectory=libs/gllm-datastore" --extras "extra1 extra2"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
5. At this step, you can deactivate Miniconda environment as Poetry will create and manage its own virtual environment for you.
|
|
73
|
+
```bash
|
|
74
|
+
conda deactivate
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Managing Dependencies
|
|
78
|
+
1. Go to root folder of `gllm-datastore` module, e.g. `cd libs/gllm-datastore`.
|
|
79
|
+
2. Run `poetry shell` to create a virtual environment.
|
|
80
|
+
3. Run `poetry lock` to create a lock file if you haven't done it yet.
|
|
81
|
+
4. Run `poetry install` to install the `gllm-datastore` requirements for the first time.
|
|
82
|
+
5. Run `poetry update` if you update any dependency module version at `pyproject.toml`.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## Contributing
|
|
86
|
+
Please refer to this [Python Style Guide](https://docs.google.com/document/d/1uRggCrHnVfDPBnG641FyQBwUwLoFw0kTzNqRm92vUwM/edit?usp=sharing)
|
|
87
|
+
to get information about code style, documentation standard, and SCA that you need to use when contributing to this project
|
|
88
|
+
|
|
89
|
+
1. Activate `pre-commit` hooks using `pre-commit install`
|
|
90
|
+
2. Run `poetry shell` to create a virtual environment.
|
|
91
|
+
3. Run `poetry lock` to create a lock file if you haven't done it yet.
|
|
92
|
+
4. Run `poetry install` to install the `gllm-datastore` requirements for the first time.
|
|
93
|
+
5. Run `which python` to get the path to be referenced at Visual Studio Code interpreter path (`Ctrl`+`Shift`+`P` or `Cmd`+`Shift`+`P`)
|
|
94
|
+
6. Try running the unit test to see if it's working:
|
|
95
|
+
```bash
|
|
96
|
+
poetry run pytest -s tests/unit_tests/
|
|
97
|
+
```
|
|
98
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
gllm_datastore/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
gllm_datastore/cache_data_store/__init__.pyi,sha256=pT0UrQbw6z9xHO3EwvM4wkug33jWLaxxj7tbEz6cQx0,450
|
|
3
|
+
gllm_datastore/cache_data_store/cache_data_store.pyi,sha256=A5MZekHV4i03d0KIJHUWB3kFe040ycRqBpaQdJMD0P4,6505
|
|
4
|
+
gllm_datastore/cache_data_store/cache_data_store_utils.pyi,sha256=5ndFYWZ4yG8oyxmdq08SqVr7lejID7IXIvZTRDS3hsI,53
|
|
5
|
+
gllm_datastore/cache_data_store/file_system_cache_data_store.pyi,sha256=QHOSCRVQUQTqixXedN3gGsjZ0fR4zkVmHLdN6siHVjk,3483
|
|
6
|
+
gllm_datastore/cache_data_store/in_memory_cache_data_store.pyi,sha256=u81kwqFj5t3U7jwJlMbLLASs4sIXaC_JkPKkNBiSPAU,2149
|
|
7
|
+
gllm_datastore/cache_data_store/redis_cache_data_store.pyi,sha256=betNBcLf2WZySneuGLIpnN2G4mL3UKogUFpBSz6ohqs,2438
|
|
8
|
+
gllm_datastore/cache_data_store/utils.pyi,sha256=PlgCLEsmQV_lUkkn0XnaQilrOxzsyM6qG4N-HOZWnHY,1377
|
|
9
|
+
gllm_datastore/constants.pyi,sha256=s0K1tUBRBFDfjODvZwFFUPxWdtAZNwyciINmIjKU-0E,50
|
|
10
|
+
gllm_datastore/graph_data_store/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
gllm_datastore/graph_data_store/graph_data_store.pyi,sha256=EUrp48f1gYct3QuWMD6qSdKhFJZXikSHMVhoOWUFmoI,3398
|
|
12
|
+
gllm_datastore/graph_data_store/graph_rag_data_store.pyi,sha256=eYuoSU46xm-0I3EC3m_hmDNqX9D8EXpXDiex-Mlox_E,917
|
|
13
|
+
gllm_datastore/graph_data_store/llama_index_graph_rag_data_store.pyi,sha256=1FM90HKSzD7UdYROOrcnRZICmhz3Qt8SrNo4xPG4hwA,721
|
|
14
|
+
gllm_datastore/graph_data_store/llama_index_neo4j_graph_rag_data_store.pyi,sha256=giAhUk2hHhKQm8mVdogne0QCf18zadnn3wr-BKpelPk,1120
|
|
15
|
+
gllm_datastore/graph_data_store/nebula_graph_data_store.pyi,sha256=jYtal--cvV_aT9Zw3xpT3hd80ZAj4oOJfbd0ugEb4pw,4975
|
|
16
|
+
gllm_datastore/graph_data_store/neo4j_graph_data_store.pyi,sha256=UXNH_HAqVCjvF_P7kv8XqFm4i8LR1OnhLrO_9aHjJLY,3545
|
|
17
|
+
gllm_datastore/sql_data_store/__init__.pyi,sha256=EHEc8NNcXMn2zAECQzCOW7ZnFmlg50j4e05hfIvAC24,426
|
|
18
|
+
gllm_datastore/sql_data_store/adapter/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
+
gllm_datastore/sql_data_store/adapter/sqlalchemy_adapter.pyi,sha256=9u670RQQYCMpvPDf-cNyRrDhQheWIDhR-kr6fFRCXu4,1417
|
|
20
|
+
gllm_datastore/sql_data_store/constants.pyi,sha256=m38bKAzPCFog92Mv_pkM-6S5A83_AXWARTPfXXytPBw,139
|
|
21
|
+
gllm_datastore/sql_data_store/sql_data_store.pyi,sha256=PAYBQW6JniZ0h2WBmWL2phqc1FsWUuHn2GyJjxZ_gKo,3839
|
|
22
|
+
gllm_datastore/sql_data_store/sqlalchemy_data_store.pyi,sha256=Ajk19DVerVT_ZTChHYIH-J95nuIcBRQhuFvvAaedsCE,398
|
|
23
|
+
gllm_datastore/sql_data_store/sqlalchemy_sql_data_store.pyi,sha256=RYYJt93xofbckBvcUp5HhosEjEg3KIFFtHUc78beTac,8288
|
|
24
|
+
gllm_datastore/sql_data_store/types.pyi,sha256=DoaI5LCOMVP2zxHpD2yimFovhWFP_dBe3K5lv_InxhI,1061
|
|
25
|
+
gllm_datastore/utils/__init__.pyi,sha256=YE0R6kzfJGi0LVj12JDTYJBTXr2sFdDnPUKw1k6V_L4,222
|
|
26
|
+
gllm_datastore/utils/converter.pyi,sha256=H4_O-diiWw33TDEqHWB24SR25tpbuSE6Lu6-G7o_X28,610
|
|
27
|
+
gllm_datastore/utils/ttl.pyi,sha256=CPGdxD3HpWABw149t-kS_usPReNMj-jRaVRnrd8TDWk,778
|
|
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
|
|
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
|
|
32
|
+
gllm_datastore/vector_data_store/vector_data_store.pyi,sha256=GoeW_BxpZywJ11oEWHEXw7P0kap7LWxE-3p3KpaHhk4,2695
|
|
33
|
+
gllm_datastore.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
|
|
34
|
+
gllm_datastore.cp311-win_amd64.pyd,sha256=dfuKJzExRDfGrWYP2MVQT7H2Nb4iQv_khRygh9UHS7A,1121792
|
|
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=-FZBVKyKauScY3vLa8vJR6hBCpAJfFykw2MOwlNKr1g,98
|
|
38
|
+
gllm_datastore_binary-0.0.15.dist-info/RECORD,,
|