crewplus 0.2.24__tar.gz → 0.2.25__tar.gz

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 crewplus might be problematic. Click here for more details.

Files changed (21) hide show
  1. {crewplus-0.2.24 → crewplus-0.2.25}/PKG-INFO +1 -1
  2. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/vectorstores/milvus/vdb_service.py +43 -44
  3. {crewplus-0.2.24 → crewplus-0.2.25}/pyproject.toml +1 -1
  4. {crewplus-0.2.24 → crewplus-0.2.25}/LICENSE +0 -0
  5. {crewplus-0.2.24 → crewplus-0.2.25}/README.md +0 -0
  6. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/__init__.py +0 -0
  7. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/services/__init__.py +0 -0
  8. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/services/azure_chat_model.py +0 -0
  9. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/services/gemini_chat_model.py +0 -0
  10. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/services/init_services.py +0 -0
  11. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/services/model_load_balancer.py +0 -0
  12. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/utils/__init__.py +0 -0
  13. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/utils/schema_action.py +0 -0
  14. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/utils/schema_document_updater.py +0 -0
  15. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/vectorstores/milvus/__init__.py +0 -0
  16. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/vectorstores/milvus/milvus_schema_manager.py +0 -0
  17. {crewplus-0.2.24 → crewplus-0.2.25}/crewplus/vectorstores/milvus/schema_milvus.py +0 -0
  18. {crewplus-0.2.24 → crewplus-0.2.25}/docs/GeminiChatModel.md +0 -0
  19. {crewplus-0.2.24 → crewplus-0.2.25}/docs/ModelLoadBalancer.md +0 -0
  20. {crewplus-0.2.24 → crewplus-0.2.25}/docs/VDBService.md +0 -0
  21. {crewplus-0.2.24 → crewplus-0.2.25}/docs/index.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crewplus
3
- Version: 0.2.24
3
+ Version: 0.2.25
4
4
  Summary: Base services for CrewPlus AI applications
5
5
  Author-Email: Tim Liu <tim@opsmateai.com>
6
6
  License: MIT
@@ -373,49 +373,6 @@ class VDBService(object):
373
373
 
374
374
  return vdb
375
375
 
376
- def delete_old_indexes(self, url: str = None, vdb: Milvus = None) -> (bool | None):
377
- """ Delete old indexes of the same source_url
378
-
379
- Args:
380
- url (str): source url
381
- vdb (Milvus): Milvus/Zilliz instance
382
- """
383
- self.logger.info(f"Delete old indexes of the same source_url:{url}")
384
-
385
- if url is None or vdb is None:
386
- return None
387
-
388
- # Delete indexes of the same source_url
389
- expr = f'source_url == "{url}" or source == "{url}"'
390
- pks = vdb.get_pks(expr)
391
-
392
- # Delete entities by pks
393
- if pks is not None and len(pks) > 0 :
394
- res = vdb.delete(pks)
395
- self.logger.info("Deleted old indexes result: " + str(res))
396
- return res
397
-
398
- def delete_old_indexes_by_id(self, source_id: str = None, vdb: Milvus = None) -> (bool | None):
399
- """ Delete old indexes of the same source_id
400
-
401
- Args:
402
- source_id (str): source id
403
- """
404
- self.logger.info(f"Delete old indexes of the same source_id:{source_id}")
405
-
406
- if source_id is None or vdb is None:
407
- return None
408
-
409
- # Delete indexes of the same source_id
410
- expr = f'source_id == "{source_id}"'
411
- pks = vdb.get_pks(expr)
412
-
413
- # Delete entities by pks
414
- if pks is not None and len(pks) > 0 :
415
- res = vdb.delete(pks)
416
- self.logger.info("Deleted old indexes result: " + str(res))
417
- return res
418
-
419
376
  def drop_collection(self, collection_name: str) -> None:
420
377
  """
421
378
  Deletes a collection from the vector database and removes it from the cache.
@@ -461,4 +418,46 @@ class VDBService(object):
461
418
  return RuntimeError(f"collection_name must be not null or check out your client to link milvus")
462
419
  client.delete(collection_name=collection_name, filter=filter)
463
420
  except Exception as e:
464
- raise RuntimeError(f"delete collection data failed: {str(e)}")
421
+ raise RuntimeError(f"delete collection data failed: {str(e)}")
422
+
423
+ @staticmethod
424
+ def delete_old_indexes(url: str = None, vdb: Milvus = None) -> (bool | None):
425
+ """ Delete old indexes of the same source_url
426
+
427
+ Args:
428
+ url (str): source url
429
+ vdb (Milvus): Milvus/Zilliz instance
430
+ """
431
+ # Logging is not performed in static method
432
+ if url is None or vdb is None:
433
+ return None
434
+
435
+ # Delete indexes of the same source_url
436
+ expr = f'source_url == "{url}" or source == "{url}"'
437
+ pks = vdb.get_pks(expr)
438
+
439
+ # Delete entities by pks
440
+ if pks is not None and len(pks) > 0 :
441
+ res = vdb.delete(pks)
442
+ return res
443
+
444
+ @staticmethod
445
+ def delete_old_indexes_by_id(source_id: str = None, vdb: Milvus = None) -> (bool | None):
446
+ """ Delete old indexes of the same source_id
447
+
448
+ Args:
449
+ source_id (str): source id
450
+ """
451
+ # Logging is not performed in static method
452
+ if source_id is None or vdb is None:
453
+ return None
454
+
455
+ # Delete indexes of the same source_id
456
+ expr = f'source_id == "{source_id}"'
457
+ pks = vdb.get_pks(expr)
458
+
459
+ # Delete entities by pks
460
+ if pks is not None and len(pks) > 0 :
461
+ res = vdb.delete(pks)
462
+ return res
463
+
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "crewplus"
9
- version = "0.2.24"
9
+ version = "0.2.25"
10
10
  description = "Base services for CrewPlus AI applications"
11
11
  authors = [
12
12
  { name = "Tim Liu", email = "tim@opsmateai.com" },
File without changes
File without changes
File without changes
File without changes