langroid 0.32.2__py3-none-any.whl → 0.33.4__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.
Files changed (129) hide show
  1. {langroid-0.32.2.dist-info → langroid-0.33.4.dist-info}/METADATA +149 -123
  2. langroid-0.33.4.dist-info/RECORD +7 -0
  3. {langroid-0.32.2.dist-info → langroid-0.33.4.dist-info}/WHEEL +1 -1
  4. langroid-0.33.4.dist-info/entry_points.txt +4 -0
  5. pyproject.toml +317 -212
  6. langroid/__init__.py +0 -106
  7. langroid/agent/__init__.py +0 -41
  8. langroid/agent/base.py +0 -1983
  9. langroid/agent/batch.py +0 -398
  10. langroid/agent/callbacks/__init__.py +0 -0
  11. langroid/agent/callbacks/chainlit.py +0 -598
  12. langroid/agent/chat_agent.py +0 -1899
  13. langroid/agent/chat_document.py +0 -454
  14. langroid/agent/openai_assistant.py +0 -882
  15. langroid/agent/special/__init__.py +0 -59
  16. langroid/agent/special/arangodb/__init__.py +0 -0
  17. langroid/agent/special/arangodb/arangodb_agent.py +0 -656
  18. langroid/agent/special/arangodb/system_messages.py +0 -186
  19. langroid/agent/special/arangodb/tools.py +0 -107
  20. langroid/agent/special/arangodb/utils.py +0 -36
  21. langroid/agent/special/doc_chat_agent.py +0 -1466
  22. langroid/agent/special/lance_doc_chat_agent.py +0 -262
  23. langroid/agent/special/lance_rag/__init__.py +0 -9
  24. langroid/agent/special/lance_rag/critic_agent.py +0 -198
  25. langroid/agent/special/lance_rag/lance_rag_task.py +0 -82
  26. langroid/agent/special/lance_rag/query_planner_agent.py +0 -260
  27. langroid/agent/special/lance_tools.py +0 -61
  28. langroid/agent/special/neo4j/__init__.py +0 -0
  29. langroid/agent/special/neo4j/csv_kg_chat.py +0 -174
  30. langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -433
  31. langroid/agent/special/neo4j/system_messages.py +0 -120
  32. langroid/agent/special/neo4j/tools.py +0 -32
  33. langroid/agent/special/relevance_extractor_agent.py +0 -127
  34. langroid/agent/special/retriever_agent.py +0 -56
  35. langroid/agent/special/sql/__init__.py +0 -17
  36. langroid/agent/special/sql/sql_chat_agent.py +0 -654
  37. langroid/agent/special/sql/utils/__init__.py +0 -21
  38. langroid/agent/special/sql/utils/description_extractors.py +0 -190
  39. langroid/agent/special/sql/utils/populate_metadata.py +0 -85
  40. langroid/agent/special/sql/utils/system_message.py +0 -35
  41. langroid/agent/special/sql/utils/tools.py +0 -64
  42. langroid/agent/special/table_chat_agent.py +0 -263
  43. langroid/agent/task.py +0 -2095
  44. langroid/agent/tool_message.py +0 -393
  45. langroid/agent/tools/__init__.py +0 -38
  46. langroid/agent/tools/duckduckgo_search_tool.py +0 -50
  47. langroid/agent/tools/file_tools.py +0 -234
  48. langroid/agent/tools/google_search_tool.py +0 -39
  49. langroid/agent/tools/metaphor_search_tool.py +0 -67
  50. langroid/agent/tools/orchestration.py +0 -303
  51. langroid/agent/tools/recipient_tool.py +0 -235
  52. langroid/agent/tools/retrieval_tool.py +0 -32
  53. langroid/agent/tools/rewind_tool.py +0 -137
  54. langroid/agent/tools/segment_extract_tool.py +0 -41
  55. langroid/agent/xml_tool_message.py +0 -382
  56. langroid/cachedb/__init__.py +0 -17
  57. langroid/cachedb/base.py +0 -58
  58. langroid/cachedb/momento_cachedb.py +0 -108
  59. langroid/cachedb/redis_cachedb.py +0 -153
  60. langroid/embedding_models/__init__.py +0 -39
  61. langroid/embedding_models/base.py +0 -74
  62. langroid/embedding_models/models.py +0 -461
  63. langroid/embedding_models/protoc/__init__.py +0 -0
  64. langroid/embedding_models/protoc/embeddings.proto +0 -19
  65. langroid/embedding_models/protoc/embeddings_pb2.py +0 -33
  66. langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -50
  67. langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -79
  68. langroid/embedding_models/remote_embeds.py +0 -153
  69. langroid/exceptions.py +0 -65
  70. langroid/language_models/__init__.py +0 -53
  71. langroid/language_models/azure_openai.py +0 -153
  72. langroid/language_models/base.py +0 -678
  73. langroid/language_models/config.py +0 -18
  74. langroid/language_models/mock_lm.py +0 -124
  75. langroid/language_models/openai_gpt.py +0 -1964
  76. langroid/language_models/prompt_formatter/__init__.py +0 -16
  77. langroid/language_models/prompt_formatter/base.py +0 -40
  78. langroid/language_models/prompt_formatter/hf_formatter.py +0 -132
  79. langroid/language_models/prompt_formatter/llama2_formatter.py +0 -75
  80. langroid/language_models/utils.py +0 -151
  81. langroid/mytypes.py +0 -84
  82. langroid/parsing/__init__.py +0 -52
  83. langroid/parsing/agent_chats.py +0 -38
  84. langroid/parsing/code_parser.py +0 -121
  85. langroid/parsing/document_parser.py +0 -718
  86. langroid/parsing/para_sentence_split.py +0 -62
  87. langroid/parsing/parse_json.py +0 -155
  88. langroid/parsing/parser.py +0 -313
  89. langroid/parsing/repo_loader.py +0 -790
  90. langroid/parsing/routing.py +0 -36
  91. langroid/parsing/search.py +0 -275
  92. langroid/parsing/spider.py +0 -102
  93. langroid/parsing/table_loader.py +0 -94
  94. langroid/parsing/url_loader.py +0 -111
  95. langroid/parsing/urls.py +0 -273
  96. langroid/parsing/utils.py +0 -373
  97. langroid/parsing/web_search.py +0 -155
  98. langroid/prompts/__init__.py +0 -9
  99. langroid/prompts/dialog.py +0 -17
  100. langroid/prompts/prompts_config.py +0 -5
  101. langroid/prompts/templates.py +0 -141
  102. langroid/pydantic_v1/__init__.py +0 -10
  103. langroid/pydantic_v1/main.py +0 -4
  104. langroid/utils/__init__.py +0 -19
  105. langroid/utils/algorithms/__init__.py +0 -3
  106. langroid/utils/algorithms/graph.py +0 -103
  107. langroid/utils/configuration.py +0 -98
  108. langroid/utils/constants.py +0 -30
  109. langroid/utils/git_utils.py +0 -252
  110. langroid/utils/globals.py +0 -49
  111. langroid/utils/logging.py +0 -135
  112. langroid/utils/object_registry.py +0 -66
  113. langroid/utils/output/__init__.py +0 -20
  114. langroid/utils/output/citations.py +0 -41
  115. langroid/utils/output/printing.py +0 -99
  116. langroid/utils/output/status.py +0 -40
  117. langroid/utils/pandas_utils.py +0 -30
  118. langroid/utils/pydantic_utils.py +0 -602
  119. langroid/utils/system.py +0 -286
  120. langroid/utils/types.py +0 -93
  121. langroid/vector_store/__init__.py +0 -50
  122. langroid/vector_store/base.py +0 -357
  123. langroid/vector_store/chromadb.py +0 -214
  124. langroid/vector_store/lancedb.py +0 -401
  125. langroid/vector_store/meilisearch.py +0 -299
  126. langroid/vector_store/momento.py +0 -278
  127. langroid/vector_store/qdrantdb.py +0 -468
  128. langroid-0.32.2.dist-info/RECORD +0 -128
  129. {langroid-0.32.2.dist-info → langroid-0.33.4.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
@@ -1,128 +0,0 @@
1
- langroid/__init__.py,sha256=z_fCOLQJPOw3LLRPBlFB5-2HyCjpPgQa4m4iY5Fvb8Y,1800
2
- langroid/agent/__init__.py,sha256=ll0Cubd2DZ-fsCMl7e10hf9ZjFGKzphfBco396IKITY,786
3
- langroid/agent/base.py,sha256=-wColF3AGsbIm-uiTLfu8cyGUqMRCzZETVirvgZgYGQ,77642
4
- langroid/agent/batch.py,sha256=qK3ph6VNj_1sOhfXCZY4r6gh035DglDKU751p8BU0tY,14665
5
- langroid/agent/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- langroid/agent/callbacks/chainlit.py,sha256=C6zzzYC30qC4eMA7al7eFpRoTgoe3475kaMKyXgQM0Q,20695
7
- langroid/agent/chat_agent.py,sha256=Idts_HDO1tW052POVOQ9FvuU37TTB7c1I96YVbnBumo,80030
8
- langroid/agent/chat_document.py,sha256=xPUMGzR83rn4iAEXIw2jy5LQ6YJ6Y0TiZ78XRQeDnJQ,17778
9
- langroid/agent/openai_assistant.py,sha256=JkAcs02bIrgPNVvUWVR06VCthc5-ulla2QMBzux_q6o,34340
10
- langroid/agent/special/__init__.py,sha256=gik_Xtm_zV7U9s30Mn8UX3Gyuy4jTjQe9zjiE3HWmEo,1273
11
- langroid/agent/special/arangodb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- langroid/agent/special/arangodb/arangodb_agent.py,sha256=12Y54c84c9qXV-YXRBcI5HaqyiY75JR4TmqlURYKJAM,25851
13
- langroid/agent/special/arangodb/system_messages.py,sha256=udwfLleTdyz_DuxHuoiv2wHEZoAPBPbwdF_ivjIfP5c,6867
14
- langroid/agent/special/arangodb/tools.py,sha256=Mixl9WS0r0Crd4nrw2YAB0eY33fTsKISul1053eyeio,3590
15
- langroid/agent/special/arangodb/utils.py,sha256=LIevtkayIdVVXyj3jlbKH2WgdZTtH5-JLgbXOHC7uxs,1420
16
- langroid/agent/special/doc_chat_agent.py,sha256=zw2MvdCWRPH93d73PKh27KFiQ8sUCFPxAfLDdkxvdZQ,59301
17
- langroid/agent/special/lance_doc_chat_agent.py,sha256=s8xoRs0gGaFtDYFUSIRchsgDVbS5Q3C2b2mr3V1Fd-Q,10419
18
- langroid/agent/special/lance_rag/__init__.py,sha256=QTbs0IVE2ZgDg8JJy1zN97rUUg4uEPH7SLGctFNumk4,174
19
- langroid/agent/special/lance_rag/critic_agent.py,sha256=OtFuHthKQLkdVkvuZ2m0GNq1qOYLqHkm1pfLRFnSg5c,9548
20
- langroid/agent/special/lance_rag/lance_rag_task.py,sha256=qDouwz-Yi8aSIAVb2Jx6buTKwO2L7PSvUY604Eu0uIM,2957
21
- langroid/agent/special/lance_rag/query_planner_agent.py,sha256=5YPeliCjlRk1LEDe5eFyqfkq9RjDfa4usjBsNmT9GsQ,11509
22
- langroid/agent/special/lance_tools.py,sha256=qS8x4wi8mrqfbYV2ztFzrcxyhHQ0ZWOc-zkYiH7awj0,2105
23
- langroid/agent/special/neo4j/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- langroid/agent/special/neo4j/csv_kg_chat.py,sha256=dRsAgMBa1H_EMI2YYgJR2Xyv1D7e4o3G9M64mTewq_c,6409
25
- langroid/agent/special/neo4j/neo4j_chat_agent.py,sha256=1RMKupJra0KZ-hA7AiiR662STJyYDZi8ZnAnnXF8oCA,16726
26
- langroid/agent/special/neo4j/system_messages.py,sha256=m2jsVayey6E_88F5B_gW2WbWKBJvIeDUoVCRBbNs97o,4522
27
- langroid/agent/special/neo4j/tools.py,sha256=Vw3HvtDfG2c4_bUHgt4_ZbJq48lpIQstbjjwhh1BjrQ,905
28
- langroid/agent/special/relevance_extractor_agent.py,sha256=zIx8GUdVo1aGW6ASla0NPQjYYIpmriK_TYMijqAx3F8,4796
29
- langroid/agent/special/retriever_agent.py,sha256=lvMvf-u9rSosg4YASuFdUbGLgkzLPknXAbJZfZ1LZCc,1868
30
- langroid/agent/special/sql/__init__.py,sha256=mWfmm1QpXCezpFOS2eI57M0L_Ok3q5_ukG8tXBnBrEA,319
31
- langroid/agent/special/sql/sql_chat_agent.py,sha256=IsVyFLpMinXsPd_HzUIyPC2wIdVc8SLuqNX04X0jyfs,24618
32
- langroid/agent/special/sql/utils/__init__.py,sha256=JFif6CRTrN-bc91uuAI4K9fe2ndIWSNMVxJ0WA68--M,446
33
- langroid/agent/special/sql/utils/description_extractors.py,sha256=cX8TIpmTPXZXQTMpIi3OUFwFsPywxFFdurpx717Kq0I,6529
34
- langroid/agent/special/sql/utils/populate_metadata.py,sha256=1J22UsyEPKzwK0XlJZtYn9r6kYc0FXIr8-lZrndYlhc,3131
35
- langroid/agent/special/sql/utils/system_message.py,sha256=qKLHkvQWRQodTtPLPxr1GSLUYUFASZU8x-ybV67cB68,1885
36
- langroid/agent/special/sql/utils/tools.py,sha256=ovCePzq5cmbqw0vsVPBzxdZpUcSUIfTiDSMGXustZW8,1749
37
- langroid/agent/special/table_chat_agent.py,sha256=d9v2wsblaRx7oMnKhLV7uO_ujvk9gh59pSGvBXyeyNc,9659
38
- langroid/agent/task.py,sha256=jAPoifZqGwiunDBlz0c-pOHYXKXlhhpYXxZJGNz9kkk,89731
39
- langroid/agent/tool_message.py,sha256=HDW_FVQXvZAHI61CtOYNuZet0qlK_WwOnjSYd1g81eo,14742
40
- langroid/agent/tools/__init__.py,sha256=IMgCte-_ZIvCkozGQmvMqxIw7_nKLKzD78ccJL1bnQU,804
41
- langroid/agent/tools/duckduckgo_search_tool.py,sha256=NhsCaGZkdv28nja7yveAhSK_w6l_Ftym8agbrdzqgfo,1935
42
- langroid/agent/tools/file_tools.py,sha256=GjPB5YDILucYapElnvvoYpGJuZQ25ecLs2REv7edPEo,7292
43
- langroid/agent/tools/google_search_tool.py,sha256=y7b-3FtgXf0lfF4AYxrZ3K5pH2dhidvibUOAGBE--WI,1456
44
- langroid/agent/tools/metaphor_search_tool.py,sha256=qj4gt453cLEX3EGW7nVzVu6X7LCdrwjSlcNY0qJW104,2489
45
- langroid/agent/tools/orchestration.py,sha256=851nZQOE1HpGBwH5om_TNP_qCMxxatXYWFZUrpjSfKk,11421
46
- langroid/agent/tools/recipient_tool.py,sha256=dr0yTxgNEIoxUYxH6TtaExC4G_8WdJ0xGohIa4dFLhY,9808
47
- langroid/agent/tools/retrieval_tool.py,sha256=zcAV20PP_6VzSd-UE-IJcabaBseFL_QNz59Bnig8-lE,946
48
- langroid/agent/tools/rewind_tool.py,sha256=XAXL3BpNhCmBGYq_qi_sZfHJuIw7NY2jp4wnojJ7WRs,5606
49
- langroid/agent/tools/segment_extract_tool.py,sha256=__srZ_VGYLVOdPrITUM8S0HpmX4q7r5FHWMDdHdEv8w,1440
50
- langroid/agent/xml_tool_message.py,sha256=6SshYZJKIfi4mkE-gIoSwjkEYekQ8GwcSiCv7a5uO9E,15054
51
- langroid/cachedb/__init__.py,sha256=icAT2s7Vhf-ZGUeqpDQGNU6ob6o0aFEyjwcxxUGRFjg,225
52
- langroid/cachedb/base.py,sha256=ztVjB1DtN6pLCujCWnR6xruHxwVj3XkYniRTYAKKqk0,1354
53
- langroid/cachedb/momento_cachedb.py,sha256=YEOJ62hEcV6iIeMr5aGgRYgWQqFYaej9gEDEcY0sm7M,3172
54
- langroid/cachedb/redis_cachedb.py,sha256=7kgnbf4b5CKsCrlL97mHWKvdvlLt8zgn7lc528jEpiE,5141
55
- langroid/embedding_models/__init__.py,sha256=XhVIMQJbQRpImcnhA9sJR7h6r7QgPo1SKDCvwEUD9j4,851
56
- langroid/embedding_models/base.py,sha256=DUhvzALoW2UMbtmLxP4eJTfPii99WjUNX7bwFpj_K-0,2395
57
- langroid/embedding_models/models.py,sha256=sW6baTvFSeZBZ5w-Kd9Vgo93gokesJ3aHP4x9htoF2E,16776
58
- langroid/embedding_models/protoc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
- langroid/embedding_models/protoc/embeddings.proto,sha256=_O-SgFpTaylQeOTgSpxhEJ7CUw7PeCQQJLaPqpPYKJg,321
60
- langroid/embedding_models/protoc/embeddings_pb2.py,sha256=4Q57PhOunv-uZNJrxYrWBXAI0ZtfnVZXFRhRj5JuRSg,1662
61
- langroid/embedding_models/protoc/embeddings_pb2.pyi,sha256=UkNy7BrNsmQm0vLb3NtGXy8jVtz-kPWwwFsX-QbQBhQ,1475
62
- langroid/embedding_models/protoc/embeddings_pb2_grpc.py,sha256=9dYQqkW3JPyBpSEjeGXTNpSqAkC-6FPtBHyteVob2Y8,2452
63
- langroid/embedding_models/remote_embeds.py,sha256=6_kjXByVbqhY9cGwl9R83ZcYC2km-nGieNNAo1McHaY,5151
64
- langroid/exceptions.py,sha256=G60UVDChkUlBDVWHFr_43zUUszZHSejoU00tX_dfD68,2322
65
- langroid/language_models/__init__.py,sha256=8o8D8Lxaq961_oxVpB_bC2iEJ1GXJqYXMlwUcn6OJb8,976
66
- langroid/language_models/azure_openai.py,sha256=zNQzzsERxNestq-hFfQZbvTzK43G2vjRWnTV3ktm1DQ,5845
67
- langroid/language_models/base.py,sha256=6hXR-bclyPif-BvFbyXevP-gEwiawQAJHX3N1AKNei0,23786
68
- langroid/language_models/config.py,sha256=9Q8wk5a7RQr8LGMT_0WkpjY8S4ywK06SalVRjXlfCiI,378
69
- langroid/language_models/mock_lm.py,sha256=5BgHKDVRWFbUwDT_PFgTZXz9-k8wJSA2e3PZmyDgQ1k,4022
70
- langroid/language_models/openai_gpt.py,sha256=I-GAksKeth960YPq9E7V5cU97SflWZVTrjQsZZ9CADo,76941
71
- langroid/language_models/prompt_formatter/__init__.py,sha256=2-5cdE24XoFDhifOLl8yiscohil1ogbP1ECkYdBlBsk,372
72
- langroid/language_models/prompt_formatter/base.py,sha256=eDS1sgRNZVnoajwV_ZIha6cba5Dt8xjgzdRbPITwx3Q,1221
73
- langroid/language_models/prompt_formatter/hf_formatter.py,sha256=PVJppmjRvD-2DF-XNC6mE05vTZ9wbu37SmXwZBQhad0,5055
74
- langroid/language_models/prompt_formatter/llama2_formatter.py,sha256=YdcO88qyBeuMENVIVvVqSYuEpvYSTndUe_jd6hVTko4,2899
75
- langroid/language_models/utils.py,sha256=L4_CbihDMTGcsg0TOG1Yd5JFEto46--h7CX_14m89sQ,5016
76
- langroid/mytypes.py,sha256=ptAFxEAtiwmIfUnGisNotTe8wT9LKBf22lOfPgZoQIY,2368
77
- langroid/parsing/__init__.py,sha256=ZgSAfgTC6VsTLFlRSWT-TwYco7SQeRMeZG-49MnKYGY,936
78
- langroid/parsing/agent_chats.py,sha256=sbZRV9ujdM5QXvvuHVjIi2ysYSYlap-uqfMMUKulrW0,1068
79
- langroid/parsing/code_parser.py,sha256=AOxb3xbYpTBPP3goOm5dKfJdh5hS_2BhLVCEkifWZN8,3796
80
- langroid/parsing/document_parser.py,sha256=9xUOyrVNBAS9cpCvCptr2XK4Kq47W574i8zzGEoXc3c,24933
81
- langroid/parsing/para_sentence_split.py,sha256=AJBzZojP3zpB-_IMiiHismhqcvkrVBQ3ZINoQyx_bE4,2000
82
- langroid/parsing/parse_json.py,sha256=aADo38bAHQhC8on4aWZZzVzSDy-dK35vRLZsFI2ewh8,4756
83
- langroid/parsing/parser.py,sha256=bTG5TO2CEwGdLf9979j9_dFntKX5FloGF8vhts6ObU0,11978
84
- langroid/parsing/repo_loader.py,sha256=3GjvPJS6Vf5L6gV2zOU8s-Tf1oq_fZm-IB_RL_7CTsY,29373
85
- langroid/parsing/routing.py,sha256=-FcnlqldzL4ZoxuDwXjQPNHgBe9F9-F4R6q7b_z9CvI,1232
86
- langroid/parsing/search.py,sha256=0i_r0ESb5HEQfagA2g7_uMQyxYPADWVbdcN9ixZhS4E,8992
87
- langroid/parsing/spider.py,sha256=Y6y7b86Y2k770LdhxgjVlImBxuuy1V9n8-XQ3QPaG5s,3199
88
- langroid/parsing/table_loader.py,sha256=qNM4obT_0Y4tjrxNBCNUYjKQ9oETCZ7FbolKBTcz-GM,3410
89
- langroid/parsing/url_loader.py,sha256=Na2TBlKuQkloZzkE2d7xl6mh9olS3CbpgCsJbJ-xhIA,4472
90
- langroid/parsing/urls.py,sha256=XjpaV5onG7gKQ5iQeFTzHSw5P08Aqw0g-rMUu61lR6s,7988
91
- langroid/parsing/utils.py,sha256=kb9DlHaG1iQB-6JagH1C26SdCNNf8U-2XaXia4_dWCw,12726
92
- langroid/parsing/web_search.py,sha256=wGycU86N3nsZ78E9iS-BIm5NWueDgoknojABE0_1LRA,4886
93
- langroid/prompts/__init__.py,sha256=RW11vK6jiLPuaUh4GpeFvstti73gkm8_rDMtrbo2YsU,142
94
- langroid/prompts/dialog.py,sha256=SpfiSyofSgy2pwD1YboHR_yHO3LEEMbv6j2sm874jKo,331
95
- langroid/prompts/prompts_config.py,sha256=p_lp9nbMuQwhhMwAZsOxveRw9C0ZFZvql7pdIfgVZYo,143
96
- langroid/prompts/templates.py,sha256=kz0rPiM6iLGhhpDonF3Y87OznSe9FRI6A0pHU0wgW4Q,6314
97
- langroid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
- langroid/pydantic_v1/__init__.py,sha256=HxPGVERapVueRUORgSpj2JX_vTZxVlVbWvhpQlpjygE,283
99
- langroid/pydantic_v1/main.py,sha256=p_k7kDY9eDrsA5dxNNqXusKLgx7mS_icGnS7fu4goqY,147
100
- langroid/utils/__init__.py,sha256=Sruos2tB4G7Tn0vlblvYlX9PEGR0plI2uE0PJ4d_EC4,353
101
- langroid/utils/algorithms/__init__.py,sha256=WylYoZymA0fnzpB4vrsH_0n7WsoLhmuZq8qxsOCjUpM,41
102
- langroid/utils/algorithms/graph.py,sha256=JbdpPnUOhw4-D6O7ou101JLA3xPCD0Lr3qaPoFCaRfo,2866
103
- langroid/utils/configuration.py,sha256=V3RS8OP7AC0_bDKczxfortD0F5H3cnsZL0ulKBxuoHU,3213
104
- langroid/utils/constants.py,sha256=vKIdkAJwyPT-bRA5MDPiOl7-EppBRmewRBIOcdXi4I4,959
105
- langroid/utils/git_utils.py,sha256=WnflJ3R3owhlD0LNdSJakcKhExcEehE1UW5jYVQl8JY,7955
106
- langroid/utils/globals.py,sha256=Az9dOFqR6n9CoTYSqa2kLikQWS0oCQ9DFQIQAnG-2q8,1355
107
- langroid/utils/logging.py,sha256=mwxHimq1wtVQ64PvDyfJJ7Upj-rjHLNHgx8EC2wClvo,4024
108
- langroid/utils/object_registry.py,sha256=iPz9GHzvmCeVoidB3JdAMEKcxJEqTdUr0otQEexDZ5s,2100
109
- langroid/utils/output/__init__.py,sha256=7P0f--4IZneNsTxXY5fd6d6iW-CeVe-KSsl-87sbBPc,340
110
- langroid/utils/output/citations.py,sha256=PSY2cpti8W-ZGFMAgj1lYoEIZy0lsniLpCliMsVkXtc,1425
111
- langroid/utils/output/printing.py,sha256=yzPJZN-8_jyOJmI9N_oLwEDfjMwVgk3IDiwnZ4eK_AE,2962
112
- langroid/utils/output/status.py,sha256=rzbE7mDJcgNNvdtylCseQcPGCGghtJvVq3lB-OPJ49E,1049
113
- langroid/utils/pandas_utils.py,sha256=UctS986Jtl_MvU5rA7-GfrjEHXP7MNu8ePhepv0bTn0,755
114
- langroid/utils/pydantic_utils.py,sha256=R7Ps8VP56-eSo-LYHWllFo-SJ2zDmdItuuYpUq2gGJ8,20854
115
- langroid/utils/system.py,sha256=AiEehQy0K9c9qHdKsZRCscRrazDzuh5Tv3GRQsA0Cxg,8455
116
- langroid/utils/types.py,sha256=4GrOnU3HLWh-UwaUPp7LlB3V413q3K5OSzc0ggDoQ6A,2510
117
- langroid/vector_store/__init__.py,sha256=6xBjb_z4QtUy4vz4RuFbcbSwmHrggHL8-q0DwCf3PMM,972
118
- langroid/vector_store/base.py,sha256=WhVtiO_EuIMiwww_3ICQK6I7hwlmEyXEFKfWdbsES2Y,13952
119
- langroid/vector_store/chromadb.py,sha256=9WXW9IoSnhOmGEtMruVhEtVWL_VO6NXnPIz-nzh0gIQ,8235
120
- langroid/vector_store/lancedb.py,sha256=l7C0UAMSQIntVE8a5Scg4V5f1odW40NJIbkKB_kxA2E,14626
121
- langroid/vector_store/meilisearch.py,sha256=6frB7GFWeWmeKzRfLZIvzRjllniZ1cYj3HmhHQICXLs,11663
122
- langroid/vector_store/momento.py,sha256=UNHGT6jXuQtqY9f6MdqGU14bVnS0zHgIJUa30ULpUJo,10474
123
- langroid/vector_store/qdrantdb.py,sha256=v7mCsijc2GdRJyil-yFaUVAX4SX5D75mD3vzlpjCMuo,17393
124
- pyproject.toml,sha256=seTnIPzjlIfXkJXSPfwt3CSlipL1NqL4mnQqSG52flo,7525
125
- langroid-0.32.2.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
126
- langroid-0.32.2.dist-info/METADATA,sha256=xQVqC-N954igEVYwpTlg_3CE1sPcL2vMBzNX34Ej0a0,58343
127
- langroid-0.32.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
128
- langroid-0.32.2.dist-info/RECORD,,