mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-19 22:21:04 +08:00
Align Go ingestion boundaries with Python (#16647)
Moves doc_id blob resolution into Parser, tightens chunker/tokenizer to Python output_format semantics, updates extractor list handling, and fixes real-template integration tests.
This commit is contained in:
19
internal/deepdoc/parser/pdf/parse_nocgo.go
Normal file
19
internal/deepdoc/parser/pdf/parse_nocgo.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//go:build !cgo
|
||||
|
||||
package pdf
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
pdf "ragflow/internal/deepdoc/parser/pdf/type"
|
||||
)
|
||||
|
||||
// Parse is the no-CGO stub for the DeepDOC PDF pipeline. The surrounding
|
||||
// parser package converts this into parser.ErrPDFEngineUnavailable.
|
||||
func (p *Parser) Parse(ctx context.Context, data []byte, docAnalyzer pdf.DocAnalyzer) (*pdf.ParseResult, error) {
|
||||
_ = ctx
|
||||
_ = data
|
||||
_ = docAnalyzer
|
||||
return nil, fmt.Errorf("deepdoc/pdf: cgo required")
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
//go:build cgo
|
||||
|
||||
// Package pdfium renders PDF pages using libpdfium (statically linked
|
||||
// at build time via CGO_LDFLAGS). It exists solely to replace pdf_oxide's
|
||||
// RenderPageRaw for use cases where image quality matters for downstream
|
||||
|
||||
Reference in New Issue
Block a user