remove KeyConfig with LLMConfig

This commit is contained in:
2026-02-12 14:34:58 +08:00
parent 1f690914fb
commit 43dad177ab

View File

@@ -126,10 +126,16 @@ class InstantiateConfig(PrintableConfig):
return self.__class__.__name__ return self.__class__.__name__
@dataclass @dataclass
class KeyConfig(InstantiateConfig): class LLMKeyConfig(InstantiateConfig):
llm_name: str = "qwen-plus"
"""name of llm"""
llm_provider:str = "openai"
"""provider of the llm"""
base_url:str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
"""base url; could be used to overwrite the baseurl in llm provider"""
api_key:str = None api_key:str = None
"""api key for llm""" """api key for llm"""
@@ -143,18 +149,6 @@ class KeyConfig(InstantiateConfig):
logger.info("ALI_API_KEY loaded from environ") logger.info("ALI_API_KEY loaded from environ")
@dataclass
class LLMKeyConfig(KeyConfig):
llm_name: str = "qwen-plus"
"""name of llm"""
llm_provider:str = "openai"
"""provider of the llm"""
base_url:str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
"""base url; could be used to overwrite the baseurl in llm provider"""
@dataclass @dataclass
class ToolConfig(InstantiateConfig): class ToolConfig(InstantiateConfig):
use_tool:bool = True use_tool:bool = True