prune

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(llm core.Client, logger logging.Logger, metrics core.Metrics, maxTokens int) pipeline.Step[*core.RetrievalContext]

Compress creates a context compression step with logger and metrics.

Parameters:

  • llm: LLM client for context compression
  • logger: structured logger (auto-defaults to NoopLogger if nil)
  • metrics: metrics collector (optional, can be nil)
  • maxTokens: maximum tokens in compressed output (default: 300)

Example:

p.AddStep(prune.Compress(llm, logger, metrics, 300))

func Prune

func Prune(
	enhancer core.ResultEnhancer,
	logger logging.Logger,
	metrics core.Metrics,
) pipeline.Step[*core.RetrievalContext]

Prune creates a new context pruning step.

Types

This section is empty.

Jump to

Keyboard shortcuts

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