Files
lollms_hub/app/nodes/base.py
Saifeddine ALOUI 7a40b31eb8 feat: major refactor across admin, conception, and proxy modules
- 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
2026-04-11 02:13:27 +02:00

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