MCPcopy Create free account
hub / github.com/tmc/langchaingo / NewText

Function NewText

documentloaders/text.go:20–24  ·  view source on GitHub ↗

NewText creates a new text loader with an io.Reader.

(r io.Reader)

Source from the content-addressed store, hash-verified

18
19// NewText creates a new text loader with an io.Reader.
20func NewText(r io.Reader) Text {
21 return Text{
22 r: r,
23 }
24}
25
26// Load reads from the io.Reader and returns a single document with the data.
27func (l Text) Load(_ context.Context) ([]schema.Document, error) {

Callers 5

loadTestDataFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
newLoaderMethod · 0.85
TestTextLoaderFunction · 0.85

Calls

no outgoing calls

Tested by 2

loadTestDataFunction · 0.74
TestTextLoaderFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…