langroid 0.31.1__py3-none-any.whl → 0.33.3__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.
- {langroid-0.31.1.dist-info → langroid-0.33.3.dist-info}/METADATA +150 -124
- langroid-0.33.3.dist-info/RECORD +7 -0
- {langroid-0.31.1.dist-info → langroid-0.33.3.dist-info}/WHEEL +1 -1
- langroid-0.33.3.dist-info/entry_points.txt +4 -0
- pyproject.toml +317 -212
- langroid/__init__.py +0 -106
- langroid/agent/.chainlit/config.toml +0 -121
- langroid/agent/.chainlit/translations/bn.json +0 -231
- langroid/agent/.chainlit/translations/en-US.json +0 -229
- langroid/agent/.chainlit/translations/gu.json +0 -231
- langroid/agent/.chainlit/translations/he-IL.json +0 -231
- langroid/agent/.chainlit/translations/hi.json +0 -231
- langroid/agent/.chainlit/translations/kn.json +0 -231
- langroid/agent/.chainlit/translations/ml.json +0 -231
- langroid/agent/.chainlit/translations/mr.json +0 -231
- langroid/agent/.chainlit/translations/ta.json +0 -231
- langroid/agent/.chainlit/translations/te.json +0 -231
- langroid/agent/.chainlit/translations/zh-CN.json +0 -229
- langroid/agent/__init__.py +0 -41
- langroid/agent/base.py +0 -1981
- langroid/agent/batch.py +0 -398
- langroid/agent/callbacks/__init__.py +0 -0
- langroid/agent/callbacks/chainlit.py +0 -598
- langroid/agent/chat_agent.py +0 -1899
- langroid/agent/chat_document.py +0 -454
- langroid/agent/helpers.py +0 -0
- langroid/agent/junk +0 -13
- langroid/agent/openai_assistant.py +0 -882
- langroid/agent/special/__init__.py +0 -59
- langroid/agent/special/arangodb/__init__.py +0 -0
- langroid/agent/special/arangodb/arangodb_agent.py +0 -656
- langroid/agent/special/arangodb/system_messages.py +0 -186
- langroid/agent/special/arangodb/tools.py +0 -107
- langroid/agent/special/arangodb/utils.py +0 -36
- langroid/agent/special/doc_chat_agent.py +0 -1466
- langroid/agent/special/lance_doc_chat_agent.py +0 -262
- langroid/agent/special/lance_rag/__init__.py +0 -9
- langroid/agent/special/lance_rag/critic_agent.py +0 -198
- langroid/agent/special/lance_rag/lance_rag_task.py +0 -82
- langroid/agent/special/lance_rag/query_planner_agent.py +0 -260
- langroid/agent/special/lance_tools.py +0 -61
- langroid/agent/special/neo4j/__init__.py +0 -0
- langroid/agent/special/neo4j/csv_kg_chat.py +0 -174
- langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -433
- langroid/agent/special/neo4j/system_messages.py +0 -120
- langroid/agent/special/neo4j/tools.py +0 -32
- langroid/agent/special/relevance_extractor_agent.py +0 -127
- langroid/agent/special/retriever_agent.py +0 -56
- langroid/agent/special/sql/__init__.py +0 -17
- langroid/agent/special/sql/sql_chat_agent.py +0 -654
- langroid/agent/special/sql/utils/__init__.py +0 -21
- langroid/agent/special/sql/utils/description_extractors.py +0 -190
- langroid/agent/special/sql/utils/populate_metadata.py +0 -85
- langroid/agent/special/sql/utils/system_message.py +0 -35
- langroid/agent/special/sql/utils/tools.py +0 -64
- langroid/agent/special/table_chat_agent.py +0 -263
- langroid/agent/structured_message.py +0 -9
- langroid/agent/task.py +0 -2093
- langroid/agent/tool_message.py +0 -393
- langroid/agent/tools/__init__.py +0 -38
- langroid/agent/tools/duckduckgo_search_tool.py +0 -50
- langroid/agent/tools/file_tools.py +0 -234
- langroid/agent/tools/google_search_tool.py +0 -39
- langroid/agent/tools/metaphor_search_tool.py +0 -67
- langroid/agent/tools/orchestration.py +0 -303
- langroid/agent/tools/recipient_tool.py +0 -235
- langroid/agent/tools/retrieval_tool.py +0 -32
- langroid/agent/tools/rewind_tool.py +0 -137
- langroid/agent/tools/segment_extract_tool.py +0 -41
- langroid/agent/typed_task.py +0 -19
- langroid/agent/xml_tool_message.py +0 -382
- langroid/agent_config.py +0 -0
- langroid/cachedb/__init__.py +0 -17
- langroid/cachedb/base.py +0 -58
- langroid/cachedb/momento_cachedb.py +0 -108
- langroid/cachedb/redis_cachedb.py +0 -153
- langroid/embedding_models/__init__.py +0 -39
- langroid/embedding_models/base.py +0 -74
- langroid/embedding_models/clustering.py +0 -189
- langroid/embedding_models/models.py +0 -461
- langroid/embedding_models/protoc/__init__.py +0 -0
- langroid/embedding_models/protoc/embeddings.proto +0 -19
- langroid/embedding_models/protoc/embeddings_pb2.py +0 -33
- langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -50
- langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -79
- langroid/embedding_models/remote_embeds.py +0 -153
- langroid/exceptions.py +0 -65
- langroid/experimental/team-save.py +0 -391
- langroid/language_models/.chainlit/config.toml +0 -121
- langroid/language_models/.chainlit/translations/en-US.json +0 -231
- langroid/language_models/__init__.py +0 -53
- langroid/language_models/azure_openai.py +0 -153
- langroid/language_models/base.py +0 -678
- langroid/language_models/config.py +0 -18
- langroid/language_models/mock_lm.py +0 -124
- langroid/language_models/openai_gpt.py +0 -1923
- langroid/language_models/prompt_formatter/__init__.py +0 -16
- langroid/language_models/prompt_formatter/base.py +0 -40
- langroid/language_models/prompt_formatter/hf_formatter.py +0 -132
- langroid/language_models/prompt_formatter/llama2_formatter.py +0 -75
- langroid/language_models/utils.py +0 -147
- langroid/mytypes.py +0 -84
- langroid/parsing/__init__.py +0 -52
- langroid/parsing/agent_chats.py +0 -38
- langroid/parsing/code-parsing.md +0 -86
- langroid/parsing/code_parser.py +0 -121
- langroid/parsing/config.py +0 -0
- langroid/parsing/document_parser.py +0 -718
- langroid/parsing/image_text.py +0 -32
- langroid/parsing/para_sentence_split.py +0 -62
- langroid/parsing/parse_json.py +0 -155
- langroid/parsing/parser.py +0 -313
- langroid/parsing/repo_loader.py +0 -790
- langroid/parsing/routing.py +0 -36
- langroid/parsing/search.py +0 -275
- langroid/parsing/spider.py +0 -102
- langroid/parsing/table_loader.py +0 -94
- langroid/parsing/url_loader.py +0 -111
- langroid/parsing/url_loader_cookies.py +0 -73
- langroid/parsing/urls.py +0 -273
- langroid/parsing/utils.py +0 -373
- langroid/parsing/web_search.py +0 -155
- langroid/prompts/__init__.py +0 -9
- langroid/prompts/chat-gpt4-system-prompt.md +0 -68
- langroid/prompts/dialog.py +0 -17
- langroid/prompts/prompts_config.py +0 -5
- langroid/prompts/templates.py +0 -141
- langroid/pydantic_v1/__init__.py +0 -10
- langroid/pydantic_v1/main.py +0 -4
- langroid/utils/.chainlit/config.toml +0 -121
- langroid/utils/.chainlit/translations/en-US.json +0 -231
- langroid/utils/__init__.py +0 -19
- langroid/utils/algorithms/__init__.py +0 -3
- langroid/utils/algorithms/graph.py +0 -103
- langroid/utils/configuration.py +0 -98
- langroid/utils/constants.py +0 -30
- langroid/utils/docker.py +0 -37
- langroid/utils/git_utils.py +0 -252
- langroid/utils/globals.py +0 -49
- langroid/utils/llms/__init__.py +0 -0
- langroid/utils/llms/strings.py +0 -8
- langroid/utils/logging.py +0 -135
- langroid/utils/object_registry.py +0 -66
- langroid/utils/output/__init__.py +0 -20
- langroid/utils/output/citations.py +0 -41
- langroid/utils/output/printing.py +0 -99
- langroid/utils/output/status.py +0 -40
- langroid/utils/pandas_utils.py +0 -30
- langroid/utils/pydantic_utils.py +0 -602
- langroid/utils/system.py +0 -286
- langroid/utils/types.py +0 -93
- langroid/utils/web/__init__.py +0 -0
- langroid/utils/web/login.py +0 -83
- langroid/vector_store/__init__.py +0 -50
- langroid/vector_store/base.py +0 -357
- langroid/vector_store/chromadb.py +0 -214
- langroid/vector_store/lancedb.py +0 -401
- langroid/vector_store/meilisearch.py +0 -299
- langroid/vector_store/momento.py +0 -278
- langroid/vector_store/qdrant_cloud.py +0 -6
- langroid/vector_store/qdrantdb.py +0 -468
- langroid-0.31.1.dist-info/RECORD +0 -162
- {langroid-0.31.1.dist-info → langroid-0.33.3.dist-info/licenses}/LICENSE +0 -0
@@ -1,468 +0,0 @@
|
|
1
|
-
import hashlib
|
2
|
-
import json
|
3
|
-
import logging
|
4
|
-
import os
|
5
|
-
import uuid
|
6
|
-
from typing import Dict, List, Optional, Sequence, Tuple, TypeVar
|
7
|
-
|
8
|
-
from dotenv import load_dotenv
|
9
|
-
from qdrant_client import QdrantClient
|
10
|
-
from qdrant_client.conversions.common_types import ScoredPoint
|
11
|
-
from qdrant_client.http.models import (
|
12
|
-
Batch,
|
13
|
-
CollectionStatus,
|
14
|
-
Distance,
|
15
|
-
Filter,
|
16
|
-
NamedSparseVector,
|
17
|
-
NamedVector,
|
18
|
-
SearchRequest,
|
19
|
-
SparseIndexParams,
|
20
|
-
SparseVector,
|
21
|
-
SparseVectorParams,
|
22
|
-
VectorParams,
|
23
|
-
)
|
24
|
-
|
25
|
-
from langroid.embedding_models.base import (
|
26
|
-
EmbeddingModelsConfig,
|
27
|
-
)
|
28
|
-
from langroid.embedding_models.models import OpenAIEmbeddingsConfig
|
29
|
-
from langroid.mytypes import Document, EmbeddingFunction, Embeddings
|
30
|
-
from langroid.utils.configuration import settings
|
31
|
-
from langroid.vector_store.base import VectorStore, VectorStoreConfig
|
32
|
-
|
33
|
-
logger = logging.getLogger(__name__)
|
34
|
-
|
35
|
-
|
36
|
-
T = TypeVar("T")
|
37
|
-
|
38
|
-
|
39
|
-
def from_optional(x: Optional[T], default: T) -> T:
|
40
|
-
if x is None:
|
41
|
-
return default
|
42
|
-
|
43
|
-
return x
|
44
|
-
|
45
|
-
|
46
|
-
def is_valid_uuid(uuid_to_test: str) -> bool:
|
47
|
-
"""
|
48
|
-
Check if a given string is a valid UUID.
|
49
|
-
"""
|
50
|
-
try:
|
51
|
-
uuid_obj = uuid.UUID(uuid_to_test)
|
52
|
-
return str(uuid_obj) == uuid_to_test
|
53
|
-
except Exception:
|
54
|
-
pass
|
55
|
-
# Check for valid unsigned 64-bit integer
|
56
|
-
try:
|
57
|
-
int_value = int(uuid_to_test)
|
58
|
-
return 0 <= int_value <= 18446744073709551615
|
59
|
-
except ValueError:
|
60
|
-
return False
|
61
|
-
|
62
|
-
|
63
|
-
class QdrantDBConfig(VectorStoreConfig):
|
64
|
-
cloud: bool = True
|
65
|
-
docker: bool = False
|
66
|
-
collection_name: str | None = "temp"
|
67
|
-
storage_path: str = ".qdrant/data"
|
68
|
-
embedding: EmbeddingModelsConfig = OpenAIEmbeddingsConfig()
|
69
|
-
distance: str = Distance.COSINE
|
70
|
-
use_sparse_embeddings: bool = False
|
71
|
-
sparse_embedding_model: str = "naver/splade-v3-distilbert"
|
72
|
-
sparse_limit: int = 3
|
73
|
-
|
74
|
-
|
75
|
-
class QdrantDB(VectorStore):
|
76
|
-
def __init__(self, config: QdrantDBConfig = QdrantDBConfig()):
|
77
|
-
super().__init__(config)
|
78
|
-
self.config: QdrantDBConfig = config
|
79
|
-
self.embedding_fn: EmbeddingFunction = self.embedding_model.embedding_fn()
|
80
|
-
self.embedding_dim = self.embedding_model.embedding_dims
|
81
|
-
if self.config.use_sparse_embeddings:
|
82
|
-
try:
|
83
|
-
from transformers import AutoModelForMaskedLM, AutoTokenizer
|
84
|
-
except ImportError:
|
85
|
-
raise ImportError(
|
86
|
-
"""
|
87
|
-
To use sparse embeddings,
|
88
|
-
you must install langroid with the [transformers] extra, e.g.:
|
89
|
-
pip install "langroid[transformers]"
|
90
|
-
"""
|
91
|
-
)
|
92
|
-
|
93
|
-
self.sparse_tokenizer = AutoTokenizer.from_pretrained(
|
94
|
-
self.config.sparse_embedding_model
|
95
|
-
)
|
96
|
-
self.sparse_model = AutoModelForMaskedLM.from_pretrained(
|
97
|
-
self.config.sparse_embedding_model
|
98
|
-
)
|
99
|
-
self.host = config.host
|
100
|
-
self.port = config.port
|
101
|
-
load_dotenv()
|
102
|
-
key = os.getenv("QDRANT_API_KEY")
|
103
|
-
url = os.getenv("QDRANT_API_URL")
|
104
|
-
if config.docker:
|
105
|
-
if url is None:
|
106
|
-
logger.warning(
|
107
|
-
f"""The QDRANT_API_URL env variable must be set to use
|
108
|
-
QdrantDB in local docker mode. Please set this
|
109
|
-
value in your .env file.
|
110
|
-
Switching to local storage at {config.storage_path}
|
111
|
-
"""
|
112
|
-
)
|
113
|
-
config.cloud = False
|
114
|
-
else:
|
115
|
-
config.cloud = True
|
116
|
-
elif config.cloud and None in [key, url]:
|
117
|
-
logger.warning(
|
118
|
-
f"""QDRANT_API_KEY, QDRANT_API_URL env variable must be set to use
|
119
|
-
QdrantDB in cloud mode. Please set these values
|
120
|
-
in your .env file.
|
121
|
-
Switching to local storage at {config.storage_path}
|
122
|
-
"""
|
123
|
-
)
|
124
|
-
config.cloud = False
|
125
|
-
|
126
|
-
if config.cloud:
|
127
|
-
self.client = QdrantClient(
|
128
|
-
url=url,
|
129
|
-
api_key=key,
|
130
|
-
timeout=config.timeout,
|
131
|
-
)
|
132
|
-
else:
|
133
|
-
try:
|
134
|
-
self.client = QdrantClient(
|
135
|
-
path=config.storage_path,
|
136
|
-
)
|
137
|
-
except Exception as e:
|
138
|
-
new_storage_path = config.storage_path + ".new"
|
139
|
-
logger.warning(
|
140
|
-
f"""
|
141
|
-
Error connecting to local QdrantDB at {config.storage_path}:
|
142
|
-
{e}
|
143
|
-
Switching to {new_storage_path}
|
144
|
-
"""
|
145
|
-
)
|
146
|
-
self.client = QdrantClient(
|
147
|
-
path=new_storage_path,
|
148
|
-
)
|
149
|
-
|
150
|
-
# Note: Only create collection if a non-null collection name is provided.
|
151
|
-
# This is useful to delay creation of vecdb until we have a suitable
|
152
|
-
# collection name (e.g. we could get it from the url or folder path).
|
153
|
-
if config.collection_name is not None:
|
154
|
-
self.create_collection(
|
155
|
-
config.collection_name, replace=config.replace_collection
|
156
|
-
)
|
157
|
-
|
158
|
-
def clear_empty_collections(self) -> int:
|
159
|
-
coll_names = self.list_collections()
|
160
|
-
n_deletes = 0
|
161
|
-
for name in coll_names:
|
162
|
-
info = self.client.get_collection(collection_name=name)
|
163
|
-
if info.points_count == 0:
|
164
|
-
n_deletes += 1
|
165
|
-
self.client.delete_collection(collection_name=name)
|
166
|
-
return n_deletes
|
167
|
-
|
168
|
-
def clear_all_collections(self, really: bool = False, prefix: str = "") -> int:
|
169
|
-
"""Clear all collections with the given prefix."""
|
170
|
-
if not really:
|
171
|
-
logger.warning("Not deleting all collections, set really=True to confirm")
|
172
|
-
return 0
|
173
|
-
coll_names = [
|
174
|
-
c for c in self.list_collections(empty=True) if c.startswith(prefix)
|
175
|
-
]
|
176
|
-
if len(coll_names) == 0:
|
177
|
-
logger.warning(f"No collections found with prefix {prefix}")
|
178
|
-
return 0
|
179
|
-
n_empty_deletes = 0
|
180
|
-
n_non_empty_deletes = 0
|
181
|
-
for name in coll_names:
|
182
|
-
info = self.client.get_collection(collection_name=name)
|
183
|
-
points_count = from_optional(info.points_count, 0)
|
184
|
-
|
185
|
-
n_empty_deletes += points_count == 0
|
186
|
-
n_non_empty_deletes += points_count > 0
|
187
|
-
self.client.delete_collection(collection_name=name)
|
188
|
-
logger.warning(
|
189
|
-
f"""
|
190
|
-
Deleted {n_empty_deletes} empty collections and
|
191
|
-
{n_non_empty_deletes} non-empty collections.
|
192
|
-
"""
|
193
|
-
)
|
194
|
-
return n_empty_deletes + n_non_empty_deletes
|
195
|
-
|
196
|
-
def list_collections(self, empty: bool = False) -> List[str]:
|
197
|
-
"""
|
198
|
-
Returns:
|
199
|
-
List of collection names that have at least one vector.
|
200
|
-
|
201
|
-
Args:
|
202
|
-
empty (bool, optional): Whether to include empty collections.
|
203
|
-
"""
|
204
|
-
colls = list(self.client.get_collections())[0][1]
|
205
|
-
if empty:
|
206
|
-
return [coll.name for coll in colls]
|
207
|
-
counts = []
|
208
|
-
for coll in colls:
|
209
|
-
try:
|
210
|
-
counts.append(
|
211
|
-
from_optional(
|
212
|
-
self.client.get_collection(
|
213
|
-
collection_name=coll.name
|
214
|
-
).points_count,
|
215
|
-
0,
|
216
|
-
)
|
217
|
-
)
|
218
|
-
except Exception:
|
219
|
-
logger.warning(f"Error getting collection {coll.name}")
|
220
|
-
counts.append(0)
|
221
|
-
return [coll.name for coll, count in zip(colls, counts) if (count or 0) > 0]
|
222
|
-
|
223
|
-
def create_collection(self, collection_name: str, replace: bool = False) -> None:
|
224
|
-
"""
|
225
|
-
Create a collection with the given name, optionally replacing an existing
|
226
|
-
collection if `replace` is True.
|
227
|
-
Args:
|
228
|
-
collection_name (str): Name of the collection to create.
|
229
|
-
replace (bool): Whether to replace an existing collection
|
230
|
-
with the same name. Defaults to False.
|
231
|
-
"""
|
232
|
-
self.config.collection_name = collection_name
|
233
|
-
if self.client.collection_exists(collection_name=collection_name):
|
234
|
-
coll = self.client.get_collection(collection_name=collection_name)
|
235
|
-
if (
|
236
|
-
coll.status == CollectionStatus.GREEN
|
237
|
-
and from_optional(coll.points_count, 0) > 0
|
238
|
-
):
|
239
|
-
logger.warning(f"Non-empty Collection {collection_name} already exists")
|
240
|
-
if not replace:
|
241
|
-
logger.warning("Not replacing collection")
|
242
|
-
return
|
243
|
-
else:
|
244
|
-
logger.warning("Recreating fresh collection")
|
245
|
-
self.client.delete_collection(collection_name=collection_name)
|
246
|
-
|
247
|
-
vectors_config = {
|
248
|
-
"": VectorParams(
|
249
|
-
size=self.embedding_dim,
|
250
|
-
distance=Distance.COSINE,
|
251
|
-
)
|
252
|
-
}
|
253
|
-
sparse_vectors_config = None
|
254
|
-
if self.config.use_sparse_embeddings:
|
255
|
-
sparse_vectors_config = {
|
256
|
-
"text-sparse": SparseVectorParams(index=SparseIndexParams())
|
257
|
-
}
|
258
|
-
self.client.create_collection(
|
259
|
-
collection_name=collection_name,
|
260
|
-
vectors_config=vectors_config,
|
261
|
-
sparse_vectors_config=sparse_vectors_config,
|
262
|
-
)
|
263
|
-
collection_info = self.client.get_collection(collection_name=collection_name)
|
264
|
-
assert collection_info.status == CollectionStatus.GREEN
|
265
|
-
assert collection_info.vectors_count in [0, None]
|
266
|
-
if settings.debug:
|
267
|
-
level = logger.getEffectiveLevel()
|
268
|
-
logger.setLevel(logging.INFO)
|
269
|
-
logger.info(collection_info)
|
270
|
-
logger.setLevel(level)
|
271
|
-
|
272
|
-
def get_sparse_embeddings(self, inputs: List[str]) -> List[SparseVector]:
|
273
|
-
if not self.config.use_sparse_embeddings:
|
274
|
-
return []
|
275
|
-
import torch
|
276
|
-
|
277
|
-
tokens = self.sparse_tokenizer(
|
278
|
-
inputs, return_tensors="pt", truncation=True, padding=True
|
279
|
-
)
|
280
|
-
output = self.sparse_model(**tokens)
|
281
|
-
vectors = torch.max(
|
282
|
-
torch.log(torch.relu(output.logits) + torch.tensor(1.0))
|
283
|
-
* tokens.attention_mask.unsqueeze(-1),
|
284
|
-
dim=1,
|
285
|
-
)[0].squeeze(dim=1)
|
286
|
-
sparse_embeddings = []
|
287
|
-
for vec in vectors:
|
288
|
-
cols = vec.nonzero().squeeze().cpu().tolist()
|
289
|
-
weights = vec[cols].cpu().tolist()
|
290
|
-
sparse_embeddings.append(
|
291
|
-
SparseVector(
|
292
|
-
indices=cols,
|
293
|
-
values=weights,
|
294
|
-
)
|
295
|
-
)
|
296
|
-
return sparse_embeddings
|
297
|
-
|
298
|
-
def add_documents(self, documents: Sequence[Document]) -> None:
|
299
|
-
# Add id to metadata if not already present
|
300
|
-
super().maybe_add_ids(documents)
|
301
|
-
# Fix the ids due to qdrant finickiness
|
302
|
-
for doc in documents:
|
303
|
-
doc.metadata.id = str(self._to_int_or_uuid(doc.metadata.id))
|
304
|
-
colls = self.list_collections(empty=True)
|
305
|
-
if len(documents) == 0:
|
306
|
-
return
|
307
|
-
document_dicts = [doc.dict() for doc in documents]
|
308
|
-
embedding_vecs = self.embedding_fn([doc.content for doc in documents])
|
309
|
-
sparse_embedding_vecs = self.get_sparse_embeddings(
|
310
|
-
[doc.content for doc in documents]
|
311
|
-
)
|
312
|
-
if self.config.collection_name is None:
|
313
|
-
raise ValueError("No collection name set, cannot ingest docs")
|
314
|
-
if self.config.collection_name not in colls:
|
315
|
-
self.create_collection(self.config.collection_name, replace=True)
|
316
|
-
ids = [self._to_int_or_uuid(d.id()) for d in documents]
|
317
|
-
# don't insert all at once, batch in chunks of b,
|
318
|
-
# else we get an API error
|
319
|
-
b = self.config.batch_size
|
320
|
-
for i in range(0, len(ids), b):
|
321
|
-
vectors: Dict[str, Embeddings | List[SparseVector]] = {
|
322
|
-
"": embedding_vecs[i : i + b]
|
323
|
-
}
|
324
|
-
if self.config.use_sparse_embeddings:
|
325
|
-
vectors["text-sparse"] = sparse_embedding_vecs[i : i + b]
|
326
|
-
self.client.upsert(
|
327
|
-
collection_name=self.config.collection_name,
|
328
|
-
points=Batch(
|
329
|
-
ids=ids[i : i + b],
|
330
|
-
vectors=vectors,
|
331
|
-
payloads=document_dicts[i : i + b],
|
332
|
-
),
|
333
|
-
)
|
334
|
-
|
335
|
-
def delete_collection(self, collection_name: str) -> None:
|
336
|
-
self.client.delete_collection(collection_name=collection_name)
|
337
|
-
|
338
|
-
def _to_int_or_uuid(self, id: str) -> int | str:
|
339
|
-
try:
|
340
|
-
int_val = int(id)
|
341
|
-
if is_valid_uuid(id):
|
342
|
-
return int_val
|
343
|
-
except ValueError:
|
344
|
-
pass
|
345
|
-
|
346
|
-
# If doc_id is already a valid UUID, return it as is
|
347
|
-
if isinstance(id, str) and is_valid_uuid(id):
|
348
|
-
return id
|
349
|
-
|
350
|
-
# Otherwise, generate a UUID from the doc_id
|
351
|
-
# Convert doc_id to string if it's not already
|
352
|
-
id_str = str(id)
|
353
|
-
|
354
|
-
# Hash the document ID using SHA-1
|
355
|
-
hash_object = hashlib.sha1(id_str.encode())
|
356
|
-
hash_digest = hash_object.hexdigest()
|
357
|
-
|
358
|
-
# Truncate or manipulate the hash to fit into a UUID (128 bits)
|
359
|
-
uuid_str = hash_digest[:32]
|
360
|
-
|
361
|
-
# Format this string into a UUID format
|
362
|
-
formatted_uuid = uuid.UUID(uuid_str)
|
363
|
-
|
364
|
-
return str(formatted_uuid)
|
365
|
-
|
366
|
-
def get_all_documents(self, where: str = "") -> List[Document]:
|
367
|
-
if self.config.collection_name is None:
|
368
|
-
raise ValueError("No collection name set, cannot retrieve docs")
|
369
|
-
docs = []
|
370
|
-
offset = 0
|
371
|
-
filter = Filter() if where == "" else Filter.parse_obj(json.loads(where))
|
372
|
-
while True:
|
373
|
-
results, next_page_offset = self.client.scroll(
|
374
|
-
collection_name=self.config.collection_name,
|
375
|
-
scroll_filter=filter,
|
376
|
-
offset=offset,
|
377
|
-
limit=10_000, # try getting all at once, if not we keep paging
|
378
|
-
with_payload=True,
|
379
|
-
with_vectors=False,
|
380
|
-
)
|
381
|
-
docs += [
|
382
|
-
self.config.document_class(**record.payload) # type: ignore
|
383
|
-
for record in results
|
384
|
-
]
|
385
|
-
# ignore
|
386
|
-
if next_page_offset is None:
|
387
|
-
break
|
388
|
-
offset = next_page_offset # type: ignore
|
389
|
-
return docs
|
390
|
-
|
391
|
-
def get_documents_by_ids(self, ids: List[str]) -> List[Document]:
|
392
|
-
if self.config.collection_name is None:
|
393
|
-
raise ValueError("No collection name set, cannot retrieve docs")
|
394
|
-
_ids = [self._to_int_or_uuid(id) for id in ids]
|
395
|
-
records = self.client.retrieve(
|
396
|
-
collection_name=self.config.collection_name,
|
397
|
-
ids=_ids,
|
398
|
-
with_vectors=False,
|
399
|
-
with_payload=True,
|
400
|
-
)
|
401
|
-
# Note the records may NOT be in the order of the ids,
|
402
|
-
# so we re-order them here.
|
403
|
-
id2payload = {record.id: record.payload for record in records}
|
404
|
-
ordered_payloads = [id2payload[id] for id in _ids if id in id2payload]
|
405
|
-
docs = [Document(**payload) for payload in ordered_payloads] # type: ignore
|
406
|
-
return docs
|
407
|
-
|
408
|
-
def similar_texts_with_scores(
|
409
|
-
self,
|
410
|
-
text: str,
|
411
|
-
k: int = 1,
|
412
|
-
where: Optional[str] = None,
|
413
|
-
neighbors: int = 0,
|
414
|
-
) -> List[Tuple[Document, float]]:
|
415
|
-
embedding = self.embedding_fn([text])[0]
|
416
|
-
# TODO filter may not work yet
|
417
|
-
if where is None or where == "":
|
418
|
-
filter = Filter()
|
419
|
-
else:
|
420
|
-
filter = Filter.parse_obj(json.loads(where))
|
421
|
-
requests = [
|
422
|
-
SearchRequest(
|
423
|
-
vector=NamedVector(
|
424
|
-
name="",
|
425
|
-
vector=embedding,
|
426
|
-
),
|
427
|
-
limit=k,
|
428
|
-
with_payload=True,
|
429
|
-
filter=filter,
|
430
|
-
)
|
431
|
-
]
|
432
|
-
if self.config.use_sparse_embeddings:
|
433
|
-
sparse_embedding = self.get_sparse_embeddings([text])[0]
|
434
|
-
requests.append(
|
435
|
-
SearchRequest(
|
436
|
-
vector=NamedSparseVector(
|
437
|
-
name="text-sparse",
|
438
|
-
vector=sparse_embedding,
|
439
|
-
),
|
440
|
-
limit=self.config.sparse_limit,
|
441
|
-
with_payload=True,
|
442
|
-
filter=filter,
|
443
|
-
)
|
444
|
-
)
|
445
|
-
if self.config.collection_name is None:
|
446
|
-
raise ValueError("No collection name set, cannot search")
|
447
|
-
search_result_lists: List[List[ScoredPoint]] = self.client.search_batch(
|
448
|
-
collection_name=self.config.collection_name, requests=requests
|
449
|
-
)
|
450
|
-
|
451
|
-
search_result = [
|
452
|
-
match for result in search_result_lists for match in result
|
453
|
-
] # 2D list -> 1D list
|
454
|
-
scores = [match.score for match in search_result if match is not None]
|
455
|
-
docs = [
|
456
|
-
self.config.document_class(**(match.payload)) # type: ignore
|
457
|
-
for match in search_result
|
458
|
-
if match is not None
|
459
|
-
]
|
460
|
-
if len(docs) == 0:
|
461
|
-
logger.warning(f"No matches found for {text}")
|
462
|
-
return []
|
463
|
-
doc_score_pairs = list(zip(docs, scores))
|
464
|
-
max_score = max(ds[1] for ds in doc_score_pairs)
|
465
|
-
if settings.debug:
|
466
|
-
logger.info(f"Found {len(doc_score_pairs)} matches, max score: {max_score}")
|
467
|
-
self.show_if_debug(doc_score_pairs)
|
468
|
-
return doc_score_pairs
|
langroid-0.31.1.dist-info/RECORD
DELETED
@@ -1,162 +0,0 @@
|
|
1
|
-
langroid/__init__.py,sha256=z_fCOLQJPOw3LLRPBlFB5-2HyCjpPgQa4m4iY5Fvb8Y,1800
|
2
|
-
langroid/agent/.chainlit/config.toml,sha256=qEuh_rR6s0khb20KUADOv2g5OvDnu52mY3gcFFgEosE,3753
|
3
|
-
langroid/agent/.chainlit/translations/bn.json,sha256=m2TAaGMS-18_siW5dw4sbosh0Wn8ENWWzdGYkHaBrXw,22679
|
4
|
-
langroid/agent/.chainlit/translations/en-US.json,sha256=QoQAg8P5Q5gbGASc-HAHcfhufk71-Uc1u_ewIBfHuLc,9821
|
5
|
-
langroid/agent/.chainlit/translations/gu.json,sha256=9wE-NsHf7j5VUFzfE-cCpESTyHtzVHRcZXAwC3ACMl0,21660
|
6
|
-
langroid/agent/.chainlit/translations/he-IL.json,sha256=uVS4q9wlxDWqCNXde_f34p4tXcyA89YBsVNRDiOkhaE,16974
|
7
|
-
langroid/agent/.chainlit/translations/hi.json,sha256=3zi4wbpTCv5Q1bOzakeVQqeRpaO5ZkPJJ6oV-dVtNF4,21079
|
8
|
-
langroid/agent/.chainlit/translations/kn.json,sha256=GRGmx2hPh8bSfpKJQHwwtV_UF45kaMc8S-rUJeh_ZA4,23514
|
9
|
-
langroid/agent/.chainlit/translations/ml.json,sha256=QK1mYIbx_0gmmR4Poy2mm3uttAgW2ZpMfo6jgDec6uc,24857
|
10
|
-
langroid/agent/.chainlit/translations/mr.json,sha256=JaU16y5uW-cH0x7w6RDztEmhqEtnerJ61h8azkNLqyg,21321
|
11
|
-
langroid/agent/.chainlit/translations/ta.json,sha256=8JPW6BwLN2dl9wuq5wSkMvazcY8lM5v1pqbBxwObGUw,24724
|
12
|
-
langroid/agent/.chainlit/translations/te.json,sha256=JzW2YXWg1qqvWgIvEgMelQz5s6EzTb_uD_3TEHAHiQw,23526
|
13
|
-
langroid/agent/.chainlit/translations/zh-CN.json,sha256=aLBSSSQ0yojlYGuMMlOYvkD_ruG9-d2AgnjJWhPODVw,11737
|
14
|
-
langroid/agent/__init__.py,sha256=ll0Cubd2DZ-fsCMl7e10hf9ZjFGKzphfBco396IKITY,786
|
15
|
-
langroid/agent/base.py,sha256=ZgWsRBC9rugcWp9aZLAmFFteU47pqKIEoTy_dgkYtBI,77529
|
16
|
-
langroid/agent/batch.py,sha256=qK3ph6VNj_1sOhfXCZY4r6gh035DglDKU751p8BU0tY,14665
|
17
|
-
langroid/agent/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
langroid/agent/callbacks/chainlit.py,sha256=C6zzzYC30qC4eMA7al7eFpRoTgoe3475kaMKyXgQM0Q,20695
|
19
|
-
langroid/agent/chat_agent.py,sha256=Idts_HDO1tW052POVOQ9FvuU37TTB7c1I96YVbnBumo,80030
|
20
|
-
langroid/agent/chat_document.py,sha256=xPUMGzR83rn4iAEXIw2jy5LQ6YJ6Y0TiZ78XRQeDnJQ,17778
|
21
|
-
langroid/agent/helpers.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
-
langroid/agent/junk,sha256=LxfuuW7Cijsg0szAzT81OjWWv1PMNI-6w_-DspVIO2s,339
|
23
|
-
langroid/agent/openai_assistant.py,sha256=JkAcs02bIrgPNVvUWVR06VCthc5-ulla2QMBzux_q6o,34340
|
24
|
-
langroid/agent/special/__init__.py,sha256=gik_Xtm_zV7U9s30Mn8UX3Gyuy4jTjQe9zjiE3HWmEo,1273
|
25
|
-
langroid/agent/special/arangodb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
|
-
langroid/agent/special/arangodb/arangodb_agent.py,sha256=12Y54c84c9qXV-YXRBcI5HaqyiY75JR4TmqlURYKJAM,25851
|
27
|
-
langroid/agent/special/arangodb/system_messages.py,sha256=udwfLleTdyz_DuxHuoiv2wHEZoAPBPbwdF_ivjIfP5c,6867
|
28
|
-
langroid/agent/special/arangodb/tools.py,sha256=Mixl9WS0r0Crd4nrw2YAB0eY33fTsKISul1053eyeio,3590
|
29
|
-
langroid/agent/special/arangodb/utils.py,sha256=LIevtkayIdVVXyj3jlbKH2WgdZTtH5-JLgbXOHC7uxs,1420
|
30
|
-
langroid/agent/special/doc_chat_agent.py,sha256=zw2MvdCWRPH93d73PKh27KFiQ8sUCFPxAfLDdkxvdZQ,59301
|
31
|
-
langroid/agent/special/lance_doc_chat_agent.py,sha256=s8xoRs0gGaFtDYFUSIRchsgDVbS5Q3C2b2mr3V1Fd-Q,10419
|
32
|
-
langroid/agent/special/lance_rag/__init__.py,sha256=QTbs0IVE2ZgDg8JJy1zN97rUUg4uEPH7SLGctFNumk4,174
|
33
|
-
langroid/agent/special/lance_rag/critic_agent.py,sha256=OtFuHthKQLkdVkvuZ2m0GNq1qOYLqHkm1pfLRFnSg5c,9548
|
34
|
-
langroid/agent/special/lance_rag/lance_rag_task.py,sha256=qDouwz-Yi8aSIAVb2Jx6buTKwO2L7PSvUY604Eu0uIM,2957
|
35
|
-
langroid/agent/special/lance_rag/query_planner_agent.py,sha256=5YPeliCjlRk1LEDe5eFyqfkq9RjDfa4usjBsNmT9GsQ,11509
|
36
|
-
langroid/agent/special/lance_tools.py,sha256=qS8x4wi8mrqfbYV2ztFzrcxyhHQ0ZWOc-zkYiH7awj0,2105
|
37
|
-
langroid/agent/special/neo4j/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
|
-
langroid/agent/special/neo4j/csv_kg_chat.py,sha256=dRsAgMBa1H_EMI2YYgJR2Xyv1D7e4o3G9M64mTewq_c,6409
|
39
|
-
langroid/agent/special/neo4j/neo4j_chat_agent.py,sha256=1RMKupJra0KZ-hA7AiiR662STJyYDZi8ZnAnnXF8oCA,16726
|
40
|
-
langroid/agent/special/neo4j/system_messages.py,sha256=m2jsVayey6E_88F5B_gW2WbWKBJvIeDUoVCRBbNs97o,4522
|
41
|
-
langroid/agent/special/neo4j/tools.py,sha256=Vw3HvtDfG2c4_bUHgt4_ZbJq48lpIQstbjjwhh1BjrQ,905
|
42
|
-
langroid/agent/special/relevance_extractor_agent.py,sha256=zIx8GUdVo1aGW6ASla0NPQjYYIpmriK_TYMijqAx3F8,4796
|
43
|
-
langroid/agent/special/retriever_agent.py,sha256=lvMvf-u9rSosg4YASuFdUbGLgkzLPknXAbJZfZ1LZCc,1868
|
44
|
-
langroid/agent/special/sql/__init__.py,sha256=mWfmm1QpXCezpFOS2eI57M0L_Ok3q5_ukG8tXBnBrEA,319
|
45
|
-
langroid/agent/special/sql/sql_chat_agent.py,sha256=IsVyFLpMinXsPd_HzUIyPC2wIdVc8SLuqNX04X0jyfs,24618
|
46
|
-
langroid/agent/special/sql/utils/__init__.py,sha256=JFif6CRTrN-bc91uuAI4K9fe2ndIWSNMVxJ0WA68--M,446
|
47
|
-
langroid/agent/special/sql/utils/description_extractors.py,sha256=cX8TIpmTPXZXQTMpIi3OUFwFsPywxFFdurpx717Kq0I,6529
|
48
|
-
langroid/agent/special/sql/utils/populate_metadata.py,sha256=1J22UsyEPKzwK0XlJZtYn9r6kYc0FXIr8-lZrndYlhc,3131
|
49
|
-
langroid/agent/special/sql/utils/system_message.py,sha256=qKLHkvQWRQodTtPLPxr1GSLUYUFASZU8x-ybV67cB68,1885
|
50
|
-
langroid/agent/special/sql/utils/tools.py,sha256=ovCePzq5cmbqw0vsVPBzxdZpUcSUIfTiDSMGXustZW8,1749
|
51
|
-
langroid/agent/special/table_chat_agent.py,sha256=d9v2wsblaRx7oMnKhLV7uO_ujvk9gh59pSGvBXyeyNc,9659
|
52
|
-
langroid/agent/structured_message.py,sha256=y7pud1EgRNeTFZlJmBkLmwME3yQJ_IYik-Xds9kdZbY,282
|
53
|
-
langroid/agent/task.py,sha256=_iQTpjPIR1OGF0lq-ZFzQ92f_OmdIFmv7LlhoUA1QB8,89729
|
54
|
-
langroid/agent/tool_message.py,sha256=HDW_FVQXvZAHI61CtOYNuZet0qlK_WwOnjSYd1g81eo,14742
|
55
|
-
langroid/agent/tools/__init__.py,sha256=IMgCte-_ZIvCkozGQmvMqxIw7_nKLKzD78ccJL1bnQU,804
|
56
|
-
langroid/agent/tools/duckduckgo_search_tool.py,sha256=NhsCaGZkdv28nja7yveAhSK_w6l_Ftym8agbrdzqgfo,1935
|
57
|
-
langroid/agent/tools/file_tools.py,sha256=GjPB5YDILucYapElnvvoYpGJuZQ25ecLs2REv7edPEo,7292
|
58
|
-
langroid/agent/tools/google_search_tool.py,sha256=y7b-3FtgXf0lfF4AYxrZ3K5pH2dhidvibUOAGBE--WI,1456
|
59
|
-
langroid/agent/tools/metaphor_search_tool.py,sha256=qj4gt453cLEX3EGW7nVzVu6X7LCdrwjSlcNY0qJW104,2489
|
60
|
-
langroid/agent/tools/orchestration.py,sha256=851nZQOE1HpGBwH5om_TNP_qCMxxatXYWFZUrpjSfKk,11421
|
61
|
-
langroid/agent/tools/recipient_tool.py,sha256=dr0yTxgNEIoxUYxH6TtaExC4G_8WdJ0xGohIa4dFLhY,9808
|
62
|
-
langroid/agent/tools/retrieval_tool.py,sha256=zcAV20PP_6VzSd-UE-IJcabaBseFL_QNz59Bnig8-lE,946
|
63
|
-
langroid/agent/tools/rewind_tool.py,sha256=XAXL3BpNhCmBGYq_qi_sZfHJuIw7NY2jp4wnojJ7WRs,5606
|
64
|
-
langroid/agent/tools/segment_extract_tool.py,sha256=__srZ_VGYLVOdPrITUM8S0HpmX4q7r5FHWMDdHdEv8w,1440
|
65
|
-
langroid/agent/typed_task.py,sha256=oxja0Z3uLTv0BcR1xIMqDpo85MIGOruz4XsZ4ghjsW4,689
|
66
|
-
langroid/agent/xml_tool_message.py,sha256=6SshYZJKIfi4mkE-gIoSwjkEYekQ8GwcSiCv7a5uO9E,15054
|
67
|
-
langroid/agent_config.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
|
-
langroid/cachedb/__init__.py,sha256=icAT2s7Vhf-ZGUeqpDQGNU6ob6o0aFEyjwcxxUGRFjg,225
|
69
|
-
langroid/cachedb/base.py,sha256=ztVjB1DtN6pLCujCWnR6xruHxwVj3XkYniRTYAKKqk0,1354
|
70
|
-
langroid/cachedb/momento_cachedb.py,sha256=YEOJ62hEcV6iIeMr5aGgRYgWQqFYaej9gEDEcY0sm7M,3172
|
71
|
-
langroid/cachedb/redis_cachedb.py,sha256=7kgnbf4b5CKsCrlL97mHWKvdvlLt8zgn7lc528jEpiE,5141
|
72
|
-
langroid/embedding_models/__init__.py,sha256=XhVIMQJbQRpImcnhA9sJR7h6r7QgPo1SKDCvwEUD9j4,851
|
73
|
-
langroid/embedding_models/base.py,sha256=DUhvzALoW2UMbtmLxP4eJTfPii99WjUNX7bwFpj_K-0,2395
|
74
|
-
langroid/embedding_models/clustering.py,sha256=tZWElUqXl9Etqla0FAa7og96iDKgjqWjucZR_Egtp-A,6684
|
75
|
-
langroid/embedding_models/models.py,sha256=sW6baTvFSeZBZ5w-Kd9Vgo93gokesJ3aHP4x9htoF2E,16776
|
76
|
-
langroid/embedding_models/protoc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
77
|
-
langroid/embedding_models/protoc/embeddings.proto,sha256=_O-SgFpTaylQeOTgSpxhEJ7CUw7PeCQQJLaPqpPYKJg,321
|
78
|
-
langroid/embedding_models/protoc/embeddings_pb2.py,sha256=4Q57PhOunv-uZNJrxYrWBXAI0ZtfnVZXFRhRj5JuRSg,1662
|
79
|
-
langroid/embedding_models/protoc/embeddings_pb2.pyi,sha256=UkNy7BrNsmQm0vLb3NtGXy8jVtz-kPWwwFsX-QbQBhQ,1475
|
80
|
-
langroid/embedding_models/protoc/embeddings_pb2_grpc.py,sha256=9dYQqkW3JPyBpSEjeGXTNpSqAkC-6FPtBHyteVob2Y8,2452
|
81
|
-
langroid/embedding_models/remote_embeds.py,sha256=6_kjXByVbqhY9cGwl9R83ZcYC2km-nGieNNAo1McHaY,5151
|
82
|
-
langroid/exceptions.py,sha256=G60UVDChkUlBDVWHFr_43zUUszZHSejoU00tX_dfD68,2322
|
83
|
-
langroid/experimental/team-save.py,sha256=OHfACxuVMFNiU0Kx0uCClimJCyusZineMDJ0Ehh2jWM,12369
|
84
|
-
langroid/language_models/.chainlit/config.toml,sha256=1t5lHORGzc2E6dkaO9P15jYHu2w-4Kl9pYjpDPc84vs,3716
|
85
|
-
langroid/language_models/.chainlit/translations/en-US.json,sha256=DAFz2HjOFFfboCStrUfKFg2BpplJPK_OOtixwF_GivY,9931
|
86
|
-
langroid/language_models/__init__.py,sha256=8o8D8Lxaq961_oxVpB_bC2iEJ1GXJqYXMlwUcn6OJb8,976
|
87
|
-
langroid/language_models/azure_openai.py,sha256=zNQzzsERxNestq-hFfQZbvTzK43G2vjRWnTV3ktm1DQ,5845
|
88
|
-
langroid/language_models/base.py,sha256=6hXR-bclyPif-BvFbyXevP-gEwiawQAJHX3N1AKNei0,23786
|
89
|
-
langroid/language_models/config.py,sha256=9Q8wk5a7RQr8LGMT_0WkpjY8S4ywK06SalVRjXlfCiI,378
|
90
|
-
langroid/language_models/mock_lm.py,sha256=5BgHKDVRWFbUwDT_PFgTZXz9-k8wJSA2e3PZmyDgQ1k,4022
|
91
|
-
langroid/language_models/openai_gpt.py,sha256=gkF3sQsBrS8_x4x0l6GLdF_5MlNRdsY5hAmRPSsKAKE,75320
|
92
|
-
langroid/language_models/prompt_formatter/__init__.py,sha256=2-5cdE24XoFDhifOLl8yiscohil1ogbP1ECkYdBlBsk,372
|
93
|
-
langroid/language_models/prompt_formatter/base.py,sha256=eDS1sgRNZVnoajwV_ZIha6cba5Dt8xjgzdRbPITwx3Q,1221
|
94
|
-
langroid/language_models/prompt_formatter/hf_formatter.py,sha256=PVJppmjRvD-2DF-XNC6mE05vTZ9wbu37SmXwZBQhad0,5055
|
95
|
-
langroid/language_models/prompt_formatter/llama2_formatter.py,sha256=YdcO88qyBeuMENVIVvVqSYuEpvYSTndUe_jd6hVTko4,2899
|
96
|
-
langroid/language_models/utils.py,sha256=o6Zo2cnnvKrfSgF26knVQ1xkSxEoE7yN85296gNdVOw,4858
|
97
|
-
langroid/mytypes.py,sha256=ptAFxEAtiwmIfUnGisNotTe8wT9LKBf22lOfPgZoQIY,2368
|
98
|
-
langroid/parsing/__init__.py,sha256=ZgSAfgTC6VsTLFlRSWT-TwYco7SQeRMeZG-49MnKYGY,936
|
99
|
-
langroid/parsing/agent_chats.py,sha256=sbZRV9ujdM5QXvvuHVjIi2ysYSYlap-uqfMMUKulrW0,1068
|
100
|
-
langroid/parsing/code-parsing.md,sha256=--cyyNiSZSDlIwcjAV4-shKrSiRe2ytF3AdSoS_hD2g,3294
|
101
|
-
langroid/parsing/code_parser.py,sha256=AOxb3xbYpTBPP3goOm5dKfJdh5hS_2BhLVCEkifWZN8,3796
|
102
|
-
langroid/parsing/config.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
103
|
-
langroid/parsing/document_parser.py,sha256=9xUOyrVNBAS9cpCvCptr2XK4Kq47W574i8zzGEoXc3c,24933
|
104
|
-
langroid/parsing/image_text.py,sha256=sbLIQ5nHe2UnYUksBaQsmZGaX-X0qgEpPd7CEzi_z5M,910
|
105
|
-
langroid/parsing/para_sentence_split.py,sha256=AJBzZojP3zpB-_IMiiHismhqcvkrVBQ3ZINoQyx_bE4,2000
|
106
|
-
langroid/parsing/parse_json.py,sha256=aADo38bAHQhC8on4aWZZzVzSDy-dK35vRLZsFI2ewh8,4756
|
107
|
-
langroid/parsing/parser.py,sha256=bTG5TO2CEwGdLf9979j9_dFntKX5FloGF8vhts6ObU0,11978
|
108
|
-
langroid/parsing/repo_loader.py,sha256=3GjvPJS6Vf5L6gV2zOU8s-Tf1oq_fZm-IB_RL_7CTsY,29373
|
109
|
-
langroid/parsing/routing.py,sha256=-FcnlqldzL4ZoxuDwXjQPNHgBe9F9-F4R6q7b_z9CvI,1232
|
110
|
-
langroid/parsing/search.py,sha256=0i_r0ESb5HEQfagA2g7_uMQyxYPADWVbdcN9ixZhS4E,8992
|
111
|
-
langroid/parsing/spider.py,sha256=Y6y7b86Y2k770LdhxgjVlImBxuuy1V9n8-XQ3QPaG5s,3199
|
112
|
-
langroid/parsing/table_loader.py,sha256=qNM4obT_0Y4tjrxNBCNUYjKQ9oETCZ7FbolKBTcz-GM,3410
|
113
|
-
langroid/parsing/url_loader.py,sha256=Na2TBlKuQkloZzkE2d7xl6mh9olS3CbpgCsJbJ-xhIA,4472
|
114
|
-
langroid/parsing/url_loader_cookies.py,sha256=Lg4sNpRz9MByWq2mde6T0hKv68VZSV3mtMjNEHuFeSU,2327
|
115
|
-
langroid/parsing/urls.py,sha256=XjpaV5onG7gKQ5iQeFTzHSw5P08Aqw0g-rMUu61lR6s,7988
|
116
|
-
langroid/parsing/utils.py,sha256=kb9DlHaG1iQB-6JagH1C26SdCNNf8U-2XaXia4_dWCw,12726
|
117
|
-
langroid/parsing/web_search.py,sha256=wGycU86N3nsZ78E9iS-BIm5NWueDgoknojABE0_1LRA,4886
|
118
|
-
langroid/prompts/__init__.py,sha256=RW11vK6jiLPuaUh4GpeFvstti73gkm8_rDMtrbo2YsU,142
|
119
|
-
langroid/prompts/chat-gpt4-system-prompt.md,sha256=Q3uLCJTPQvmUkZN2XDnkBC7M2K3X0F3C3GIQBaFvYvw,5329
|
120
|
-
langroid/prompts/dialog.py,sha256=SpfiSyofSgy2pwD1YboHR_yHO3LEEMbv6j2sm874jKo,331
|
121
|
-
langroid/prompts/prompts_config.py,sha256=p_lp9nbMuQwhhMwAZsOxveRw9C0ZFZvql7pdIfgVZYo,143
|
122
|
-
langroid/prompts/templates.py,sha256=kz0rPiM6iLGhhpDonF3Y87OznSe9FRI6A0pHU0wgW4Q,6314
|
123
|
-
langroid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
124
|
-
langroid/pydantic_v1/__init__.py,sha256=HxPGVERapVueRUORgSpj2JX_vTZxVlVbWvhpQlpjygE,283
|
125
|
-
langroid/pydantic_v1/main.py,sha256=p_k7kDY9eDrsA5dxNNqXusKLgx7mS_icGnS7fu4goqY,147
|
126
|
-
langroid/utils/.chainlit/config.toml,sha256=1t5lHORGzc2E6dkaO9P15jYHu2w-4Kl9pYjpDPc84vs,3716
|
127
|
-
langroid/utils/.chainlit/translations/en-US.json,sha256=DAFz2HjOFFfboCStrUfKFg2BpplJPK_OOtixwF_GivY,9931
|
128
|
-
langroid/utils/__init__.py,sha256=Sruos2tB4G7Tn0vlblvYlX9PEGR0plI2uE0PJ4d_EC4,353
|
129
|
-
langroid/utils/algorithms/__init__.py,sha256=WylYoZymA0fnzpB4vrsH_0n7WsoLhmuZq8qxsOCjUpM,41
|
130
|
-
langroid/utils/algorithms/graph.py,sha256=JbdpPnUOhw4-D6O7ou101JLA3xPCD0Lr3qaPoFCaRfo,2866
|
131
|
-
langroid/utils/configuration.py,sha256=V3RS8OP7AC0_bDKczxfortD0F5H3cnsZL0ulKBxuoHU,3213
|
132
|
-
langroid/utils/constants.py,sha256=vKIdkAJwyPT-bRA5MDPiOl7-EppBRmewRBIOcdXi4I4,959
|
133
|
-
langroid/utils/docker.py,sha256=kJQOLTgM0x9j9pgIIqp0dZNZCTvoUDhp6i8tYBq1Jr0,1105
|
134
|
-
langroid/utils/git_utils.py,sha256=WnflJ3R3owhlD0LNdSJakcKhExcEehE1UW5jYVQl8JY,7955
|
135
|
-
langroid/utils/globals.py,sha256=Az9dOFqR6n9CoTYSqa2kLikQWS0oCQ9DFQIQAnG-2q8,1355
|
136
|
-
langroid/utils/llms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
137
|
-
langroid/utils/llms/strings.py,sha256=CSAX9Z6FQOLXOzbLMe_Opqtc3ruDAKTTk7cPqc6Blh0,263
|
138
|
-
langroid/utils/logging.py,sha256=mwxHimq1wtVQ64PvDyfJJ7Upj-rjHLNHgx8EC2wClvo,4024
|
139
|
-
langroid/utils/object_registry.py,sha256=iPz9GHzvmCeVoidB3JdAMEKcxJEqTdUr0otQEexDZ5s,2100
|
140
|
-
langroid/utils/output/__init__.py,sha256=7P0f--4IZneNsTxXY5fd6d6iW-CeVe-KSsl-87sbBPc,340
|
141
|
-
langroid/utils/output/citations.py,sha256=PSY2cpti8W-ZGFMAgj1lYoEIZy0lsniLpCliMsVkXtc,1425
|
142
|
-
langroid/utils/output/printing.py,sha256=yzPJZN-8_jyOJmI9N_oLwEDfjMwVgk3IDiwnZ4eK_AE,2962
|
143
|
-
langroid/utils/output/status.py,sha256=rzbE7mDJcgNNvdtylCseQcPGCGghtJvVq3lB-OPJ49E,1049
|
144
|
-
langroid/utils/pandas_utils.py,sha256=UctS986Jtl_MvU5rA7-GfrjEHXP7MNu8ePhepv0bTn0,755
|
145
|
-
langroid/utils/pydantic_utils.py,sha256=R7Ps8VP56-eSo-LYHWllFo-SJ2zDmdItuuYpUq2gGJ8,20854
|
146
|
-
langroid/utils/system.py,sha256=AiEehQy0K9c9qHdKsZRCscRrazDzuh5Tv3GRQsA0Cxg,8455
|
147
|
-
langroid/utils/types.py,sha256=4GrOnU3HLWh-UwaUPp7LlB3V413q3K5OSzc0ggDoQ6A,2510
|
148
|
-
langroid/utils/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
149
|
-
langroid/utils/web/login.py,sha256=1iz9eUAHa87vpKIkzwkmFa00avwFWivDSAr7QUhK7U0,2528
|
150
|
-
langroid/vector_store/__init__.py,sha256=6xBjb_z4QtUy4vz4RuFbcbSwmHrggHL8-q0DwCf3PMM,972
|
151
|
-
langroid/vector_store/base.py,sha256=WhVtiO_EuIMiwww_3ICQK6I7hwlmEyXEFKfWdbsES2Y,13952
|
152
|
-
langroid/vector_store/chromadb.py,sha256=9WXW9IoSnhOmGEtMruVhEtVWL_VO6NXnPIz-nzh0gIQ,8235
|
153
|
-
langroid/vector_store/lancedb.py,sha256=l7C0UAMSQIntVE8a5Scg4V5f1odW40NJIbkKB_kxA2E,14626
|
154
|
-
langroid/vector_store/meilisearch.py,sha256=6frB7GFWeWmeKzRfLZIvzRjllniZ1cYj3HmhHQICXLs,11663
|
155
|
-
langroid/vector_store/momento.py,sha256=UNHGT6jXuQtqY9f6MdqGU14bVnS0zHgIJUa30ULpUJo,10474
|
156
|
-
langroid/vector_store/qdrant_cloud.py,sha256=3im4Mip0QXLkR6wiqVsjV1QvhSElfxdFSuDKddBDQ-4,188
|
157
|
-
langroid/vector_store/qdrantdb.py,sha256=v7mCsijc2GdRJyil-yFaUVAX4SX5D75mD3vzlpjCMuo,17393
|
158
|
-
pyproject.toml,sha256=4LnvkHuotknbr-AsiwehYqKmmVSs_Xi7bYBbOf0E6X0,7525
|
159
|
-
langroid-0.31.1.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
|
160
|
-
langroid-0.31.1.dist-info/METADATA,sha256=g593rbues9sKvoTGX88_zLbVE5DqIxvo-ZkmamSnJt8,58250
|
161
|
-
langroid-0.31.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
162
|
-
langroid-0.31.1.dist-info/RECORD,,
|
File without changes
|