from typing import Any

from langchain.tools.base import BaseTool

from app.service.chat_robot.script.prompt import TUTORIAL_TOOL_RETURN


# 处理系统引导教程相关的输入
class CustomTutorialTool(BaseTool):
    name = "tutorial_tool"

    description = ("Utilize this tool to retrieve specific statements related to user guidance tutorials."
                   "Input is an empty string")

    def _run(self, tool_input, **kwargs: Any) -> str:
        return TUTORIAL_TOOL_RETURN

    async def _arun(self, tool_input, **kwargs: Any) -> str:
        raise NotImplementedError("CustomTutorialTool does not support async")
