Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body:
attributes:
label: What version of camel are you using?
description: Run command `python3 -c 'print(__import__("camel").__version__)'` in your shell and paste the output here.
placeholder: E.g., 0.2.80
placeholder: E.g., 0.2.81a0
validations:
required: true

Expand Down
2 changes: 1 addition & 1 deletion camel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from camel.logger import disable_logging, enable_logging, set_log_level

__version__ = '0.2.80'
__version__ = '0.2.81a0'

__all__ = [
'__version__',
Expand Down
9 changes: 7 additions & 2 deletions camel/agents/chat_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import atexit
import base64
import concurrent.futures
import functools
import hashlib
import inspect
import json
Expand Down Expand Up @@ -3914,8 +3915,11 @@ async def _aexecute_tool(

else:
# Fallback: synchronous call
# Use functools.partial to properly capture args
loop = asyncio.get_running_loop()
result = await loop.run_in_executor(None, lambda: tool(**args))
result = await loop.run_in_executor(
None, functools.partial(tool, **args)
)

except Exception as e:
# Capture the error message to prevent framework crash
Expand Down Expand Up @@ -4742,9 +4746,10 @@ async def _aexecute_tool_from_stream_data(

else:
# Fallback: synchronous call
# Use functools.partial to properly capture args
loop = asyncio.get_running_loop()
result = await loop.run_in_executor(
None, lambda: tool(**args)
None, functools.partial(tool, **args)
)

# Create the tool response message
Expand Down
5 changes: 4 additions & 1 deletion camel/toolkits/function_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
import ast
import asyncio
import functools
import inspect
import logging
import textwrap
Expand Down Expand Up @@ -506,9 +507,11 @@ async def async_call(self, *args: Any, **kwargs: Any) -> Any:
return await self.func(*args, **kwargs)
else:
# Run sync function in executor to avoid blocking event loop
# Use functools.partial to properly capture args/kwargs
loop = asyncio.get_running_loop()
return await loop.run_in_executor(
_SYNC_TOOL_EXECUTOR, lambda: self.func(*args, **kwargs)
_SYNC_TOOL_EXECUTOR,
functools.partial(self.func, *args, **kwargs),
)

@property
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
project = 'CAMEL'
copyright = '2024, CAMEL-AI.org'
author = 'CAMEL-AI.org'
release = '0.2.80'
release = '0.2.81a0'

html_favicon = (
'https://raw.githubusercontent.com/camel-ai/camel/master/misc/favicon.png'
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "camel-ai"
version = "0.2.80"
version = "0.2.81a0"
description = "Communicative Agents for AI Society Study"
authors = [{ name = "CAMEL-AI.org" }]
requires-python = ">=3.10,<3.15"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading