mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-25 23:06:28 +00:00
Merge branch 'main' into fix_tool_info
This commit is contained in:
commit
d18aa6f219
4 changed files with 23 additions and 8 deletions
|
|
@ -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 <package>`.
|
||||
|
||||
- Stop a Process: If a process needs to be terminated, use
|
||||
`shell_kill_process(id="...")`.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
8
backend/uv.lock
generated
8
backend/uv.lock
generated
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue