text

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildEmbeddingContent added in v0.1.6

func BuildEmbeddingContent(title, body string, comments []Comment) string

BuildEmbeddingContent constructs the text content used for vector embedding. It combines the title, body, and comments into a single string. Comments with empty bodies are skipped.

Types

type Comment added in v0.1.6

type Comment struct {
	Author string
	Body   string
}

Comment represents a single issue/PR comment for embedding purposes.

type RecursiveCharacterSplitter

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

RecursiveCharacterSplitter splits text recursively by separators.

func NewRecursiveCharacterSplitter

func NewRecursiveCharacterSplitter() *RecursiveCharacterSplitter

NewRecursiveCharacterSplitter creates a new splitter with default config. Default ChunkSize: 2000, ChunkOverlap: 200.

func (*RecursiveCharacterSplitter) SplitText

func (s *RecursiveCharacterSplitter) SplitText(text string) []string

SplitText splits a text into chunks.

type SplitterConfig

type SplitterConfig struct {
	ChunkSize    int
	ChunkOverlap int
	Separators   []string
}

SplitterConfig holds configuration for text splitting.

Jump to

Keyboard shortcuts

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