feat: 完善知识库数据模型和服务
- 添加知识库更多字段配置 - 优化知识库服务逻辑 - 添加文档解析相关接口 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,7 +98,7 @@ func main() {
|
||||
knowledgeHandler := handler.NewKnowledgeHandler(knowledgeService)
|
||||
var uploadHandler *handler.UploadHandler
|
||||
if uploadService != nil {
|
||||
uploadHandler = handler.NewUploadHandler(uploadService)
|
||||
uploadHandler = handler.NewUploadHandler(uploadService, knowledgeRepo)
|
||||
}
|
||||
|
||||
// 7. 设置路由
|
||||
@@ -216,6 +216,8 @@ func main() {
|
||||
// 上传路由
|
||||
r.POST("/api/file_upload", uploadHandler.Upload)
|
||||
r.DELETE("/api/file_upload/:filename", uploadHandler.Delete)
|
||||
// 文件代理路由(解决 MinIO 内网和 HTTPS 问题)
|
||||
r.GET("/api/file_proxy", uploadHandler.ProxyFile)
|
||||
}
|
||||
|
||||
// 8. 启动服务
|
||||
|
||||
Reference in New Issue
Block a user