liunux4odoo 5c650a8dc3
优化目录结构 (#4058)
* 优化目录结构

* 修改一些测试问题

---------

Co-authored-by: glide-the <2533736852@qq.com>
2024-05-22 13:11:45 +08:00

13 lines
412 B
Python

# LangChain 的 Shell 工具
from langchain.tools.shell import ShellTool
from chatchat.server.pydantic_v1 import Field
from .tools_registry import regist_tool, BaseToolOutput
@regist_tool(title="系统命令")
def shell(query: str = Field(description="The command to execute")):
'''Use Shell to execute system shell commands'''
tool = ShellTool()
return BaseToolOutput(tool.run(tool_input=query))