mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 12:05:54 +00:00
42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
# """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
|
|
|
|
# from langbot_plugin.api.entities.builtin.workflow.entities import ExecutionContext
|
|
# from ..node import WorkflowNode, workflow_node
|
|
|
|
# @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,
|
|
# },
|
|
# }
|