feat: 新增多格式文件上传入库与认证体系
- 新增 JWT 认证模块,支持登录/注册/用户管理 - 新增文件上传接口,支持 .txt/.md/.html/.pdf/.docx 等格式解析入库 - 新增检索结果 AI 总结功能 - 新增文本去重缓存机制 - 新增全局认证夹具简化测试 - 新增配置项与环境变量支持 - 完善文档与测试覆盖
This commit is contained in:
@@ -13,6 +13,13 @@ dependencies = [
|
||||
"httpx>=0.28.0",
|
||||
"structlog>=24.4.0",
|
||||
"openai>=1.58.0",
|
||||
"pyjwt>=2.13.0",
|
||||
"bcrypt>=5.0.0",
|
||||
"python-multipart>=0.0.20",
|
||||
"pypdf>=5.1.0",
|
||||
"python-docx>=1.1.2",
|
||||
"pypdfium2>=4.0.0", # PDF 渲染为图片供 OCR 使用
|
||||
"rapidocr-onnxruntime>=1.3.8", # 扫描件 PDF OCR 降级(首次调用时下载约 25MB 模型)
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
@@ -35,6 +42,7 @@ line-length = 120
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "I", "N", "UP", "B"]
|
||||
ignore = ["B008"] # FastAPI Depends() 在默认参数是标准用法,B008 为误报
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
|
||||
Reference in New Issue
Block a user