文件变更

This commit is contained in:
2026-04-20 14:05:57 +08:00
parent 3c906e91d9
commit 4e981e9dcf
28 changed files with 474 additions and 490 deletions

View File

@@ -5,6 +5,7 @@
import os
from dataclasses import dataclass
from typing import Optional
from dotenv import load_dotenv
# 加载 .env 文件
@@ -25,7 +26,7 @@ class FrontendConfig:
# ==================== 模型配置 ====================
default_model: str = "local" # 更改为local作为默认模型
model_options: dict = None
model_options: Optional[dict] = None
# ==================== 用户配置 ====================
default_user_id: str = "default_user"
@@ -53,7 +54,7 @@ class FrontendConfig:
"""从环境变量加载配置(优先级最高)"""
# API 地址(移除 /chat 后缀)
# 优先级:环境变量 API_URL > 默认值
api_url = os.getenv("API_URL", "http://127.0.0.1:8083")
api_url = os.getenv("API_URL", "http://127.0.0.1:8079")
self.api_base = api_url.replace("/chat", "").rstrip("/")