crewplus 0.2.72__tar.gz → 0.2.73__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.
- {crewplus-0.2.72 → crewplus-0.2.73}/PKG-INFO +1 -1
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/callbacks/async_langfuse_handler.py +6 -2
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/utils/tracing_util.py +6 -2
- {crewplus-0.2.72 → crewplus-0.2.73}/pyproject.toml +1 -1
- {crewplus-0.2.72 → crewplus-0.2.73}/LICENSE +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/README.md +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/__init__.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/callbacks/__init__.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/__init__.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/azure_chat_model.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/gemini_chat_model.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/init_services.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/model_load_balancer.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/tracing_manager.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/utils/__init__.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/utils/schema_action.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/utils/schema_document_updater.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/vectorstores/milvus/__init__.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/vectorstores/milvus/milvus_schema_manager.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/vectorstores/milvus/schema_milvus.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/vectorstores/milvus/vdb_service.py +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/docs/GeminiChatModel.md +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/docs/ModelLoadBalancer.md +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/docs/VDBService.md +0 -0
- {crewplus-0.2.72 → crewplus-0.2.73}/docs/index.md +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)
|
|
@@ -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:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|