camel-ai 0.2.73a0__py3-none-any.whl → 0.2.73a2__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 camel-ai might be problematic. Click here for more details.

camel/__init__.py CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  from camel.logger import disable_logging, enable_logging, set_log_level
16
16
 
17
- __version__ = '0.2.73a0'
17
+ __version__ = '0.2.73a2'
18
18
 
19
19
  __all__ = [
20
20
  '__version__',
@@ -2929,7 +2929,32 @@ class ChatAgent(BaseAgent):
2929
2929
  if function_name in self._internal_tools:
2930
2930
  tool = self._internal_tools[function_name]
2931
2931
  try:
2932
- result = await tool.async_call(**args)
2932
+ # Try different invocation paths in order of preference
2933
+ if hasattr(tool, 'func') and hasattr(
2934
+ tool.func, 'async_call'
2935
+ ):
2936
+ # Case: FunctionTool wrapping an MCP tool
2937
+ result = await tool.func.async_call(**args)
2938
+
2939
+ elif hasattr(tool, 'async_call') and callable(
2940
+ tool.async_call
2941
+ ):
2942
+ # Case: tool itself has async_call
2943
+ result = await tool.async_call(**args)
2944
+
2945
+ elif hasattr(tool, 'func') and asyncio.iscoroutinefunction(
2946
+ tool.func
2947
+ ):
2948
+ # Case: tool wraps a direct async function
2949
+ result = await tool.func(**args)
2950
+
2951
+ elif asyncio.iscoroutinefunction(tool):
2952
+ # Case: tool is itself a coroutine function
2953
+ result = await tool(**args)
2954
+
2955
+ else:
2956
+ # Fallback: synchronous call
2957
+ result = tool(**args)
2933
2958
 
2934
2959
  # Only record the tool response message, not the assistant
2935
2960
  # message assistant message with tool_calls was already
@@ -88,6 +88,7 @@ from .message_agent_toolkit import AgentCommunicationToolkit
88
88
  from .web_deploy_toolkit import WebDeployToolkit
89
89
  from .screenshot_toolkit import ScreenshotToolkit
90
90
  from .message_integration import ToolkitMessageIntegration
91
+ from .notion_mcp_toolkit import NotionMCPToolkit
91
92
 
92
93
  __all__ = [
93
94
  'BaseToolkit',
@@ -165,4 +166,5 @@ __all__ = [
165
166
  'ScreenshotToolkit',
166
167
  'RegisteredAgentToolkit',
167
168
  'ToolkitMessageIntegration',
169
+ 'NotionMCPToolkit',
168
170
  ]