Skip to content

Commit d18aa6f

Browse files
committed
Merge branch 'main' into fix_tool_info
2 parents 1d39b30 + 597dd4b commit d18aa6f

4 files changed

Lines changed: 23 additions & 8 deletions

File tree

backend/app/utils/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,8 @@ async def developer_agent(options: Chat):
720720
- **Piping**: Use `|` to pass output from one command to another.
721721
- **Permissions**: Use `ls -F` to check file permissions.
722722
- **Installation**: Use `pip3 install` or `apt-get install` for new
723-
packages.
723+
packages.If you encounter `ModuleNotFoundError` or `ImportError`, install
724+
the missing package with `pip install <package>`.
724725
725726
- Stop a Process: If a process needs to be terminated, use
726727
`shell_kill_process(id="...")`.

backend/app/utils/toolkit/terminal_toolkit.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ def __init__(
6565
safe_mode=safe_mode,
6666
allowed_commands=allowed_commands,
6767
clone_current_env=clone_current_env,
68+
install_dependencies=[
69+
"pandas",
70+
"numpy",
71+
"matplotlib",
72+
"requests",
73+
"openpyxl",
74+
],
6875
)
6976

7077
def _write_to_log(self, log_file: str, content: str) -> None:
@@ -134,18 +141,25 @@ def _run_coro_in_thread(coro,task_lock):
134141
exc_info=True
135142
)
136143

137-
def shell_exec(self, id: str, command: str, block: bool = True) -> str:
144+
def shell_exec(
145+
self,
146+
id: str,
147+
command: str,
148+
block: bool = True,
149+
timeout: float = 20.0,
150+
) -> str:
138151
r"""Executes a shell command in blocking or non-blocking mode.
139152
140153
Args:
141154
id (str): A unique identifier for the command's session.
142155
command (str): The shell command to execute.
143156
block (bool, optional): Determines the execution mode. Defaults to True.
157+
timeout (float, optional): Timeout in seconds for blocking mode. Defaults to 20.0.
144158
145159
Returns:
146160
str: The output of the command execution.
147161
"""
148-
result = super().shell_exec(id, command, block)
162+
result = super().shell_exec(id, command, block, timeout)
149163

150164
# If the command executed successfully but returned empty output,
151165
# provide a clear success message to help the AI agent understand

backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.10,<3.11"
77
dependencies = [
8-
"camel-ai[eigent]==0.2.82",
8+
"camel-ai[eigent]==0.2.83a0",
99
"fastapi>=0.115.12",
1010
"fastapi-babel>=1.0.0",
1111
"uvicorn[standard]>=0.34.2",

backend/uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)