重构模型管理和配置加载逻辑,支持多模态和推理模型,优化API密钥管理,改进前端模型选择和版本显示

This commit is contained in:
Zylan
2025-03-22 19:37:42 +08:00
parent be8e83d762
commit fa654207c8
13 changed files with 963 additions and 205 deletions

View File

@@ -2,9 +2,10 @@ from abc import ABC, abstractmethod
from typing import Generator, Any
class BaseModel(ABC):
def __init__(self, api_key: str, temperature: float = 0.7, system_prompt: str = None):
def __init__(self, api_key: str, temperature: float = 0.7, system_prompt: str = None, language: str = None):
self.api_key = api_key
self.temperature = temperature
self.language = language
self.system_prompt = system_prompt or self.get_default_system_prompt()
@abstractmethod