Files
dify-plugin-sdks/python/examples/code_based_workflow/tools/tool.py
T
2024-12-03 15:19:19 +08:00

10 lines
332 B
Python

from collections.abc import Generator
from dify_plugin import Tool
from dify_plugin.entities.tool import ToolInvokeMessage
class ToolTool(Tool):
def _invoke(self, tool_parameters: dict) -> Generator[ToolInvokeMessage, None, None]:
yield self.create_image_message("https://assets.dify.ai/images/dify_logo_dark_s.png")