mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-07-22 01:16:11 -04:00
55f772c21a
* Docs: fix comment typo * docs: a llm -> an LLM --------- Co-authored-by: Travis Cline <travis.cline@gmail.com>
17 lines
522 B
Go
17 lines
522 B
Go
package documentloaders
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/tmc/langchaingo/schema"
|
|
"github.com/tmc/langchaingo/textsplitter"
|
|
)
|
|
|
|
// Loader is the interface for loading and splitting documents from a source.
|
|
type Loader interface {
|
|
// Load loads from a source and returns documents.
|
|
Load(ctx context.Context) ([]schema.Document, error)
|
|
// LoadAndSplit loads from a source and splits the documents using a text splitter.
|
|
LoadAndSplit(ctx context.Context, splitter textsplitter.TextSplitter) ([]schema.Document, error)
|
|
}
|