MCPcopy Create free account
hub / github.com/cloudwego/eino-examples / main

Function main

components/document/parser/textparser/text_parser.go:28–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26)
27
28func main() {
29 ctx := context.Background()
30
31 textParser := parser.TextParser{}
32 docs, err := textParser.Parse(ctx, strings.NewReader("hello world"))
33 if err != nil {
34 logs.Errorf("TextParser{}.Parse failed, err=%v", err)
35 return
36 }
37
38 logs.Infof("text content: %v", docs[0].Content)
39}

Callers

nothing calls this directly

Calls 3

ErrorfFunction · 0.92
InfofFunction · 0.92
ParseMethod · 0.80

Tested by

no test coverage detected