Documentation
¶
Overview ¶
Package llmfullresponse provides a processor that aggregates LLM text between LLMFullResponseStartFrame and LLMFullResponseEndFrame and invokes a callback on completion or interruption.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OnCompletion ¶
OnCompletion is called when a full response ends (completed=true) or is interrupted (completed=false). Text is the aggregated content so far.
type Processor ¶
type Processor struct {
*processors.BaseProcessor
OnCompletion OnCompletion
// contains filtered or unexported fields
}
Processor aggregates LLMTextFrame between start/end frames and calls OnCompletion.
func New ¶
func New(name string, onCompletion OnCompletion) *Processor
New returns an LLM full-response aggregator. onCompletion may be nil.
func (*Processor) ProcessFrame ¶
func (p *Processor) ProcessFrame(ctx context.Context, f frames.Frame, dir processors.Direction) error
ProcessFrame accumulates LLM text; forwards all frames; calls OnCompletion on end or interruption.
Click to show internal directories.
Click to hide internal directories.