Skip to content

Commit

Permalink
fix: add ShellTool
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu007 committed May 5, 2024
1 parent 20063d3 commit 35a7bc5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/codeinterpreterapi/tools/tools.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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]:
Expand Down

0 comments on commit 35a7bc5

Please sign in to comment.