chore: mini-openclaw 初始版本
Next.js 前端 + FastAPI/LangChain 后端透明 agent平台 - 含 .gitignore, 敏感文件(sessions数据/.env/venv等)已排除 - 待后续添加 trajectory 自进化机制
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""Python REPL Tool — wraps LangChain experimental PythonREPLTool."""
|
||||
|
||||
from langchain_core.tools import BaseTool
|
||||
from langchain_experimental.tools import PythonREPLTool
|
||||
|
||||
|
||||
def create_python_repl_tool() -> BaseTool:
|
||||
tool = PythonREPLTool()
|
||||
tool.name = "python_repl"
|
||||
tool.description = (
|
||||
"Execute Python code in an interactive REPL environment. "
|
||||
"Use this for calculations, data processing, running scripts, "
|
||||
"and any task that benefits from programmatic execution. "
|
||||
"Input should be valid Python code. "
|
||||
"Use print() to see output."
|
||||
)
|
||||
return tool
|
||||
Reference in New Issue
Block a user