summariser

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLMHistorySummarizer

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

func (*LLMHistorySummarizer) Summarize

func (s *LLMHistorySummarizer) Summarize(ctx context.Context, msgIdToRunId map[string]string, messages []responses.InputMessageUnion, usage *responses.Usage) (*core.SummaryResult, error)

type LLMHistorySummarizerOptions

type LLMHistorySummarizerOptions struct {
	LLM             llm.Provider
	Instruction     core.SystemPromptProvider
	TokenThreshold  int
	KeepRecentCount int // Optional: defaults to 5
	Parameters      responses.Parameters
}

type Run

type Run struct {
	RunID    string
	Messages []responses.InputMessageUnion
}

type SlidingWindowHistorySummarizer

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

func (*SlidingWindowHistorySummarizer) Summarize

func (s *SlidingWindowHistorySummarizer) Summarize(ctx context.Context, msgIdToRunId map[string]string, messages []responses.InputMessageUnion, usage *responses.Usage) (*core.SummaryResult, error)

Summarize implements the HistorySummarizer interface. For sliding window, we simply keep the most recent N runs and discard the rest. We don't create a summary message, we just return which messages to keep.

type SlidingWindowHistorySummarizerOptions

type SlidingWindowHistorySummarizerOptions struct {
	KeepCount int // Number of recent runs to keep
}

Jump to

Keyboard shortcuts

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