pangukitsappdev.tool.buildin package¶
Submodules¶
pangukitsappdev.tool.buildin.python_interpreter module¶
- class pangukitsappdev.tool.buildin.python_interpreter.PythonInterpreterTool(*, name: str = 'python_interpreter', description: str = '通过调用python解释器执行代码来解决计算和文件操作类问题', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'pangukitsappdev.tool.buildin.python_interpreter.PythonInterpreterTool.InputParam'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain_core.callbacks.base.BaseCallbackHandler], ~langchain_core.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain_core.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain_core.tools.ToolException], str]]] = False, handle_validation_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~pydantic.error_wrappers.ValidationError], str]]] = False, input_desc: str, output_desc: str = '代码执行结果', principle: str = '请在需要进行数学计算、日期查询或者文件操作等场景使用此工具', func: ~typing.Optional[~typing.Callable[[...], str]] = None, return_type: ~typing.Optional[~typing.Type] = None, tool_input_schema: ~typing.Optional[str] = None, tool_output_schema: ~typing.Optional[str] = None, pangu_function: ~typing.Optional[str] = None, python_sandbox: ~typing.Optional[~pangukitsappdev.tool.python_sandbox.PythonSandBox] = None)¶
基类:
Tool
- args_schema: Type[BaseModel]¶
Pydantic model class to validate and parse the tool’s input arguments.
- python_sandbox: Optional[PythonSandBox]¶