crewplus 0.2.60__py3-none-any.whl → 0.2.62__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.
Potentially problematic release.
This version of crewplus might be problematic. Click here for more details.
- crewplus/vectorstores/milvus/vdb_service.py +10 -31
- {crewplus-0.2.60.dist-info → crewplus-0.2.62.dist-info}/METADATA +1 -1
- {crewplus-0.2.60.dist-info → crewplus-0.2.62.dist-info}/RECORD +6 -6
- {crewplus-0.2.60.dist-info → crewplus-0.2.62.dist-info}/WHEEL +0 -0
- {crewplus-0.2.60.dist-info → crewplus-0.2.62.dist-info}/entry_points.txt +0 -0
- {crewplus-0.2.60.dist-info → crewplus-0.2.62.dist-info}/licenses/LICENSE +0 -0
|
@@ -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
|
-
|
|
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
|
|
461
|
-
|
|
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=
|
|
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
|
-
|
|
536
|
+
# Check for a cached instance. If found, return it immediately.
|
|
549
537
|
if collection_name in self._async_instances:
|
|
550
|
-
instance
|
|
551
|
-
|
|
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
|
-
|
|
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}'...")
|
|
@@ -599,7 +577,8 @@ class VDBService(object):
|
|
|
599
577
|
# After successful synchronous initialization, we hot-swap the alias on the
|
|
600
578
|
# ASYNCHRONOUS client to ensure future async operations use the correct connection.
|
|
601
579
|
self.logger.info(f"Swapping to async alias for instance of collection {collection_name}")
|
|
602
|
-
|
|
580
|
+
# DO NOT get the async client here, get it outside this function
|
|
581
|
+
#await self._get_or_create_async_client()
|
|
603
582
|
vdb.aclient._using = self.async_alias
|
|
604
583
|
|
|
605
584
|
self._async_instances[collection_name] = vdb
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
crewplus-0.2.
|
|
2
|
-
crewplus-0.2.
|
|
3
|
-
crewplus-0.2.
|
|
4
|
-
crewplus-0.2.
|
|
1
|
+
crewplus-0.2.62.dist-info/METADATA,sha256=VYAqDSFvN5iRr63wA0IH3I-sRON-PJbP7JoQ58Fzbd8,5424
|
|
2
|
+
crewplus-0.2.62.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
crewplus-0.2.62.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
+
crewplus-0.2.62.dist-info/licenses/LICENSE,sha256=2_NHSHRTKB_cTcT_GXgcenOCtIZku8j343mOgAguTfc,1087
|
|
5
5
|
crewplus/__init__.py,sha256=m46HkZL1Y4toD619NL47Sn2Qe084WFFSFD7e6VoYKZc,284
|
|
6
6
|
crewplus/callbacks/__init__.py,sha256=YG7ieeb91qEjp1zF0-inEN7mjZ7yT_D2yzdWFT8Z1Ws,63
|
|
7
7
|
crewplus/callbacks/async_langfuse_handler.py,sha256=A4uFeLpvOUdc58M7sZoE65_C1V98u0QCvx5jUquM0pM,7006
|
|
@@ -17,9 +17,9 @@ crewplus/utils/schema_document_updater.py,sha256=frvffxn2vbi71fHFPoGb9hq7gH2azmm
|
|
|
17
17
|
crewplus/vectorstores/milvus/__init__.py,sha256=OeYv2rdyG7tcREIjBJPyt2TbE54NvyeRoWMe7LwopRE,245
|
|
18
18
|
crewplus/vectorstores/milvus/milvus_schema_manager.py,sha256=-QRav-hzu-XWeJ_yKUMolal_EyMUspSg-nvh5sqlrlQ,11442
|
|
19
19
|
crewplus/vectorstores/milvus/schema_milvus.py,sha256=wwNpfqsKS0xeozZES40IvB0iNwUtpCall_7Hkg0dL1g,27223
|
|
20
|
-
crewplus/vectorstores/milvus/vdb_service.py,sha256=
|
|
20
|
+
crewplus/vectorstores/milvus/vdb_service.py,sha256=G8skLhBuAQ33eDVb6_qrFhDyC5zd-0L2hPZenwJCKgE,37749
|
|
21
21
|
docs/GeminiChatModel.md,sha256=zZYyl6RmjZTUsKxxMiC9O4yV70MC4TD-IGUmWhIDBKA,8677
|
|
22
22
|
docs/ModelLoadBalancer.md,sha256=aGHES1dcXPz4c7Y8kB5-vsCNJjriH2SWmjBkSGoYKiI,4398
|
|
23
23
|
docs/VDBService.md,sha256=Dw286Rrf_fsi13jyD3Bo4Sy7nZ_G7tYm7d8MZ2j9hxk,9375
|
|
24
24
|
docs/index.md,sha256=3tlc15uR8lzFNM5WjdoZLw0Y9o1P1gwgbEnOdIBspqc,1643
|
|
25
|
-
crewplus-0.2.
|
|
25
|
+
crewplus-0.2.62.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|