feat: 优化后端知识库服务和文档解析

- 更新文档解析客户端
- 优化知识库服务逻辑
- 更新 protobuf 定义

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 15:02:55 +08:00
parent d24b29afe4
commit 0a9f6e278e
4 changed files with 236 additions and 53 deletions

View File

@@ -10,9 +10,17 @@ import (
// ParsingConfig 解析配置
type ParsingConfig struct {
Engine string `json:"engine"` // markitdown / docling
DoclingURL string `json:"docling_url"` // Docling 服务 URL
EnablePDF bool `json:"enable_pdf"` // 是否启用 PDF 解析
DoclingURL string `json:"docling_url"` // Docling 服务 URL
EnablePDF bool `json:"enable_pdf"` // 是否启用 PDF 解析
Pandoc bool `json:"pandoc"` // 是否启用 Pandoc
// VLM 配置(用于图片 OCR 等)
VLMEnabled bool `json:"vlm_enabled"` // 是否启用 VLM
VLMProvider string `json:"vlm_provider"` // VLM 提供商: openai, anthropic, local 等
VLMModel string `json:"vlm_model"` // 模型名称
VLMAPIKey string `json:"vlm_api_key"` // API Key
VLMBaseURL string `json:"vlm_base_url"` // 自定义 API 地址
VLMPrompt string `json:"vlm_prompt"` // 自定义提示词
}
// Scan 实现 sql.Scanner 接口