documentloader

package
v0.0.0-...-1b76ffa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MuPDFConfig any
View Source
var MuPDFGetter func(config any) (LoaderFunc, error) = nil
View Source
var OpenAIOCRConfig any
View Source
var OpenAIOCRGetter func(config any) (LoaderFunc, error) = nil
View Source
var SmartPDFConfig any
View Source
var SmartPDFGetter func(config any) (LoaderFunc, error) = nil

Functions

func AsLangchain

func AsLangchain(loader types.DocumentLoader) lcgodocloaders.Loader

func FromLangchain

func FromLangchain(loader lcgodocloaders.Loader) types.DocumentLoader

func GetDocumentLoaderConfig

func GetDocumentLoaderConfig(name string) (any, error)

Types

type ArchiveOpts

type ArchiveOpts struct {
	ErrOnUnsupportedFiletype bool
	ErrOnFailedFile          bool
}

type DefaultDocLoaderFuncOpts

type DefaultDocLoaderFuncOpts struct {
	Archive ArchiveOpts
}

type LoaderFunc

type LoaderFunc func(ctx context.Context, reader io.Reader) ([]vs.Document, error)

func DefaultDocLoaderFunc

func DefaultDocLoaderFunc(filetype string, opts DefaultDocLoaderFuncOpts) LoaderFunc

func GetDocumentLoaderFunc

func GetDocumentLoaderFunc(name string, config any) (LoaderFunc, error)

type UnsupportedFileTypeError

type UnsupportedFileTypeError struct {
	FileType string
}

UnsupportedFileTypeError is returned when a file type is not supported

func (*UnsupportedFileTypeError) Error

func (e *UnsupportedFileTypeError) Error() string

func (*UnsupportedFileTypeError) Is

func (e *UnsupportedFileTypeError) Is(err error) bool

Directories

Path Synopsis
ocr
pdf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL