crewplus 0.2.61__tar.gz → 0.2.62__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 (24) hide show
  1. {crewplus-0.2.61 → crewplus-0.2.62}/PKG-INFO +1 -1
  2. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/vectorstores/milvus/vdb_service.py +8 -30
  3. {crewplus-0.2.61 → crewplus-0.2.62}/pyproject.toml +1 -1
  4. {crewplus-0.2.61 → crewplus-0.2.62}/LICENSE +0 -0
  5. {crewplus-0.2.61 → crewplus-0.2.62}/README.md +0 -0
  6. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/__init__.py +0 -0
  7. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/callbacks/__init__.py +0 -0
  8. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/callbacks/async_langfuse_handler.py +0 -0
  9. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/services/__init__.py +0 -0
  10. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/services/azure_chat_model.py +0 -0
  11. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/services/gemini_chat_model.py +0 -0
  12. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/services/init_services.py +0 -0
  13. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/services/model_load_balancer.py +0 -0
  14. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/services/tracing_manager.py +0 -0
  15. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/utils/__init__.py +0 -0
  16. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/utils/schema_action.py +0 -0
  17. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/utils/schema_document_updater.py +0 -0
  18. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/vectorstores/milvus/__init__.py +0 -0
  19. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/vectorstores/milvus/milvus_schema_manager.py +0 -0
  20. {crewplus-0.2.61 → crewplus-0.2.62}/crewplus/vectorstores/milvus/schema_milvus.py +0 -0
  21. {crewplus-0.2.61 → crewplus-0.2.62}/docs/GeminiChatModel.md +0 -0
  22. {crewplus-0.2.61 → crewplus-0.2.62}/docs/ModelLoadBalancer.md +0 -0
  23. {crewplus-0.2.61 → crewplus-0.2.62}/docs/VDBService.md +0 -0
  24. {crewplus-0.2.61 → crewplus-0.2.62}/docs/index.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crewplus
3
- Version: 0.2.61
3
+ Version: 0.2.62
4
4
  Summary: Base services for CrewPlus AI applications
5
5
  Author-Email: Tim Liu <tim@opsmateai.com>
6
6
  License: MIT
@@ -454,29 +454,17 @@ class VDBService(object):
454
454
  self.logger.error("get_vector_store called with no collection_name.")
455
455
  raise ValueError("collection_name must be provided.")
456
456
 
457
- check_existence = True
458
- # Check for a cached instance and validate its connection before returning.
457
+ # Check for a cached instance. If found, return it immediately.
459
458
  if collection_name in self._instances:
460
- instance = self._instances[collection_name]
461
- is_connected, collection_exists = self._is_good_connection(instance, collection_name)
462
-
463
- if is_connected and collection_exists:
464
- self.logger.info(f"Returning existing vector store instance for collection: {collection_name}")
465
- return instance
466
-
467
- self.logger.warning(f"Cached instance for '{collection_name}' is invalid. Removing it from cache.")
468
- del self._instances[collection_name]
469
-
470
- if is_connected and not collection_exists:
471
- # We know the collection doesn't exist, so no need to check again.
472
- check_existence = False
459
+ self.logger.info(f"Returning existing vector store instance for collection: {collection_name}")
460
+ return self._instances[collection_name]
473
461
 
474
462
  self.logger.info(f"Creating new vector store instance for collection: {collection_name}")
475
463
  if embeddings is None:
476
464
  embeddings = self.get_embeddings()
477
465
 
478
466
  # Ensure the collection exists before proceeding.
479
- self._ensure_collection_exists(collection_name, embeddings, check_existence=check_existence)
467
+ self._ensure_collection_exists(collection_name, embeddings, check_existence=True)
480
468
 
481
469
  # 1. Validate the embedding function before proceeding.
482
470
  try:
@@ -545,26 +533,16 @@ class VDBService(object):
545
533
  self.logger.error("aget_vector_store called with no collection_name.")
546
534
  raise ValueError("collection_name must be provided.")
547
535
 
548
- check_existence = True
536
+ # Check for a cached instance. If found, return it immediately.
549
537
  if collection_name in self._async_instances:
550
- instance = self._async_instances[collection_name]
551
- is_connected, collection_exists = await self._ais_good_connection(instance, collection_name)
552
-
553
- if is_connected and collection_exists:
554
- self.logger.info(f"Returning existing async vector store instance for collection: {collection_name}")
555
- return instance
556
-
557
- self.logger.warning(f"Cached async instance for '{collection_name}' is invalid. Removing it from cache.")
558
- del self._async_instances[collection_name]
559
-
560
- if is_connected and not collection_exists:
561
- check_existence = False
538
+ self.logger.info(f"Returning existing async vector store instance for collection: {collection_name}")
539
+ return self._async_instances[collection_name]
562
540
 
563
541
  self.logger.info(f"Creating new async vector store instance for collection: {collection_name}")
564
542
  if embeddings is None:
565
543
  embeddings = self.get_embeddings()
566
544
 
567
- # await self._aensure_collection_exists(collection_name, embeddings, check_existence=check_existence)
545
+ await self._aensure_collection_exists(collection_name, embeddings, check_existence=True)
568
546
 
569
547
  try:
570
548
  self.logger.info(f"Testing embedding function for collection '{collection_name}'...")
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "crewplus"
9
- version = "0.2.61"
9
+ version = "0.2.62"
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