feat: 支持多数据库配置与PGVector检索

This commit is contained in:
2026-04-03 17:59:05 +08:00
parent 86c2b7d66e
commit 026beea4d9
12 changed files with 304 additions and 182 deletions

View File

@@ -2,6 +2,7 @@ package service
import (
"context"
"errors"
"fmt"
"rag/common/eino"
"rag/common/gse"
@@ -123,6 +124,9 @@ func (s *documentService) Process(ctx context.Context, req *dto.ProcessDocumentR
if err != nil {
return nil, err
}
if g.IsEmpty(doc) {
return nil, errors.New("document not found")
}
// 2. 使用eino框架进行文件切分并发执行
var vectorDocsCount, chunks int64