mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-08 20:34:48 +08:00
Align Go parser backends and PDF pipeline with Python (#16676)
Ports remaining Go parser wiring and PDF backends, adds tenant-aware VLM dispatch, aligns post-processing with Python, and adds end-to-end pipeline coverage with a generated six-page PDF.
This commit is contained in:
@@ -123,6 +123,9 @@ func (p *PaddleOCRLocalModel) OCRFile(modelName *string, content []byte, fileURL
|
||||
"file": base64Str,
|
||||
"fileType": fileType,
|
||||
}
|
||||
if ocrConfig != nil && strings.TrimSpace(ocrConfig.Algorithm) != "" {
|
||||
reqData["algorithm"] = ocrConfig.Algorithm
|
||||
}
|
||||
|
||||
jsonData, err := json.Marshal(reqData)
|
||||
if err != nil {
|
||||
@@ -138,6 +141,9 @@ func (p *PaddleOCRLocalModel) OCRFile(modelName *string, content []byte, fileURL
|
||||
}
|
||||
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
if auth := BearerAuth(apiConfig); auth != "" {
|
||||
req.Header.Set("Authorization", auth)
|
||||
}
|
||||
|
||||
resp, err := p.baseModel.httpClient.Do(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -196,6 +196,7 @@ type TTSConfig struct {
|
||||
}
|
||||
|
||||
type OCRConfig struct {
|
||||
Algorithm string
|
||||
}
|
||||
|
||||
type ParseFileConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user