mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-09 15:26:03 +00:00
后端没修完版
This commit is contained in:
42
src/langbot/pkg/workflow/nodes/plugin_call.py
Normal file
42
src/langbot/pkg/workflow/nodes/plugin_call.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# """Plugin Call Node - invoke a plugin
|
||||
|
||||
# Node metadata is loaded from: ../../templates/metadata/nodes/plugin_call.yaml
|
||||
# """
|
||||
|
||||
# from __future__ import annotations
|
||||
|
||||
# from typing import Any, ClassVar
|
||||
|
||||
# from ..entities import ExecutionContext
|
||||
# from ..node import WorkflowNode, workflow_node, NodePort, NodeConfig
|
||||
|
||||
|
||||
# @workflow_node('plugin_call')
|
||||
# class PluginCallNode(WorkflowNode):
|
||||
# """Plugin call node - invoke a plugin"""
|
||||
|
||||
# type_name = "plugin_call"
|
||||
# category = "action"
|
||||
# icon = "🔌"
|
||||
# name = "plugin_call"
|
||||
# description = "plugin_call"
|
||||
|
||||
# inputs: ClassVar[list[NodePort]] = []
|
||||
# outputs: ClassVar[list[NodePort]] = []
|
||||
# config_schema: ClassVar[list[NodeConfig]] = []
|
||||
|
||||
# async def execute(self, inputs: dict[str, Any], context: ExecutionContext) -> dict[str, Any]:
|
||||
# plugin_name = self.get_config("plugin_name", "")
|
||||
# method_name = self.get_config("method_name", "")
|
||||
# arguments = inputs.get("arguments", {})
|
||||
|
||||
# return {
|
||||
# "result": None,
|
||||
# "success": False,
|
||||
# "error": f"Plugin call '{plugin_name}/{method_name}' not implemented yet",
|
||||
# "_debug": {
|
||||
# "plugin_name": plugin_name,
|
||||
# "method_name": method_name,
|
||||
# "arguments": arguments,
|
||||
# },
|
||||
# }
|
||||
Reference in New Issue
Block a user