From d000a732457076024d94cab13ba63679115b4192 Mon Sep 17 00:00:00 2001 From: Eduardo Chiarotti Date: Tue, 2 Jul 2024 12:52:29 -0300 Subject: [PATCH] docs: add CodeinterpreterTool to docs and update docs --- docs/tools/CodeInterpreterTool.md | 12 ++++++++++++ mkdocs.yml | 1 + 2 files changed, 13 insertions(+) diff --git a/docs/tools/CodeInterpreterTool.md b/docs/tools/CodeInterpreterTool.md index e66a82e39..cb1bf3ad8 100644 --- a/docs/tools/CodeInterpreterTool.md +++ b/docs/tools/CodeInterpreterTool.md @@ -20,6 +20,7 @@ pip install 'crewai[tools]' Remember that when using this tool, the code must be generated by the Agent itself. The code must be a Python3 code. And it will take some time for the first time to run because it needs to build the Docker image. ```python +from crewai import Agent from crewai_tools import CodeInterpreterTool Agent( @@ -27,3 +28,14 @@ Agent( tools=[CodeInterpreterTool()], ) ``` + +We also provide a simple way to use it directly from the Agent. + +```python +from crewai import Agent + +agent = Agent( + ... + allow_code_execution=True, +) +``` diff --git a/mkdocs.yml b/mkdocs.yml index 92aeba472..e5fccde5b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -149,6 +149,7 @@ nav: - Google Serper Search: 'tools/SerperDevTool.md' - Browserbase Web Loader: 'tools/BrowserbaseLoadTool.md' - Composio Tools: 'tools/ComposioTool.md' + - Code Interpreter Tools: 'tools/CodeInterpreterTool.md' - Scrape Website: 'tools/ScrapeWebsiteTool.md' - Directory Read: 'tools/DirectoryReadTool.md' - Exa Serch Web Loader: 'tools/EXASearchTool.md'