Files
ragflow/internal/ingestion/component/chunker/pdfcrop_nocgo.go
T
Jin Hai f53518c110 Go: add context, part5 (#17392)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-27 10:20:16 +08:00

24 lines
714 B
Go

//go:build !cgo
// Package chunker — no-CGO fallback for on-demand PDF section cropping.
//
// Without the native PDF backend there is nothing to crop, so the engine is
// always nil and chunks pass through unchanged. The signatures mirror the
// cgo file so token.go can call them unconditionally.
package chunker
import (
"context"
deepdoctype "ragflow/internal/deepdoc/parser/type"
"ragflow/internal/ingestion/component/schema"
)
func newPDFEngineFromUpstream(_ context.Context, _ *gorm.DB, _ schema.ChunkerFromUpstream) (deepdoctype.PDFEngine, error) {
return nil, nil
}
func cropImageChunks(_ context.Context, _ deepdoctype.PDFEngine, chunks []schema.ChunkDoc) []schema.ChunkDoc {
return chunks
}