feat: 实装AI改写结局功能 - 接入DeepSeek API - AI动态生成新结局名称 - 新增rewrite类型结局样式 - 修复请求超时问题

This commit is contained in:
2026-03-05 15:57:51 +08:00
parent 89b5a3b658
commit d47ccd7039
11 changed files with 513 additions and 15 deletions

15
server/test_db.py Normal file
View File

@@ -0,0 +1,15 @@
import asyncio
from app.database import AsyncSessionLocal
from sqlalchemy import text
async def test():
try:
async with AsyncSessionLocal() as session:
result = await session.execute(text('SELECT 1'))
print("数据库连接成功:", result.scalar())
except Exception as e:
print("数据库连接失败:", e)
import traceback
traceback.print_exc()
asyncio.run(test())