mirror of
https://github.com/langgenius/dify.git
synced 2026-03-25 00:07:56 +08:00
feat: plugin call dify
This commit is contained in:
16
api/services/plugin/plugin_invoke_service.py
Normal file
16
api/services/plugin/plugin_invoke_service.py
Normal file
@ -0,0 +1,16 @@
|
||||
from collections.abc import Generator
|
||||
from typing import Any
|
||||
|
||||
from core.tools.entities.tool_entities import ToolInvokeMessage
|
||||
from models.account import Tenant
|
||||
|
||||
|
||||
class PluginInvokeService:
|
||||
@classmethod
|
||||
def invoke_tool(cls, user_id: str, tenant: Tenant,
|
||||
tool_provider: str, tool_name: str,
|
||||
tool_parameters: dict[str, Any]) -> Generator[ToolInvokeMessage]:
|
||||
"""
|
||||
Invokes a tool with the given user ID and tool parameters.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user