123456789101112 |
- from collections.abc import Generator
- from typing import Any
- from dify_plugin import Tool
- from dify_plugin.entities.tool import ToolInvokeMessage
- class {{plugin_name}}Tool(Tool):
- def _invoke(self, tool_parameters: dict[str, Any]) -> Generator[ToolInvokeMessage]:
- yield self.create_json_message({
- "result": "Hello, world!"
- })
|