langroid 0.37.2__py3-none-any.whl → 0.37.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.
@@ -211,10 +211,10 @@ class WeaviateDB(VectorStore):
211
211
  return_properties=True,
212
212
  return_metadata=MetadataQuery(distance=True),
213
213
  )
214
- return [
215
- (self.weaviate_obj_to_doc(item), 1 - (item.metadata.distance or 1))
216
- for item in response.objects
217
- ]
214
+ maybe_distances = [item.metadata.distance for item in response.objects]
215
+ similarities = [0 if d is None else 1 - d for d in maybe_distances]
216
+ docs = [self.weaviate_obj_to_doc(item) for item in response.objects]
217
+ return list(zip(docs, similarities))
218
218
 
219
219
  def _create_valid_uuid_id(self, id: str) -> Any:
220
220
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langroid
3
- Version: 0.37.2
3
+ Version: 0.37.3
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  Author-email: Prasad Chalasani <pchalasani@gmail.com>
6
6
  License: MIT
@@ -122,8 +122,8 @@ langroid/vector_store/lancedb.py,sha256=b3_vWkTjG8mweZ7ZNlUD-NjmQP_rLBZfyKWcxt2v
122
122
  langroid/vector_store/meilisearch.py,sha256=6frB7GFWeWmeKzRfLZIvzRjllniZ1cYj3HmhHQICXLs,11663
123
123
  langroid/vector_store/momento.py,sha256=UNHGT6jXuQtqY9f6MdqGU14bVnS0zHgIJUa30ULpUJo,10474
124
124
  langroid/vector_store/qdrantdb.py,sha256=Cen6f-y6witiR53UQ-5a605Reo0gTj3ygXpE_ehYoZo,18116
125
- langroid/vector_store/weaviatedb.py,sha256=C6jd1Twl5_jux3JYyrcTfQb63Lk9HuiUzVF4NahXuGo,10642
126
- langroid-0.37.2.dist-info/METADATA,sha256=FVKFGD2ZJugI_x4aFQMFufovafkE3qLBXCQWHKlLSOA,60524
127
- langroid-0.37.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
128
- langroid-0.37.2.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
129
- langroid-0.37.2.dist-info/RECORD,,
125
+ langroid/vector_store/weaviatedb.py,sha256=S-gG5xbOx7f_VXyGACPk20TWWxORpvZPJ8kWB1ZT9WU,10772
126
+ langroid-0.37.3.dist-info/METADATA,sha256=kuk0ka12Ezg5CEte9Sx7oc9IBvX1bT4B5ssTb2U1yBg,60524
127
+ langroid-0.37.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
128
+ langroid-0.37.3.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
129
+ langroid-0.37.3.dist-info/RECORD,,