Skip to content

Commit 51793e1

Browse files
committed
修改爬虫文档处理
1 parent 5223faa commit 51793e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

componentOpenAI.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ func (component *MarkdownConverter) Run(ctx context.Context, input map[string]in
272272
} else {
273273
document.FilePath = filePath
274274
}
275-
if filePath == "" {
275+
if filePath == "" && document.Markdown == "" {
276276
err := errors.New(funcT("The filePath of MarkdownConverter cannot be empty"))
277277
input[errorKey] = err
278278
return err

routeAdmin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ func funcWebScraper(ctx context.Context, c *app.RequestContext) {
10341034
}
10351035

10361036
// 文档分块,分析处理
1037-
//updateDocumentChunk(ctx, &doc)
1037+
updateDocumentChunk(ctx, &doc)
10381038
}
10391039
}()
10401040

0 commit comments

Comments
 (0)