Documentation ¶
Index ¶
- func AsGolc(splitter types.TextSplitter) golcschema.TextSplitter
- func AsLangchain(splitter types.TextSplitter) lcgosplitter.TextSplitter
- func DefaultTextSplitter(filetype string, textSplitterOpts *TextSplitterOpts) types.TextSplitter
- func FromGolc(splitter golcschema.TextSplitter) types.TextSplitter
- func FromLangchain(splitter lcgosplitter.TextSplitter) types.TextSplitter
- func GetTextSplitterConfig(name string) (any, error)
- func LangchainToNative(splitter lcgosplitter.TextSplitter) types.TextSplitter
- func NewLcgoMarkdownSplitter(opts TextSplitterOpts) *lcgosplitter.MarkdownTextSplitter
- func NewLcgoTextSplitter(opts TextSplitterOpts) lcgosplitter.TokenSplitter
- type SplitterFunc
- type TextSplitterOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsGolc ¶
func AsGolc(splitter types.TextSplitter) golcschema.TextSplitter
func AsLangchain ¶
func AsLangchain(splitter types.TextSplitter) lcgosplitter.TextSplitter
func DefaultTextSplitter ¶
func DefaultTextSplitter(filetype string, textSplitterOpts *TextSplitterOpts) types.TextSplitter
func FromGolc ¶
func FromGolc(splitter golcschema.TextSplitter) types.TextSplitter
func FromLangchain ¶
func FromLangchain(splitter lcgosplitter.TextSplitter) types.TextSplitter
func GetTextSplitterConfig ¶
func LangchainToNative ¶
func LangchainToNative(splitter lcgosplitter.TextSplitter) types.TextSplitter
func NewLcgoMarkdownSplitter ¶
func NewLcgoMarkdownSplitter(opts TextSplitterOpts) *lcgosplitter.MarkdownTextSplitter
func NewLcgoTextSplitter ¶
func NewLcgoTextSplitter(opts TextSplitterOpts) lcgosplitter.TokenSplitter
NewLcgoTextSplitter returns a new langchain-go text splitter.
Types ¶
type SplitterFunc ¶
func GetTextSplitterFunc ¶
func GetTextSplitterFunc(name string, config any) (SplitterFunc, error)
type TextSplitterOpts ¶
type TextSplitterOpts struct { ChunkSize int `` /* 154-byte string literal not displayed */ ChunkOverlap int `` /* 168-byte string literal not displayed */ ModelName string `` /* 155-byte string literal not displayed */ EncodingName string `` /* 176-byte string literal not displayed */ }
func NewTextSplitterOpts ¶
func NewTextSplitterOpts() TextSplitterOpts
NewTextSplitterOpts returns the default options for a text splitter.
Click to show internal directories.
Click to hide internal directories.