documentloaders

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLICommandLoader added in v0.2.0

type CLICommandLoader struct {
	Command string
	Args    []string
}

func NewCLICommandLoader added in v0.2.0

func NewCLICommandLoader(command string, args ...string) *CLICommandLoader

func (*CLICommandLoader) Load added in v0.2.0

type GitLoader

type GitLoader struct {
	// contains filtered or unexported fields
}

GitLoader loads and processes documents from a git repository on the local file system. It uses a ParserRegistry to apply language-specific chunking strategies.

func NewGit

func NewGit(path string, registry parsers.ParserRegistry, opts ...GitLoaderOption) *GitLoader

func (*GitLoader) Load

func (g *GitLoader) Load(ctx context.Context) ([]schema.Document, error)

type GitLoaderOption added in v0.2.0

type GitLoaderOption func(*gitLoaderOptions)

func WithExcludeDirs added in v0.4.0

func WithExcludeDirs(dirs []string) GitLoaderOption

func WithExcludeExts added in v0.4.0

func WithExcludeExts(exts []string) GitLoaderOption

func WithIncludeExts added in v0.2.0

func WithIncludeExts(exts []string) GitLoaderOption

func WithLogger added in v0.2.0

func WithLogger(logger *slog.Logger) GitLoaderOption

type Loader

type Loader interface {
	Load(ctx context.Context) ([]schema.Document, error)
}

type RemoteGitRepoLoader added in v0.2.0

type RemoteGitRepoLoader struct {
	RepoURL        string
	ParserRegistry parsers.ParserRegistry
	Logger         *slog.Logger
}

func NewRemoteGitRepoLoader added in v0.2.0

func NewRemoteGitRepoLoader(repoURL string, registry parsers.ParserRegistry, logger *slog.Logger) *RemoteGitRepoLoader

func (*RemoteGitRepoLoader) Load added in v0.2.0

Jump to

Keyboard shortcuts

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