crewplus 0.2.52__py3-none-any.whl → 0.2.53__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.

@@ -153,8 +153,13 @@ class VDBService(object):
153
153
  self.logger.error(msg)
154
154
  raise ValueError(msg)
155
155
 
156
- self.alias = f"crewplus-vdb-{uuid.uuid4()}"
157
- self.connection_args['alias'] = self.alias
156
+ # Create separate aliases for sync and async clients to avoid connection handler race conditions.
157
+ self.sync_alias = f"crewplus-vdb-sync-{uuid.uuid4()}"
158
+ self.async_alias = f"crewplus-vdb-async-{uuid.uuid4()}"
159
+
160
+ # The default alias in connection_args should be the sync one, as langchain_milvus
161
+ # primarily uses a synchronous client and will pick up this alias.
162
+ self.connection_args['alias'] = self.sync_alias
158
163
 
159
164
  self._client = self._initialize_milvus_client(provider)
160
165
  self._async_client = self._initialize_async_milvus_client(provider)
@@ -183,12 +188,14 @@ class VDBService(object):
183
188
  "user": self.connection_args.get("user"),
184
189
  "password": self.connection_args.get("password"),
185
190
  "db_name": self.connection_args.get("db_name"),
186
- "alias": self.connection_args.get("alias")
187
191
  }
188
192
  return {k: v for k, v in client_args.items() if v is not None}
189
193
 
190
194
  elif provider == "zilliz":
191
- return self.connection_args
195
+ # Return a copy without the default alias, as it will be added specifically for sync/async clients.
196
+ zilliz_args = self.connection_args.copy()
197
+ zilliz_args.pop('alias', None)
198
+ return zilliz_args
192
199
  else:
193
200
  self.logger.error(f"Unsupported vector store provider: {provider}")
194
201
  raise NotImplementedError(f"Vector store provider '{provider}' is not supported.")
@@ -198,6 +205,7 @@ class VDBService(object):
198
205
  Initializes and returns a MilvusClient with a retry mechanism.
199
206
  """
200
207
  client_args = self._get_milvus_client_args(provider)
208
+ client_args["alias"] = self.sync_alias
201
209
 
202
210
  try:
203
211
  # First attempt to connect
@@ -216,6 +224,8 @@ class VDBService(object):
216
224
  Initializes and returns an AsyncMilvusClient with a retry mechanism.
217
225
  """
218
226
  client_args = self._get_milvus_client_args(provider)
227
+ client_args["alias"] = self.async_alias
228
+
219
229
  try:
220
230
  return AsyncMilvusClient(**client_args)
221
231
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crewplus
3
- Version: 0.2.52
3
+ Version: 0.2.53
4
4
  Summary: Base services for CrewPlus AI applications
5
5
  Author-Email: Tim Liu <tim@opsmateai.com>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
- crewplus-0.2.52.dist-info/METADATA,sha256=CpmJOPqhhdAp5S60ZR3agVdmTbtEqOWlcsJrLC6Do54,5459
2
- crewplus-0.2.52.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- crewplus-0.2.52.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- crewplus-0.2.52.dist-info/licenses/LICENSE,sha256=2_NHSHRTKB_cTcT_GXgcenOCtIZku8j343mOgAguTfc,1087
1
+ crewplus-0.2.53.dist-info/METADATA,sha256=Rr4VgoWnm7cdsr11euRhV6bth9s-2eP0y9K9NIrGSzk,5459
2
+ crewplus-0.2.53.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ crewplus-0.2.53.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ crewplus-0.2.53.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=s6nPKmXf-ErCxLOKpYcBhsUct1y2T_vR-wV0Mh9rNN4,31931
20
+ crewplus/vectorstores/milvus/vdb_service.py,sha256=xlMHhf47O5isQnsPMj8rHaDHMkXcTYh-y5BChla09Tw,32538
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.52.dist-info/RECORD,,
25
+ crewplus-0.2.53.dist-info/RECORD,,