Documentation
¶
Index ¶
Constants ¶
View Source
const SummaryMaxOutputTokens = 512
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Types ¶
type BaseExtractor ¶
type BaseExtractor struct {
// contains filtered or unexported fields
}
BaseExtractor is the base implementation of an Extractor
type EmbeddingExtractor ¶
type EmbeddingExtractor struct {
BaseExtractor
}
func NewEmbeddingExtractor ¶
func NewEmbeddingExtractor() *EmbeddingExtractor
func (*EmbeddingExtractor) Extract ¶
func (ee *EmbeddingExtractor) Extract( ctx context.Context, appState *models.AppState, messageEvent *models.MessageEvent, ) error
func (*EmbeddingExtractor) Notify ¶
func (ee *EmbeddingExtractor) Notify( ctx context.Context, appState *models.AppState, messageEvents *models.MessageEvent, ) error
type EntityExtractor ¶ added in v0.5.0
type EntityExtractor struct {
BaseExtractor
}
func NewEntityExtractor ¶ added in v0.5.0
func NewEntityExtractor() *EntityExtractor
func (*EntityExtractor) Extract ¶ added in v0.5.0
func (ee *EntityExtractor) Extract( ctx context.Context, appState *models.AppState, messageEvent *models.MessageEvent, ) error
func (*EntityExtractor) Notify ¶ added in v0.5.0
func (ee *EntityExtractor) Notify( ctx context.Context, appState *models.AppState, messageEvents *models.MessageEvent, ) error
type ExtractorError ¶
type ExtractorError struct {
// contains filtered or unexported fields
}
func NewExtractorError ¶
func NewExtractorError(message string, originalError error) *ExtractorError
func (*ExtractorError) Error ¶
func (e *ExtractorError) Error() string
type SummaryExtractor ¶
type SummaryExtractor struct {
BaseExtractor
}
func NewSummaryExtractor ¶
func NewSummaryExtractor() *SummaryExtractor
func (*SummaryExtractor) Extract ¶
func (se *SummaryExtractor) Extract( ctx context.Context, appState *models.AppState, messageEvent *models.MessageEvent, ) error
Extract gets a list of messages created since the last SummaryPoint, determines if the message count exceeds the configured message window, and if so: - determines the new SummaryPoint index, which will one message older than message_window / 2 - summarizes the messages from this new SummaryPoint to the oldest message not yet Summarized.
When summarizing, it adds context from these messages to an existing summary if there is one.
func (*SummaryExtractor) Notify ¶
func (se *SummaryExtractor) Notify( ctx context.Context, appState *models.AppState, messageEvents *models.MessageEvent, ) error
type TokenCountExtractor ¶
type TokenCountExtractor struct {
BaseExtractor
}
func NewTokenCountExtractor ¶
func NewTokenCountExtractor() *TokenCountExtractor
func (*TokenCountExtractor) Extract ¶
func (ee *TokenCountExtractor) Extract( ctx context.Context, appState *models.AppState, messageEvents *models.MessageEvent, ) error
func (*TokenCountExtractor) Notify ¶
func (ee *TokenCountExtractor) Notify( ctx context.Context, appState *models.AppState, messageEvents *models.MessageEvent, ) error
Click to show internal directories.
Click to hide internal directories.