langroid 0.33.8__py3-none-any.whl → 0.33.9__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.
@@ -72,7 +72,8 @@ Start by asking what I would like to know about the data.
72
72
 
73
73
  ADDRESSING_INSTRUCTION = """
74
74
  IMPORTANT - Whenever you are NOT writing a SQL query, make sure you address the user
75
- using {prefix}User. You MUST use the EXACT syntax {prefix} !!!
75
+ using {prefix}User (NO SPACE between {prefix} and User).
76
+ You MUST use the EXACT syntax {prefix}User !!!
76
77
 
77
78
  In other words, you ALWAYS write EITHER:
78
79
  - a SQL query using the `run_query` tool,
@@ -2,6 +2,7 @@ import hashlib
2
2
  import json
3
3
  import logging
4
4
  import os
5
+ import time
5
6
  import uuid
6
7
  from typing import Dict, List, Optional, Sequence, Tuple, TypeVar
7
8
 
@@ -323,6 +324,26 @@ class QdrantDB(VectorStore):
323
324
  }
324
325
  if self.config.use_sparse_embeddings:
325
326
  vectors["text-sparse"] = sparse_embedding_vecs[i : i + b]
327
+ coll_found: bool = False
328
+ for _ in range(3):
329
+ # poll until collection is ready
330
+ if (
331
+ self.client.collection_exists(self.config.collection_name)
332
+ and self.client.get_collection(self.config.collection_name).status
333
+ == CollectionStatus.GREEN
334
+ ):
335
+ coll_found = True
336
+ break
337
+ time.sleep(1)
338
+
339
+ if not coll_found:
340
+ raise ValueError(
341
+ f"""
342
+ QdrantDB Collection {self.config.collection_name}
343
+ not found or not ready
344
+ """
345
+ )
346
+
326
347
  self.client.upsert(
327
348
  collection_name=self.config.collection_name,
328
349
  points=Batch(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langroid
3
- Version: 0.33.8
3
+ Version: 0.33.9
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  Author-email: Prasad Chalasani <pchalasani@gmail.com>
6
6
  License: MIT
@@ -35,7 +35,7 @@ langroid/agent/special/neo4j/neo4j_chat_agent.py,sha256=1RMKupJra0KZ-hA7AiiR662S
35
35
  langroid/agent/special/neo4j/system_messages.py,sha256=m2jsVayey6E_88F5B_gW2WbWKBJvIeDUoVCRBbNs97o,4522
36
36
  langroid/agent/special/neo4j/tools.py,sha256=Vw3HvtDfG2c4_bUHgt4_ZbJq48lpIQstbjjwhh1BjrQ,905
37
37
  langroid/agent/special/sql/__init__.py,sha256=mWfmm1QpXCezpFOS2eI57M0L_Ok3q5_ukG8tXBnBrEA,319
38
- langroid/agent/special/sql/sql_chat_agent.py,sha256=IsVyFLpMinXsPd_HzUIyPC2wIdVc8SLuqNX04X0jyfs,24618
38
+ langroid/agent/special/sql/sql_chat_agent.py,sha256=bHJ2TsZciijOBPXKbKvJvDbdEwCRXOSkaRdMmGW1yr0,24660
39
39
  langroid/agent/special/sql/utils/__init__.py,sha256=JFif6CRTrN-bc91uuAI4K9fe2ndIWSNMVxJ0WA68--M,446
40
40
  langroid/agent/special/sql/utils/description_extractors.py,sha256=cX8TIpmTPXZXQTMpIi3OUFwFsPywxFFdurpx717Kq0I,6529
41
41
  langroid/agent/special/sql/utils/populate_metadata.py,sha256=1J22UsyEPKzwK0XlJZtYn9r6kYc0FXIr8-lZrndYlhc,3131
@@ -120,8 +120,8 @@ langroid/vector_store/chromadb.py,sha256=9WXW9IoSnhOmGEtMruVhEtVWL_VO6NXnPIz-nzh
120
120
  langroid/vector_store/lancedb.py,sha256=b3_vWkTjG8mweZ7ZNlUD-NjmQP_rLBZfyKWcxt2vosA,14855
121
121
  langroid/vector_store/meilisearch.py,sha256=6frB7GFWeWmeKzRfLZIvzRjllniZ1cYj3HmhHQICXLs,11663
122
122
  langroid/vector_store/momento.py,sha256=UNHGT6jXuQtqY9f6MdqGU14bVnS0zHgIJUa30ULpUJo,10474
123
- langroid/vector_store/qdrantdb.py,sha256=v7mCsijc2GdRJyil-yFaUVAX4SX5D75mD3vzlpjCMuo,17393
124
- langroid-0.33.8.dist-info/METADATA,sha256=B8l5KwLOOVWwTQ7143cYVLffIQYRc3m0UtMbkyoE7N0,59015
125
- langroid-0.33.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
126
- langroid-0.33.8.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
127
- langroid-0.33.8.dist-info/RECORD,,
123
+ langroid/vector_store/qdrantdb.py,sha256=HRLCt-FG8y4718omwpFaQZnWeYxPj0XCwS4tjokI1sU,18116
124
+ langroid-0.33.9.dist-info/METADATA,sha256=5dBFIEzwzxNpjICkMYzMSUNgGONETNZ-Mb9BWhkQs2s,59015
125
+ langroid-0.33.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
126
+ langroid-0.33.9.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
127
+ langroid-0.33.9.dist-info/RECORD,,