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.

Files changed (25) hide show
  1. {crewplus-0.2.72 → crewplus-0.2.73}/PKG-INFO +1 -1
  2. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/callbacks/async_langfuse_handler.py +6 -2
  3. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/utils/tracing_util.py +6 -2
  4. {crewplus-0.2.72 → crewplus-0.2.73}/pyproject.toml +1 -1
  5. {crewplus-0.2.72 → crewplus-0.2.73}/LICENSE +0 -0
  6. {crewplus-0.2.72 → crewplus-0.2.73}/README.md +0 -0
  7. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/__init__.py +0 -0
  8. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/callbacks/__init__.py +0 -0
  9. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/__init__.py +0 -0
  10. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/azure_chat_model.py +0 -0
  11. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/gemini_chat_model.py +0 -0
  12. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/init_services.py +0 -0
  13. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/model_load_balancer.py +0 -0
  14. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/services/tracing_manager.py +0 -0
  15. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/utils/__init__.py +0 -0
  16. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/utils/schema_action.py +0 -0
  17. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/utils/schema_document_updater.py +0 -0
  18. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/vectorstores/milvus/__init__.py +0 -0
  19. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/vectorstores/milvus/milvus_schema_manager.py +0 -0
  20. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/vectorstores/milvus/schema_milvus.py +0 -0
  21. {crewplus-0.2.72 → crewplus-0.2.73}/crewplus/vectorstores/milvus/vdb_service.py +0 -0
  22. {crewplus-0.2.72 → crewplus-0.2.73}/docs/GeminiChatModel.md +0 -0
  23. {crewplus-0.2.72 → crewplus-0.2.73}/docs/ModelLoadBalancer.md +0 -0
  24. {crewplus-0.2.72 → crewplus-0.2.73}/docs/VDBService.md +0 -0
  25. {crewplus-0.2.72 → crewplus-0.2.73}/docs/index.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crewplus
3
- Version: 0.2.72
3
+ Version: 0.2.73
4
4
  Summary: Base services for CrewPlus AI applications
5
5
  Author-Email: Tim Liu <tim@opsmateai.com>
6
6
  License: MIT
@@ -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
- self.sync_handler = LangfuseCallbackHandler(*args, **kwargs)
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
- """Returns a singleton instance of the async Langfuse handler."""
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
- _ASYNC_LANGFUSE_HANDLER = AsyncLangfuseCallbackHandler()
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:
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "crewplus"
9
- version = "0.2.72"
9
+ version = "0.2.73"
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