From 01a898d10df7378edf3c9af1f1d703c93925e865 Mon Sep 17 00:00:00 2001 From: Wendong-Fan Date: Mon, 29 Dec 2025 09:19:48 +0800 Subject: [PATCH] bump up camel version to 0283a0 --- backend/app/utils/agent.py | 3 ++- backend/app/utils/toolkit/terminal_toolkit.py | 18 ++++++++++++++++-- backend/pyproject.toml | 2 +- backend/uv.lock | 8 ++++---- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/backend/app/utils/agent.py b/backend/app/utils/agent.py index b8a2e73e..58906b82 100644 --- a/backend/app/utils/agent.py +++ b/backend/app/utils/agent.py @@ -720,7 +720,8 @@ these tips to maximize your effectiveness: - **Piping**: Use `|` to pass output from one command to another. - **Permissions**: Use `ls -F` to check file permissions. - **Installation**: Use `pip3 install` or `apt-get install` for new - packages. + packages.If you encounter `ModuleNotFoundError` or `ImportError`, install + the missing package with `pip install `. - Stop a Process: If a process needs to be terminated, use `shell_kill_process(id="...")`. diff --git a/backend/app/utils/toolkit/terminal_toolkit.py b/backend/app/utils/toolkit/terminal_toolkit.py index 52ee19f3..c1e01de0 100644 --- a/backend/app/utils/toolkit/terminal_toolkit.py +++ b/backend/app/utils/toolkit/terminal_toolkit.py @@ -65,6 +65,13 @@ class TerminalToolkit(BaseTerminalToolkit, AbstractToolkit): safe_mode=safe_mode, allowed_commands=allowed_commands, clone_current_env=clone_current_env, + install_dependencies=[ + "pandas", + "numpy", + "matplotlib", + "requests", + "openpyxl", + ], ) def _write_to_log(self, log_file: str, content: str) -> None: @@ -134,18 +141,25 @@ class TerminalToolkit(BaseTerminalToolkit, AbstractToolkit): exc_info=True ) - def shell_exec(self, id: str, command: str, block: bool = True) -> str: + def shell_exec( + self, + id: str, + command: str, + block: bool = True, + timeout: float = 20.0, + ) -> str: r"""Executes a shell command in blocking or non-blocking mode. Args: id (str): A unique identifier for the command's session. command (str): The shell command to execute. block (bool, optional): Determines the execution mode. Defaults to True. + timeout (float, optional): Timeout in seconds for blocking mode. Defaults to 20.0. Returns: str: The output of the command execution. """ - result = super().shell_exec(id, command, block) + result = super().shell_exec(id, command, block, timeout) # If the command executed successfully but returned empty output, # provide a clear success message to help the AI agent understand diff --git a/backend/pyproject.toml b/backend/pyproject.toml index a7426903..d4bd6268 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -5,7 +5,7 @@ description = "Add your description here" readme = "README.md" requires-python = ">=3.10,<3.11" dependencies = [ - "camel-ai[eigent]==0.2.82", + "camel-ai[eigent]==0.2.83a0", "fastapi>=0.115.12", "fastapi-babel>=1.0.0", "uvicorn[standard]>=0.34.2", diff --git a/backend/uv.lock b/backend/uv.lock index a4d189a1..e9e6884f 100644 --- a/backend/uv.lock +++ b/backend/uv.lock @@ -249,7 +249,7 @@ dev = [ [package.metadata] requires-dist = [ { name = "aiofiles", specifier = ">=24.1.0" }, - { name = "camel-ai", extras = ["eigent"], specifier = "==0.2.82" }, + { name = "camel-ai", extras = ["eigent"], specifier = "==0.2.83a0" }, { name = "debugpy", specifier = ">=1.8.17" }, { name = "fastapi", specifier = ">=0.115.12" }, { name = "fastapi-babel", specifier = ">=1.0.0" }, @@ -333,7 +333,7 @@ wheels = [ [[package]] name = "camel-ai" -version = "0.2.82" +version = "0.2.83a0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "astor" }, @@ -350,9 +350,9 @@ dependencies = [ { name = "tiktoken" }, { name = "websockets" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/db/12/bc8f7974fc65ea7fbf8dd8859e8c6ec16125107f99751c89c7ea589b2932/camel_ai-0.2.82.tar.gz", hash = "sha256:af03c598cc7483989cf9d8cfe7594cfacc5c1c65b54fcc85e3074bffd07b5723", size = 1084927, upload-time = "2025-12-17T23:05:50.552Z" } +sdist = { url = "https://files.pythonhosted.org/packages/2b/c9/f9fbb92ac69a4dfde6d6edabdb4567d27a4a78f67ea32b402619476dd186/camel_ai-0.2.83a0.tar.gz", hash = "sha256:343398c47f102ad2835bf5215c64d0e8bef1027e25052d4455111aef3602fbbc", size = 1111149, upload-time = "2025-12-28T23:44:41.739Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/87/c1/1f55e49a693c1d002c4ae5b28372be6a6b78f43af814346daa3c753eaa24/camel_ai-0.2.82-py3-none-any.whl", hash = "sha256:52d193070c81d99e3639cfd9c8adc6c071510708dff91bcc01ed0de98785f7a7", size = 1549800, upload-time = "2025-12-17T23:05:48.544Z" }, + { url = "https://files.pythonhosted.org/packages/ce/de/16050d7d4f52e20c69a581bb498bf164b4b8af0b2fc360d70c4708ac3739/camel_ai-0.2.83a0-py3-none-any.whl", hash = "sha256:2093f2c57a9bd630e8eb851104adb8938a1604017f9db9eaac83b60d32481d8d", size = 1579373, upload-time = "2025-12-28T23:44:39.172Z" }, ] [package.optional-dependencies]