前端适配

This commit is contained in:
Miyamizu-MitsuhaSang 2025-11-07 14:31:10 +08:00
parent f8a2195a95
commit ab437dc982
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,3 @@
import os
from typing import Dict, Tuple from typing import Dict, Tuple
import httpx import httpx
@ -10,11 +9,12 @@ from app.api.ai_assist.ai_schemas import AIAnswerResponse, AIAnswerOut, AIQuesti
from app.api.ai_assist.utils.redis_memory import get_chat_history, save_message, clear_chat_history from app.api.ai_assist.utils.redis_memory import get_chat_history, save_message, clear_chat_history
from app.models import User from app.models import User
from app.utils.security import get_current_user from app.utils.security import get_current_user
from settings import settings
ai_router = APIRouter() ai_router = APIRouter()
ZJU_AI_URL = 'https://chat.zju.edu.cn/api/ai/v1/chat/completions' ZJU_AI_URL = 'https://chat.zju.edu.cn/api/ai/v1/chat/completions'
AI_API_KEY = os.getenv("AI_ASSIST_KEY") AI_API_KEY = settings.AI_ASSIST_KEY
MAX_USAGE_PER = 100 MAX_USAGE_PER = 100
CHAT_TTL = 7200 CHAT_TTL = 7200