Files
dify-plugin-sdks/python/examples/code_based_workflow/tools/llm.py
T
2024-07-24 18:38:30 +08:00

13 lines
415 B
Python

from collections.abc import Generator
from typing import Any
from dify_plugin.tool.entities import ToolInvokeMessage
from dify_plugin.tool.tool import Tool
class LLMTool(Tool):
def _invoke(self, tool_parameters: dict[str, Any]) -> Generator[ToolInvokeMessage]:
return self.invoke_builtin_tool(
provider="dify",
tool_name="llm",
parameters=tool_parameters,
)