Documentation
¶
Overview ¶
Package llmtext provides a processor that converts LLMTextFrame to AggregatedTextFrame using a configurable text aggregator (e.g. sentence-based).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor struct {
*processors.BaseProcessor
Aggregator textaggregator.Aggregator
}
Processor converts LLMTextFrame into AggregatedTextFrame via a text aggregator.
func New ¶
func New(name string, agg textaggregator.Aggregator) *Processor
New returns an LLM text processor. If agg is nil, a default sentence aggregator is used.
func (*Processor) ProcessFrame ¶
func (p *Processor) ProcessFrame(ctx context.Context, f frames.Frame, dir processors.Direction) error
ProcessFrame feeds LLM text into the aggregator and emits AggregatedTextFrame; flushes on end/interruption.
Click to show internal directories.
Click to hide internal directories.