LLMNodeConfig
This commit is contained in:
@@ -1 +1,4 @@
|
||||
from lang_agent.config.core_config import InstantiateConfig, ToolConfig, LLMKeyConfig
|
||||
from lang_agent.config.core_config import (InstantiateConfig,
|
||||
ToolConfig,
|
||||
LLMKeyConfig,
|
||||
LLMNodeConfig)
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user