feat: 完善知识库数据模型和服务

- 添加知识库更多字段配置
- 优化知识库服务逻辑
- 添加文档解析相关接口

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 23:02:09 +08:00
parent 7a2f6dd30a
commit bb04c4afd0
4 changed files with 137 additions and 27 deletions

View File

@@ -147,6 +147,10 @@ func (h *KnowledgeHandler) UploadDocument(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"success": false, "message": err.Error()})
return
}
if doc == nil {
c.JSON(http.StatusInternalServerError, gin.H{"success": false, "message": "Upload failed"})
return
}
c.JSON(http.StatusOK, gin.H{
"success": true,