mirror of
https://github.com/ParisNeo/lollms_hub.git
synced 2026-05-04 03:01:01 -04:00
- Refactor conception routes with improved JSON handling - Enhance admin API with carbon tracking and system info - Update node builder dependencies and validation - Streamline OpenAI proxy and reverse proxy logic - Extend CRUD operations for model metadata and servers - Update database migrations and core models - Improve workflow engine and node registry architecture - Refresh admin dashboard templates and UI components
24 lines
697 B
Python
24 lines
697 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Dict, Any
|
|
|
|
class BaseNode(ABC):
|
|
"""
|
|
Base class for all Workflow Architect nodes.
|
|
Provides metadata for the sidebar and the execution interface.
|
|
"""
|
|
node_type: str = ""
|
|
node_title: str = "Unnamed Node"
|
|
node_category: str = "Logic & Routing"
|
|
node_icon: str = "🧩"
|
|
|
|
@classmethod
|
|
def get_frontend_js(cls) -> str:
|
|
"""Returns the Javascript code to register this node in LiteGraph."""
|
|
return ""
|
|
|
|
@abstractmethod
|
|
async def execute(self, engine, node: Dict[str, Any], output_slot_idx: int) -> Any:
|
|
"""
|
|
Executes the backend logic for this node.
|
|
"""
|
|
pass |