Files
Hopping-Mad-Games-ComfyUI_L…/__init__.py
TashaSkyUp 7cf82171e5 Make environment management non-polluting and safe
This commit implements a clean architecture where environment variables
are only read, never set, ensuring compatibility with other ComfyUI
packages.

The changes: - Remove all code that sets global environment variables -
Clean up config.yaml to remove API key placeholders - Add documentation
for safe environment handling - Add comprehensive tests to verify
non-polluting behavior - Ensure backward compatibility for other
packages

The commit includes detailed docs explaining the clean architecture and
safety guarantees for package compatibility.
2025-06-25 17:22:53 -06:00

41 lines
1.0 KiB
Python
Executable File

"""
@title: ComfyUI_LiteLLM
@nickname: Tasha
@description: Nodes for interfacing with LiteLLM
"""
import os
import sys
from . import utils
from . import config
CustomDict = utils.custom_dict.CustomDict
python = sys.executable
NODE_DISPLAY_NAME_MAPPINGS = {}
NODE_CLASS_MAPPINGS = {}
WEB_DIRECTORY = "js"
from . import litellmnodes
try:
from .comfyui_lightrag import NODE_CLASS_MAPPINGS as LR_NCM
from .comfyui_lightrag import NODE_DISPLAY_NAME_MAPPINGS as LR_NDNM
NODE_CLASS_MAPPINGS.update(LR_NCM)
NODE_DISPLAY_NAME_MAPPINGS.update(LR_NDNM)
except ImportError:
# LightRAG not available - skip these nodes
pass
from .agents import NODE_CLASS_MAPPINGS as AG_NCM
from .agents import NODE_DISPLAY_NAME_MAPPINGS as AG_NDNM
NODE_CLASS_MAPPINGS.update(AG_NCM)
NODE_DISPLAY_NAME_MAPPINGS.update(AG_NDNM)
NODE_CLASS_MAPPINGS.update(litellmnodes.NODE_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(litellmnodes.NODE_DISPLAY_NAME_MAPPINGS)
__all__ = ['NODE_CLASS_MAPPINGS', "WEB_DIRECTORY", "NODE_DISPLAY_NAME_MAPPINGS","CustomDict"]