🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
feat: Integrate e2b. (#1284)
Will Shang7e206408ca1b
diff --git a/camel/interpreters/__init__.py b/camel/interpreters/__init__.pyindex 715d973b0..efcdb67bc 100644--- a/camel/interpreters/__init__.py+++ b/camel/interpreters/__init__.py@@ -14,6 +14,7 @@from .base import BaseInterpreterfrom .docker_interpreter import DockerInterpreter+from .e2b_interpreter import E2BInterpreterfrom .internal_python_interpreter import InternalPythonInterpreterfrom .interpreter_error import InterpreterErrorfrom .ipython_interpreter import JupyterKernelInterpreter@@ -26,4 +27,5 @@ __all__ = ['SubprocessInterpreter','DockerInterpreter','JupyterKernelInterpreter',+ 'E2BInterpreter',]diff --git a/camel/interpreters/e2b_interpreter.py b/camel/interpreters/e2b_interpreter.pynew file mode 100644index 000000000..d09321444--- /dev/null+++ b/camel/interpreters/e2b_interpreter.py@@ -0,0 +1,136 @@+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+import os+from typing import Any, ClassVar, Dict, List, Optional++from camel.interpreters.base import BaseInterpreter+from camel.interpreters.interpreter_error import InterpreterError+from camel.logger import get_logger+from camel.utils import api_keys_required++logger = get_logger(__name__)+++class E2BInterpreter(BaseInterpreter):+ r"""E2B Code Interpreter implementation.++ Args:+ require_confirm (bool, optional): If True, prompt user before running+ code strings for security. (default: :obj:`True`)+ """++ _CODE_TYPE_MAPPING: ClassVar[Dict[str, Optional[str]]] = {+ "python": None,+ "py3": None,+ "python3": None,+ "py": None,+ "shell": "bash",+ "bash": "bash",+ "sh": "bash",+ "java": "java",+ "javascript": "js",+ "r": "r",+ }++ @api_keys_required("E2B_API_KEY")+ def __init__(+ self,+ require_confirm: bool = True,+ ) -> None:+ from e2b_code_interpreter import Sandbox++ self.require_confirm = require_confirm+ self._sandbox = Sandbox(api_key=os.environ.get("E2B_API_KEY"))++ def __del__(self) -> None:+ r"""Destructor for the E2BInterpreter class.++ This method ensures that the e2b sandbox is killed when the+ interpreter is deleted.+ """+ if (+ hasattr(self, '_sandbox')+ and self._sandbox is not None+ and self._sandbox.is_running()+ ):+ self._sandbox.kill()++ def run(+ self,+ code: str,+ code_type: str,+ ) -> str:+ r"""Executes the given code in the e2b sandbox.++ Args:+ code (str): The code string to execute.+ code_type (str): The type of code to execute (e.g., 'python',+ 'bash').++ Returns:+ str: The string representation of the output of the executed code.++ Raises:+ InterpreterError: If the `code_type` is not supported or if any+ runtime error occurs during the execution of the code.+ """+ if code_type not in self._CODE_TYPE_MAPPING:+ raise InterpreterError(+ f"Unsupported code type {code_type}. "+ f"`{self.__class__.__name__}` only supports "+ f"{', '.join(list(self._CODE_TYPE_MAPPING.keys()))}."+ )+ # Print code for security checking+ if self.require_confirm:+ logger.info(+ f"The following {code_type} code will run on your "+ "e2b sandbox: {code}"+ )+ while True:+ choice = input("Running code? [Y/n]:").lower()+ if choice in ["y", "yes", "ye"]:+ break+ elif choice not in ["no", "n"]:+ continue+ raise InterpreterError(+ "Execution halted: User opted not to run the code. "+ "This choice stops the current operation and any "+ "further code execution."+ )++ if self._CODE_TYPE_MAPPING[code_type] is None:+ execution = self._sandbox.run_code(code)+ else:+ execution = self._sandbox.run_code(+ code=code, language=self._CODE_TYPE_MAPPING[code_type]+ )++ if execution.text and execution.text.lower() != "none":+ return execution.text++ if execution.logs:+ if execution.logs.stdout:+ return ",".join(execution.logs.stdout)+ elif execution.logs.stderr:+ return ",".join(execution.logs.stderr)++ return str(execution.error)++ def supported_code_types(self) -> List[str]:+ r"""Provides supported code types by the interpreter."""+ return list(self._CODE_TYPE_MAPPING.keys())++ def update_action_space(self, action_space: Dict[str, Any]) -> None:+ r"""Updates action space for *python* interpreter"""+ raise RuntimeError("E2B doesn't support " "`action_space`.")diff --git a/camel/toolkits/code_execution.py b/camel/toolkits/code_execution.pyindex d30c5f465..dbc845ecb 100644--- a/camel/toolkits/code_execution.py+++ b/camel/toolkits/code_execution.py@@ -15,6 +15,7 @@ from typing import List, Literal, Optional, Unionfrom camel.interpreters import (DockerInterpreter,+ E2BInterpreter,InternalPythonInterpreter,JupyterKernelInterpreter,SubprocessInterpreter,@@ -41,7 +42,7 @@ class CodeExecutionToolkit(BaseToolkit):def __init__(self,sandbox: Literal[- "internal_python", "jupyter", "docker", "subprocess"+ "internal_python", "jupyter", "docker", "subprocess", "e2b"] = "internal_python",verbose: bool = False,unsafe_mode: bool = False,@@ -58,6 +59,7 @@ class CodeExecutionToolkit(BaseToolkit):JupyterKernelInterpreter,DockerInterpreter,SubprocessInterpreter,+ E2BInterpreter,]if sandbox == "internal_python":@@ -83,6 +85,8 @@ class CodeExecutionToolkit(BaseToolkit):print_stdout=self.verbose,print_stderr=self.verbose,)+ elif sandbox == "e2b":+ self.interpreter = E2BInterpreter(require_confirm=require_confirm)else:raise RuntimeError(f"The sandbox type `{sandbox}` is not supported."diff --git a/docs/key_modules/interpreters.md b/docs/key_modules/interpreters.mdindex 7b673821f..6efc6b896 100644--- a/docs/key_modules/interpreters.md+++ b/docs/key_modules/interpreters.md@@ -17,3 +17,7 @@ executed in an isolated environment.**To utilize this interpreter, you need to have Docker installed on yoursystem.** For more information on Docker installation, visit[Docker's official website](https://docs.docker.com/get-docker/).++### 1.4. E2B Interpreter+You could leverage the E2B sandbox to run the code.+[E2B official documentation](https://e2b.dev/docs)\ No newline at end of filediff --git a/examples/toolkits/code_execution_toolkit.py b/examples/toolkits/code_execution_toolkit.pyindex 0be5a2a8e..696727dbb 100644--- a/examples/toolkits/code_execution_toolkit.py+++ b/examples/toolkits/code_execution_toolkit.py@@ -88,3 +88,39 @@ Agent response:Weng earned $10.20 for babysitting for 51 minutes at a rate of $12 per hour.==============================================================================="""++agent_with_e2b = ChatAgent(+ assistant_sys_msg,+ model,+ tools=CodeExecutionToolkit(verbose=True, sandbox="e2b").get_tools(),+)+agent_with_e2b.reset()++print(Fore.YELLOW + f"user prompt:\n{prompt}\n")++response_with_e2b = agent_with_e2b.step(user_msg)+for msg in response_with_e2b.msgs:+ print_text_animated(Fore.GREEN + f"Agent response:\n{msg.content}\n")++# ruff: noqa: E501+"""+===============================================================================+user prompt:+Weng earns $12 an hour for babysitting. Yesterday, she just did 51 minutes of babysitting. How much did she earn?++Executed the code below:+```py+hourly_wage = 12+minutes_worked = 51+# Convert minutes to hours+hours_worked = minutes_worked / 60+# Calculate earnings+earnings = hourly_wage * hours_worked+earnings+```+> Executed Results:+10.2+Agent response:+Weng earned $10.20 for 51 minutes of babysitting.+===============================================================================+"""diff --git a/poetry.lock b/poetry.lockindex 1c0c647e9..6718f2597 100644--- a/poetry.lock+++ b/poetry.lock@@ -51,24 +51,26 @@ tests = ["hypothesis", "pytest"][[package]]name = "agentops"-version = "0.3.16"+version = "0.3.21"description = "Observability and DevTool Platform for AI Agents"optional = truepython-versions = ">=3.7"files = [- {file = "agentops-0.3.16-py3-none-any.whl", hash = "sha256:7763e65efe053fa81cea2a2e16f015c7603365280972e0c0709eec32c3c8569e"},- {file = "agentops-0.3.16.tar.gz", hash = "sha256:564163eb048939d64e848c7e6caf25d6c0aee31200623ef97efe492f090f8939"},+ {file = "agentops-0.3.21-py3-none-any.whl", hash = "sha256:4f98beecdce4c7cbee80ec26658a9657ba307a1fb2910b589f85325d3259b75b"},+ {file = "agentops-0.3.21.tar.gz", hash = "sha256:d8e8d1f6d154554dba64ec5b139905bf76c68f21575af9fa2ca1697277fe36f2"},][package.dependencies]-packaging = "23.2"-psutil = ">=5.9.8"+opentelemetry-api = ">=1.22.0,<2.0.0"+opentelemetry-exporter-otlp-proto-http = ">=1.22.0,<2.0.0"+opentelemetry-sdk = ">=1.22.0,<2.0.0"+psutil = ">=5.9.8,<6.1.0"PyYAML = ">=5.3,<7.0"requests = ">=2.0.0,<3.0.0"-termcolor = ">=2.3.0"+termcolor = ">=2.3.0,<2.5.0"[package.extras]-dev = ["pytest (==7.4.0)", "requests-mock (==1.11.0)", "tach (>=0.9,<1.0)"]+ci = ["tach (>=0.9,<1.0)"]langchain = ["langchain (==0.2.14)"][[package]]@@ -482,7 +484,7 @@ tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"]name = "av"version = "14.0.1"description = "Pythonic bindings for FFmpeg's libraries."-optional = false+optional = truepython-versions = ">=3.9"files = [{file = "av-14.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b17c4a584da9a68424e64c84069e625fa97dd9fe0a180c07ed514b08ce18491d"},@@ -1576,6 +1578,42 @@ primp = ">=0.8.3"dev = ["mypy (>=1.11.1)", "pytest (>=8.3.1)", "pytest-asyncio (>=0.23.8)", "ruff (>=0.6.1)"]lxml = ["lxml (>=5.2.2)"]+[[package]]+name = "e2b"+version = "1.0.5"+description = "E2B SDK that give agents cloud environments"+optional = true+python-versions = "<4.0,>=3.8"+files = [+ {file = "e2b-1.0.5-py3-none-any.whl", hash = "sha256:a71bdec46f33d3e38e87d475d7fd2939bd7b6b753b819c9639ca211cd375b79e"},+ {file = "e2b-1.0.5.tar.gz", hash = "sha256:43c82705af7b7d4415c2510ff77dab4dc075351e0b769d6adf8e0d7bb4868d13"},+]++[package.dependencies]+attrs = ">=23.2.0"+httpcore = ">=1.0.5,<2.0.0"+httpx = ">=0.27.0,<1.0.0"+packaging = ">=24.1"+protobuf = ">=3.20.0,<6.0.0"+python-dateutil = ">=2.8.2"+typing-extensions = ">=4.1.0"++[[package]]+name = "e2b-code-interpreter"+version = "1.0.3"+description = "E2B Code Interpreter - Stateful code execution"+optional = true+python-versions = "<4.0,>=3.8"+files = [+ {file = "e2b_code_interpreter-1.0.3-py3-none-any.whl", hash = "sha256:c638bd4ec1c99d9c4eaac541bc8b15134cf786f6c7c400d979cef96d62e485d8"},+ {file = "e2b_code_interpreter-1.0.3.tar.gz", hash = "sha256:36475acc001b1317ed129d65970fce6a7cc2d50e3fd3e8a13ad5d7d3e0fac237"},+]++[package.dependencies]+attrs = ">=21.3.0"+e2b = ">=1.0.4,<2.0.0"+httpx = ">=0.20.0,<1.0.0"+[[package]]name = "effdet"version = "0.4.1"@@ -2796,7 +2834,7 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2name = "imageio"version = "2.36.1"description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats."-optional = false+optional = truepython-versions = ">=3.9"files = [{file = "imageio-2.36.1-py3-none-any.whl", hash = "sha256:20abd2cae58e55ca1af8a8dcf43293336a59adf0391f1917bf8518633cfc2cdf"},@@ -2839,26 +2877,22 @@ files = [[[package]]name = "importlib-metadata"-version = "8.5.0"+version = "8.4.0"description = "Read metadata from Python packages"optional = truepython-versions = ">=3.8"files = [- {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"},- {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"},+ {file = "importlib_metadata-8.4.0-py3-none-any.whl", hash = "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1"},+ {file = "importlib_metadata-8.4.0.tar.gz", hash = "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5"},][package.dependencies]-zipp = ">=3.20"+zipp = ">=0.5"[package.extras]-check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"]-cover = ["pytest-cov"]doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"]-enabler = ["pytest-enabler (>=2.2)"]perf = ["ipython"]-test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"]-type = ["pytest-mypy"]+test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"][[package]]name = "importlib-resources"@@ -4904,6 +4938,100 @@ files = [[package.dependencies]et-xmlfile = "*"+[[package]]+name = "opentelemetry-api"+version = "1.27.0"+description = "OpenTelemetry Python API"+optional = true+python-versions = ">=3.8"+files = [+ {file = "opentelemetry_api-1.27.0-py3-none-any.whl", hash = "sha256:953d5871815e7c30c81b56d910c707588000fff7a3ca1c73e6531911d53065e7"},+ {file = "opentelemetry_api-1.27.0.tar.gz", hash = "sha256:ed673583eaa5f81b5ce5e86ef7cdaf622f88ef65f0b9aab40b843dcae5bef342"},+]++[package.dependencies]+deprecated = ">=1.2.6"+importlib-metadata = ">=6.0,<=8.4.0"++[[package]]+name = "opentelemetry-exporter-otlp-proto-common"+version = "1.27.0"+description = "OpenTelemetry Protobuf encoding"+optional = true+python-versions = ">=3.8"+files = [+ {file = "opentelemetry_exporter_otlp_proto_common-1.27.0-py3-none-any.whl", hash = "sha256:675db7fffcb60946f3a5c43e17d1168a3307a94a930ecf8d2ea1f286f3d4f79a"},+ {file = "opentelemetry_exporter_otlp_proto_common-1.27.0.tar.gz", hash = "sha256:159d27cf49f359e3798c4c3eb8da6ef4020e292571bd8c5604a2a573231dd5c8"},+]++[package.dependencies]+opentelemetry-proto = "1.27.0"++[[package]]+name = "opentelemetry-exporter-otlp-proto-http"+version = "1.27.0"+description = "OpenTelemetry Collector Protobuf over HTTP Exporter"+optional = true+python-versions = ">=3.8"+files = [+ {file = "opentelemetry_exporter_otlp_proto_http-1.27.0-py3-none-any.whl", hash = "sha256:688027575c9da42e179a69fe17e2d1eba9b14d81de8d13553a21d3114f3b4d75"},+ {file = "opentelemetry_exporter_otlp_proto_http-1.27.0.tar.gz", hash = "sha256:2103479092d8eb18f61f3fbff084f67cc7f2d4a7d37e75304b8b56c1d09ebef5"},+]++[package.dependencies]+deprecated = ">=1.2.6"+googleapis-common-protos = ">=1.52,<2.0"+opentelemetry-api = ">=1.15,<2.0"+opentelemetry-exporter-otlp-proto-common = "1.27.0"+opentelemetry-proto = "1.27.0"+opentelemetry-sdk = ">=1.27.0,<1.28.0"+requests = ">=2.7,<3.0"++[[package]]+name = "opentelemetry-proto"+version = "1.27.0"+description = "OpenTelemetry Python Proto"+optional = true+python-versions = ">=3.8"+files = [+ {file = "opentelemetry_proto-1.27.0-py3-none-any.whl", hash = "sha256:b133873de5581a50063e1e4b29cdcf0c5e253a8c2d8dc1229add20a4c3830ace"},+ {file = "opentelemetry_proto-1.27.0.tar.gz", hash = "sha256:33c9345d91dafd8a74fc3d7576c5a38f18b7fdf8d02983ac67485386132aedd6"},+]++[package.dependencies]+protobuf = ">=3.19,<5.0"++[[package]]+name = "opentelemetry-sdk"+version = "1.27.0"+description = "OpenTelemetry Python SDK"+optional = true+python-versions = ">=3.8"+files = [+ {file = "opentelemetry_sdk-1.27.0-py3-none-any.whl", hash = "sha256:365f5e32f920faf0fd9e14fdfd92c086e317eaa5f860edba9cdc17a380d9197d"},+ {file = "opentelemetry_sdk-1.27.0.tar.gz", hash = "sha256:d525017dea0ccce9ba4e0245100ec46ecdc043f2d7b8315d56b19aff0904fa6f"},+]++[package.dependencies]+opentelemetry-api = "1.27.0"+opentelemetry-semantic-conventions = "0.48b0"+typing-extensions = ">=3.7.4"++[[package]]+name = "opentelemetry-semantic-conventions"+version = "0.48b0"+description = "OpenTelemetry Semantic Conventions"+optional = true+python-versions = ">=3.8"+files = [+ {file = "opentelemetry_semantic_conventions-0.48b0-py3-none-any.whl", hash = "sha256:a0de9f45c413a8669788a38569c7e0a11ce6ce97861a628cca785deecdc32a1f"},+ {file = "opentelemetry_semantic_conventions-0.48b0.tar.gz", hash = "sha256:12d74983783b6878162208be57c9effcb89dc88691c64992d70bb89dc00daa1a"},+]++[package.dependencies]+deprecated = ">=1.2.6"+opentelemetry-api = "1.27.0"+[[package]]name = "orjson"version = "3.10.12"@@ -5004,13 +5132,13 @@ attrs = ">=19.2.0"[[package]]name = "packaging"-version = "23.2"+version = "24.2"description = "Core utilities for Python packages"optional = false-python-versions = ">=3.7"+python-versions = ">=3.8"files = [- {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},- {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},+ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"},+ {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"},][[package]]@@ -5798,33 +5926,32 @@ files = [[[package]]name = "psutil"-version = "6.1.0"+version = "6.0.0"description = "Cross-platform lib for process and system monitoring in Python."optional = truepython-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7"files = [- {file = "psutil-6.1.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ff34df86226c0227c52f38b919213157588a678d049688eded74c76c8ba4a5d0"},- {file = "psutil-6.1.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:c0e0c00aa18ca2d3b2b991643b799a15fc8f0563d2ebb6040f64ce8dc027b942"},- {file = "psutil-6.1.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:000d1d1ebd634b4efb383f4034437384e44a6d455260aaee2eca1e9c1b55f047"},- {file = "psutil-6.1.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:5cd2bcdc75b452ba2e10f0e8ecc0b57b827dd5d7aaffbc6821b2a9a242823a76"},- {file = "psutil-6.1.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:045f00a43c737f960d273a83973b2511430d61f283a44c96bf13a6e829ba8fdc"},- {file = "psutil-6.1.0-cp27-none-win32.whl", hash = "sha256:9118f27452b70bb1d9ab3198c1f626c2499384935aaf55388211ad982611407e"},- {file = "psutil-6.1.0-cp27-none-win_amd64.whl", hash = "sha256:a8506f6119cff7015678e2bce904a4da21025cc70ad283a53b099e7620061d85"},- {file = "psutil-6.1.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:6e2dcd475ce8b80522e51d923d10c7871e45f20918e027ab682f94f1c6351688"},- {file = "psutil-6.1.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0895b8414afafc526712c498bd9de2b063deaac4021a3b3c34566283464aff8e"},- {file = "psutil-6.1.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9dcbfce5d89f1d1f2546a2090f4fcf87c7f669d1d90aacb7d7582addece9fb38"},- {file = "psutil-6.1.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:498c6979f9c6637ebc3a73b3f87f9eb1ec24e1ce53a7c5173b8508981614a90b"},- {file = "psutil-6.1.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d905186d647b16755a800e7263d43df08b790d709d575105d419f8b6ef65423a"},- {file = "psutil-6.1.0-cp36-cp36m-win32.whl", hash = "sha256:6d3fbbc8d23fcdcb500d2c9f94e07b1342df8ed71b948a2649b5cb060a7c94ca"},- {file = "psutil-6.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:1209036fbd0421afde505a4879dee3b2fd7b1e14fee81c0069807adcbbcca747"},- {file = "psutil-6.1.0-cp37-abi3-win32.whl", hash = "sha256:1ad45a1f5d0b608253b11508f80940985d1d0c8f6111b5cb637533a0e6ddc13e"},- {file = "psutil-6.1.0-cp37-abi3-win_amd64.whl", hash = "sha256:a8fb3752b491d246034fa4d279ff076501588ce8cbcdbb62c32fd7a377d996be"},- {file = "psutil-6.1.0.tar.gz", hash = "sha256:353815f59a7f64cdaca1c0307ee13558a0512f6db064e92fe833784f08539c7a"},+ {file = "psutil-6.0.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a021da3e881cd935e64a3d0a20983bda0bb4cf80e4f74fa9bfcb1bc5785360c6"},+ {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:1287c2b95f1c0a364d23bc6f2ea2365a8d4d9b726a3be7294296ff7ba97c17f0"},+ {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:a9a3dbfb4de4f18174528d87cc352d1f788b7496991cca33c6996f40c9e3c92c"},+ {file = "psutil-6.0.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:6ec7588fb3ddaec7344a825afe298db83fe01bfaaab39155fa84cf1c0d6b13c3"},+ {file = "psutil-6.0.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:1e7c870afcb7d91fdea2b37c24aeb08f98b6d67257a5cb0a8bc3ac68d0f1a68c"},+ {file = "psutil-6.0.0-cp27-none-win32.whl", hash = "sha256:02b69001f44cc73c1c5279d02b30a817e339ceb258ad75997325e0e6169d8b35"},+ {file = "psutil-6.0.0-cp27-none-win_amd64.whl", hash = "sha256:21f1fb635deccd510f69f485b87433460a603919b45e2a324ad65b0cc74f8fb1"},+ {file = "psutil-6.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:c588a7e9b1173b6e866756dde596fd4cad94f9399daf99ad8c3258b3cb2b47a0"},+ {file = "psutil-6.0.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ed2440ada7ef7d0d608f20ad89a04ec47d2d3ab7190896cd62ca5fc4fe08bf0"},+ {file = "psutil-6.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fd9a97c8e94059b0ef54a7d4baf13b405011176c3b6ff257c247cae0d560ecd"},+ {file = "psutil-6.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2e8d0054fc88153ca0544f5c4d554d42e33df2e009c4ff42284ac9ebdef4132"},+ {file = "psutil-6.0.0-cp36-cp36m-win32.whl", hash = "sha256:fc8c9510cde0146432bbdb433322861ee8c3efbf8589865c8bf8d21cb30c4d14"},+ {file = "psutil-6.0.0-cp36-cp36m-win_amd64.whl", hash = "sha256:34859b8d8f423b86e4385ff3665d3f4d94be3cdf48221fbe476e883514fdb71c"},+ {file = "psutil-6.0.0-cp37-abi3-win32.whl", hash = "sha256:a495580d6bae27291324fe60cea0b5a7c23fa36a7cd35035a16d93bdcf076b9d"},+ {file = "psutil-6.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:33ea5e1c975250a720b3a6609c490db40dae5d83a4eb315170c4fe0d8b1f34b3"},+ {file = "psutil-6.0.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:ffe7fc9b6b36beadc8c322f84e1caff51e8703b88eee1da46d1e3a6ae11b4fd0"},+ {file = "psutil-6.0.0.tar.gz", hash = "sha256:8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2"},][package.extras]-dev = ["black", "check-manifest", "coverage", "packaging", "pylint", "pyperf", "pypinfo", "pytest-cov", "requests", "rstcheck", "ruff", "sphinx", "sphinx_rtd_theme", "toml-sort", "twine", "virtualenv", "wheel"]-test = ["pytest", "pytest-xdist", "setuptools"]+test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"][[package]]name = "ptyprocess"@@ -8293,13 +8420,13 @@ tiktoken = ">=0.5.1"[[package]]name = "termcolor"-version = "2.5.0"+version = "2.4.0"description = "ANSI color formatting for output in terminal"optional = true-python-versions = ">=3.9"+python-versions = ">=3.8"files = [- {file = "termcolor-2.5.0-py3-none-any.whl", hash = "sha256:37b17b5fc1e604945c2642c872a3764b5d547a48009871aea3edd3afa180afb8"},- {file = "termcolor-2.5.0.tar.gz", hash = "sha256:998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f"},+ {file = "termcolor-2.4.0-py3-none-any.whl", hash = "sha256:9297c0df9c99445c2412e832e882a7884038a25617c60cea2ad69488d4040d63"},+ {file = "termcolor-2.4.0.tar.gz", hash = "sha256:aab9e56047c8ac41ed798fa36d892a37aca6b3e9159f3e0c24bc64a9b3ac7b7a"},][package.extras]@@ -9968,7 +10095,7 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools",type = ["pytest-mypy"][extras]-all = ["PyMuPDF", "accelerate", "agentops", "anthropic", "apify_client", "arxiv", "arxiv2text", "asknews", "azure-storage-blob", "beautifulsoup4", "botocore", "cohere", "cohere", "datacommons", "datacommons_pandas", "datasets", "diffusers", "discord.py", "docker", "docx2txt", "duckduckgo-search", "ffmpeg-python", "firecrawl-py", "google-cloud-storage", "google-generativeai", "googlemaps", "imageio", "ipykernel", "jupyter_client", "litellm", "mistralai", "nebula3-python", "neo4j", "newspaper3k", "nltk", "notion-client", "openapi-spec-validator", "opencv-python", "pdfplumber", "pillow", "prance", "praw", "pyTelegramBotAPI", "pydub", "pygithub", "pymilvus", "pyowm", "pyyaml", "qdrant-client", "rank-bm25", "redis", "reka-api", "requests_oauthlib", "scholarly", "sentence-transformers", "sentencepiece", "sglang", "slack-bolt", "slack-sdk", "soundfile", "stripe", "tavily-python", "textblob", "torch", "torch", "transformers", "unstructured", "wikipedia", "wolframalpha", "yt-dlp"]+all = ["PyMuPDF", "accelerate", "agentops", "anthropic", "apify_client", "arxiv", "arxiv2text", "asknews", "azure-storage-blob", "beautifulsoup4", "botocore", "cohere", "cohere", "datacommons", "datacommons_pandas", "datasets", "diffusers", "discord.py", "docker", "docx2txt", "duckduckgo-search", "e2b-code-interpreter", "ffmpeg-python", "firecrawl-py", "google-cloud-storage", "google-generativeai", "googlemaps", "imageio", "ipykernel", "jupyter_client", "litellm", "mistralai", "nebula3-python", "neo4j", "newspaper3k", "nltk", "notion-client", "openapi-spec-validator", "opencv-python", "pdfplumber", "pillow", "prance", "praw", "pyTelegramBotAPI", "pydub", "pygithub", "pymilvus", "pyowm", "pyyaml", "qdrant-client", "rank-bm25", "redis", "reka-api", "requests_oauthlib", "scholarly", "sentence-transformers", "sentencepiece", "sglang", "slack-bolt", "slack-sdk", "soundfile", "stripe", "tavily-python", "textblob", "torch", "torch", "transformers", "unstructured", "wikipedia", "wolframalpha", "yt-dlp"]encoders = ["sentence-transformers"]graph-storages = ["nebula3-python", "neo4j"]huggingface-agent = ["accelerate", "datasets", "diffusers", "opencv-python", "sentencepiece", "soundfile", "torch", "torch", "transformers"]@@ -9980,10 +10107,10 @@ retrievers = ["cohere", "rank-bm25"]runtime = ["docker"]search-tools = ["duckduckgo-search", "tavily-python", "wikipedia", "wolframalpha"]test = ["mock", "pytest", "pytest-asyncio"]-tools = ["PyMuPDF", "agentops", "apify_client", "arxiv", "arxiv2text", "asknews", "beautifulsoup4", "datacommons", "datacommons_pandas", "discord.py", "docker", "docx2txt", "duckduckgo-search", "ffmpeg-python", "firecrawl-py", "googlemaps", "imageio", "ipykernel", "jupyter_client", "newspaper3k", "nltk", "notion-client", "openapi-spec-validator", "pdfplumber", "pillow", "prance", "praw", "pyTelegramBotAPI", "pydub", "pygithub", "pyowm", "pyyaml", "requests_oauthlib", "scholarly", "slack-bolt", "slack-sdk", "stripe", "textblob", "unstructured", "wikipedia", "wolframalpha", "yt-dlp"]+tools = ["PyMuPDF", "agentops", "apify_client", "arxiv", "arxiv2text", "asknews", "beautifulsoup4", "datacommons", "datacommons_pandas", "discord.py", "docker", "docx2txt", "duckduckgo-search", "e2b-code-interpreter", "ffmpeg-python", "firecrawl-py", "googlemaps", "imageio", "ipykernel", "jupyter_client", "newspaper3k", "nltk", "notion-client", "openapi-spec-validator", "pdfplumber", "pillow", "prance", "praw", "pyTelegramBotAPI", "pydub", "pygithub", "pyowm", "pyyaml", "requests_oauthlib", "scholarly", "slack-bolt", "slack-sdk", "stripe", "textblob", "unstructured", "wikipedia", "wolframalpha", "yt-dlp"]vector-databases = ["pymilvus", "qdrant-client"][metadata]lock-version = "2.0"python-versions = ">=3.10,<3.13"-content-hash = "2cf66e6e1ed00de5c67edda2170205071f7828e8145c3e25389d99057fa1a94e"+content-hash = "3ad7fa58c20794149695e8c78d160f521a2be93ea0589b487a6250939774b24c"diff --git a/pyproject.toml b/pyproject.tomlindex 78b68704a..72e91e25b 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -85,11 +85,12 @@ slack-sdk = { version = "^3.27.2", optional = true }slack-bolt = { version = "^1.20.1", optional = true }pydub = { version = "^0.25.1", optional = true }pygithub = { version = "^2.3.0", optional = true }-imageio = { extras = ["pyav"], version = "^2.34.2" }+imageio = { extras = ["pyav"], version = "^2.34.2", optional = true }+e2b-code-interpreter = { version = "^1.0.3", optional = true }pyTelegramBotAPI = { version = "^4.18.0", optional = true }"discord.py" = { version = "^2.3.2", optional = true }docker = { version = "^7.1.0", optional = true }-agentops = { version = "^0.3.6", optional = true }+agentops = { version = "^0.3.21", optional = true }azure-storage-blob = { version = "^12.21.0", optional = true }google-cloud-storage = { version = "^2.18.0", optional = true }botocore = { version = "^1.35.3", optional = true }@@ -196,6 +197,7 @@ tools = ["prance","openapi-spec-validator","unstructured",+ "e2b-code-interpreter","firecrawl-py","arxiv","arxiv2text",@@ -285,6 +287,7 @@ all = ["prance","openapi-spec-validator","unstructured",+ "e2b-code-interpreter","nltk","firecrawl-py","arxiv",@@ -457,6 +460,7 @@ module = ["qdrant_client.*","unstructured.*","nltk",+ "e2b_code_interpreter","firecrawl","imageio","rank_bm25",@@ -492,8 +496,5 @@ module = ["notion-client","ffmpeg","yt_dlp",- "cohere.*",- "yaml",- "litellm.*"]ignore_missing_imports = true