fix: 移除 settings.DEBUG 引用,修复删除 DEBUG 字段后的启动报错

- database.py: echo 改为 False
- main.py: 错误响应直接显示异常信息(不再根据 DEBUG 判断)
- 机器人重复图片回复增加 OCR 识别内容展示
This commit is contained in:
EduBrain Dev
2026-04-14 14:03:01 +08:00
parent 2954f3cb5e
commit 8152494fdc
2 changed files with 3 additions and 3 deletions

View File

@@ -33,13 +33,13 @@ if IS_SQLITE:
engine = create_async_engine(
f"sqlite+aiosqlite:///{sqlite_path}",
echo=settings.DEBUG,
echo=False,
)
else:
# PostgreSQL 配置
engine = create_async_engine(
DB_URL,
echo=settings.DEBUG,
echo=False,
poolclass=NullPool,
pool_pre_ping=True,
)