From 35a7bc51fc3fb134cdef080c39d87faadca30039 Mon Sep 17 00:00:00 2001 From: jinno Date: Sun, 5 May 2024 14:52:22 +0900 Subject: [PATCH] fix: add ShellTool --- src/codeinterpreterapi/tools/tools.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/codeinterpreterapi/tools/tools.py b/src/codeinterpreterapi/tools/tools.py index 901493f3..f558a290 100644 --- a/src/codeinterpreterapi/tools/tools.py +++ b/src/codeinterpreterapi/tools/tools.py @@ -1,4 +1,4 @@ -from langchain_community.tools.shell.tool import ShellInput +from langchain_community.tools.shell.tool import ShellTool from langchain_community.tools.tavily_search import TavilySearchResults from langchain_core.tools import BaseTool, StructuredTool @@ -39,9 +39,8 @@ def get_python(additional_tools: list[BaseTool], run_handler_func, arun_handler_ @staticmethod def get_shell(additional_tools: list[BaseTool]) -> list[BaseTool]: - # TODO: use ShellInput - # tools = [ShellInput()] - return additional_tools + tools = [ShellTool()] + return additional_tools + tools @staticmethod def get_web_search(additional_tools: list[BaseTool]) -> list[BaseTool]: