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 NewLLMHistorySummarizer ¶
func NewLLMHistorySummarizer(opts *LLMHistorySummarizerOptions) *LLMHistorySummarizer
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 NewSlidingWindowHistorySummarizer ¶
func NewSlidingWindowHistorySummarizer(opts *SlidingWindowHistorySummarizerOptions) *SlidingWindowHistorySummarizer
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
}
Click to show internal directories.
Click to hide internal directories.