documentloader

package
v0.4.14-rc.22 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

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

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 added in v0.4.12

type ArchiveOpts struct {
	ErrOnUnsupportedFiletype bool
	ErrOnFailedFile          bool
}

type DefaultDocLoaderFuncOpts added in v0.4.12

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 added in v0.4.11

type UnsupportedFileTypeError struct {
	FileType string
}

UnsupportedFileTypeError is returned when a file type is not supported

func (*UnsupportedFileTypeError) Error added in v0.4.11

func (e *UnsupportedFileTypeError) Error() string

func (*UnsupportedFileTypeError) Is added in v0.4.11

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

Directories

Path Synopsis
pdf

Jump to

Keyboard shortcuts

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