crewplus 0.2.72__py3-none-any.whl → 0.2.74__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/callbacks/async_langfuse_handler.py +6 -2
- crewplus/utils/tracing_util.py +6 -2
- crewplus/vectorstores/milvus/vdb_service.py +6 -0
- {crewplus-0.2.72.dist-info → crewplus-0.2.74.dist-info}/METADATA +1 -1
- {crewplus-0.2.72.dist-info → crewplus-0.2.74.dist-info}/RECORD +8 -8
- {crewplus-0.2.72.dist-info → crewplus-0.2.74.dist-info}/WHEEL +0 -0
- {crewplus-0.2.72.dist-info → crewplus-0.2.74.dist-info}/entry_points.txt +0 -0
- {crewplus-0.2.72.dist-info → crewplus-0.2.74.dist-info}/licenses/LICENSE +0 -0
|
@@ -42,10 +42,14 @@ class AsyncLangfuseCallbackHandler(AsyncCallbackHandler):
|
|
|
42
42
|
Wraps the synchronous LangfuseCallbackHandler to make it fully compatible with
|
|
43
43
|
LangChain's async methods by handling all relevant events.
|
|
44
44
|
"""
|
|
45
|
-
def __init__(self, *args: Any, **kwargs: Any):
|
|
45
|
+
def __init__(self, sync_handler: Optional[LangfuseCallbackHandler] = None, *args: Any, **kwargs: Any):
|
|
46
46
|
if not LANGFUSE_AVAILABLE:
|
|
47
47
|
raise ImportError("Langfuse is not available. Please install it with 'pip install langfuse'")
|
|
48
|
-
|
|
48
|
+
|
|
49
|
+
if sync_handler:
|
|
50
|
+
self.sync_handler = sync_handler
|
|
51
|
+
else:
|
|
52
|
+
self.sync_handler = LangfuseCallbackHandler(*args, **kwargs)
|
|
49
53
|
|
|
50
54
|
def __getattr__(self, name: str) -> Any:
|
|
51
55
|
return getattr(self.sync_handler, name)
|
crewplus/utils/tracing_util.py
CHANGED
|
@@ -17,10 +17,14 @@ def get_langfuse_handler() -> LangfuseCallbackHandler:
|
|
|
17
17
|
return _get_langfuse_handler()
|
|
18
18
|
|
|
19
19
|
def get_async_langfuse_handler() -> "AsyncLangfuseCallbackHandler":
|
|
20
|
-
"""
|
|
20
|
+
"""
|
|
21
|
+
Returns a singleton instance of the async Langfuse handler, ensuring it
|
|
22
|
+
shares the same underlying synchronous Langfuse handler singleton.
|
|
23
|
+
"""
|
|
21
24
|
global _ASYNC_LANGFUSE_HANDLER
|
|
22
25
|
if _ASYNC_LANGFUSE_HANDLER is None:
|
|
23
|
-
|
|
26
|
+
sync_handler = get_langfuse_handler()
|
|
27
|
+
_ASYNC_LANGFUSE_HANDLER = AsyncLangfuseCallbackHandler(sync_handler=sync_handler)
|
|
24
28
|
return _ASYNC_LANGFUSE_HANDLER
|
|
25
29
|
|
|
26
30
|
def prepare_trace_config(context: Dict[str, Any]) -> RunnableConfig:
|
|
@@ -205,6 +205,12 @@ class VDBService(object):
|
|
|
205
205
|
# Return a copy without the default alias, as it will be added specifically for sync/async clients.
|
|
206
206
|
zilliz_args = self.connection_args.copy()
|
|
207
207
|
zilliz_args.pop('alias', None)
|
|
208
|
+
# 增加 gRPC keepalive 选项来加固连接
|
|
209
|
+
zilliz_args['channel_options'] = [
|
|
210
|
+
('grpc.keepalive_time_ms', 60000), # 每 60 秒发送一次 ping
|
|
211
|
+
('grpc.keepalive_timeout_ms', 20000), # 20 秒内没收到 pong 则认为连接断开
|
|
212
|
+
('grpc.enable_http_proxy', 0),
|
|
213
|
+
]
|
|
208
214
|
return zilliz_args
|
|
209
215
|
else:
|
|
210
216
|
self.logger.error(f"Unsupported vector store provider: {provider}")
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
crewplus-0.2.
|
|
2
|
-
crewplus-0.2.
|
|
3
|
-
crewplus-0.2.
|
|
4
|
-
crewplus-0.2.
|
|
1
|
+
crewplus-0.2.74.dist-info/METADATA,sha256=PAa0VeDtSbp3D9WqgVplcDaiCmWoo0H-HcJU8niPHiI,5424
|
|
2
|
+
crewplus-0.2.74.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
crewplus-0.2.74.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
+
crewplus-0.2.74.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
|
-
crewplus/callbacks/async_langfuse_handler.py,sha256=
|
|
7
|
+
crewplus/callbacks/async_langfuse_handler.py,sha256=8_p7ctgcmDNQgF5vOqA47I0x-3GWsm7zioZcZHgedZk,7163
|
|
8
8
|
crewplus/services/__init__.py,sha256=V1CG8b2NOmRzNgQH7BPl4KVxWSYJH5vfEsW1wVErKNE,375
|
|
9
9
|
crewplus/services/azure_chat_model.py,sha256=iWzJ2GQFSNmwJx-2O5_xKPSB6VVc-7T6bcfFI8_WezA,5521
|
|
10
10
|
crewplus/services/gemini_chat_model.py,sha256=DYqz01H2TIHiCDQesSozVfOsMigno6QGwOtIweg7UHk,40103
|
|
@@ -14,13 +14,13 @@ crewplus/services/tracing_manager.py,sha256=pwNFeA77vnoZMh_AUOnK5TvAaPOOLg5oDnVO
|
|
|
14
14
|
crewplus/utils/__init__.py,sha256=2Gk1n5srFJQnFfBuYTxktdtKOVZyNrFcNaZKhXk35Pw,142
|
|
15
15
|
crewplus/utils/schema_action.py,sha256=GDaBoVFQD1rXqrLVSMTfXYW1xcUu7eDcHsn57XBSnIg,422
|
|
16
16
|
crewplus/utils/schema_document_updater.py,sha256=frvffxn2vbi71fHFPoGb9hq7gH2azmmdq17p-Fumnvg,7322
|
|
17
|
-
crewplus/utils/tracing_util.py,sha256=
|
|
17
|
+
crewplus/utils/tracing_util.py,sha256=ew5VwjTKcY88P2sveIlGqmsNFR5OJ-DjKAHKQzBoTyE,2449
|
|
18
18
|
crewplus/vectorstores/milvus/__init__.py,sha256=OeYv2rdyG7tcREIjBJPyt2TbE54NvyeRoWMe7LwopRE,245
|
|
19
19
|
crewplus/vectorstores/milvus/milvus_schema_manager.py,sha256=-QRav-hzu-XWeJ_yKUMolal_EyMUspSg-nvh5sqlrlQ,11442
|
|
20
20
|
crewplus/vectorstores/milvus/schema_milvus.py,sha256=wwNpfqsKS0xeozZES40IvB0iNwUtpCall_7Hkg0dL1g,27223
|
|
21
|
-
crewplus/vectorstores/milvus/vdb_service.py,sha256=
|
|
21
|
+
crewplus/vectorstores/milvus/vdb_service.py,sha256=P1-j_4YgSnABcrsHqVXYJwCuMXm-q0FUwjprolrm_7A,37890
|
|
22
22
|
docs/GeminiChatModel.md,sha256=zZYyl6RmjZTUsKxxMiC9O4yV70MC4TD-IGUmWhIDBKA,8677
|
|
23
23
|
docs/ModelLoadBalancer.md,sha256=aGHES1dcXPz4c7Y8kB5-vsCNJjriH2SWmjBkSGoYKiI,4398
|
|
24
24
|
docs/VDBService.md,sha256=Dw286Rrf_fsi13jyD3Bo4Sy7nZ_G7tYm7d8MZ2j9hxk,9375
|
|
25
25
|
docs/index.md,sha256=3tlc15uR8lzFNM5WjdoZLw0Y9o1P1gwgbEnOdIBspqc,1643
|
|
26
|
-
crewplus-0.2.
|
|
26
|
+
crewplus-0.2.74.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|