mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-09-08 10:14:35 +08:00
f53518c110
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
24 lines
714 B
Go
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
|
|
}
|