html

package
v0.0.0-...-2abbca2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Title    string
	URL      string
	Markdown string
}

Content represents a scraped web page with its title, URL, and markdown content.

type Loader

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

func NewLoader

func NewLoader(opts ...Option) *Loader

func (Loader) Hash

func (l Loader) Hash() ([]byte, error)

func (Loader) Load

func (l Loader) Load(ctx context.Context) ([]schema.Document, error)

Load loads from a source and returns documents.

func (Loader) LoadAndSplit

func (l Loader) LoadAndSplit(ctx context.Context, splitter textsplitter.TextSplitter) ([]schema.Document, error)

LoadAndSplit loads from a source and splits the documents using a text splitter.

func (Loader) Type

func (l Loader) Type() string

type Option

type Option func(*Loader)

func WithAuto

func WithAuto(auto bool) Option

func WithSelector

func WithSelector(selector string) Option

func WithURL

func WithURL(url string) Option

type RecursiveLoader

type RecursiveLoader struct {
	*Loader
	// contains filtered or unexported fields
}

func NewRecursiveLoader

func NewRecursiveLoader(opts ...RecursiveOption) *RecursiveLoader

func (RecursiveLoader) Hash

func (l RecursiveLoader) Hash() ([]byte, error)

func (RecursiveLoader) Load

Load loads from a source and returns documents.

func (RecursiveLoader) LoadAndSplit

func (l RecursiveLoader) LoadAndSplit(ctx context.Context, splitter textsplitter.TextSplitter) ([]schema.Document, error)

LoadAndSplit loads from a source and splits the documents using a text splitter.

func (RecursiveLoader) Type

func (l RecursiveLoader) Type() string

type RecursiveOption

type RecursiveOption func(*RecursiveLoader)

func WithMaxPages

func WithMaxPages(maxPages int) RecursiveOption

func WithPageLoader

func WithPageLoader(loader *Loader) RecursiveOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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