LLMNodeConfig

This commit is contained in:
2026-02-12 14:53:52 +08:00
parent 156186bfae
commit 1972c182d8
2 changed files with 18 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
from dataclasses import dataclass, is_dataclass, fields, MISSING
from typing import Any, Tuple, Type
from typing import Any, Tuple, Type, Optional
import yaml
from pathlib import Path
from typing import Dict
@@ -149,6 +149,19 @@ class LLMKeyConfig(InstantiateConfig):
logger.info("ALI_API_KEY loaded from environ")
@dataclass
class LLMNodeConfig(LLMKeyConfig):
"""
class is for LLM nodes that has system prompt config
"""
pipeline_id: Optional[str] = None
"""If set, load prompts from database (with file fallback)"""
prompt_set_id: Optional[str] = None
"""If set, load from this specific prompt set instead of the active one"""
@dataclass
class ToolConfig(InstantiateConfig):
use_tool:bool = True