Documentation
¶
Index ¶
- type Config
- type ConversationSummary
- type Hybrid
- func (m *Hybrid) AddMessage(ctx context.Context, msg Message) error
- func (m *Hybrid) Clear(ctx context.Context) error
- func (m *Hybrid) Compress(ctx context.Context) error
- func (m *Hybrid) GetMessages(ctx context.Context, limit int) ([]Message, error)
- func (m *Hybrid) GetStats() Stats
- func (m *Hybrid) GetSummary(ctx context.Context) (string, error)
- type InMemory
- func (m *InMemory) AddMessage(ctx context.Context, msg Message) error
- func (m *InMemory) Clear(ctx context.Context) error
- func (m *InMemory) Compress(ctx context.Context) error
- func (m *InMemory) GetMessages(ctx context.Context, limit int) ([]Message, error)
- func (m *InMemory) GetStats() Stats
- func (m *InMemory) GetSummary(ctx context.Context) (string, error)
- type LLMProvider
- type Message
- type Provider
- type SQLite
- func (s *SQLite) AddMessage(ctx context.Context, msg Message) error
- func (s *SQLite) Clear(ctx context.Context) error
- func (s *SQLite) Close() error
- func (s *SQLite) Compress(ctx context.Context) error
- func (s *SQLite) GetMessages(ctx context.Context, limit int) ([]Message, error)
- func (s *SQLite) GetStats() Stats
- func (s *SQLite) GetSummary(ctx context.Context) (string, error)
- type Stats
- type ToolCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
MaxHistoryMessages int
EnableMemoryCompress bool
MemoryCompressThreshold int
KeepRecentCount int
CompressionRatio float32
PersistDirectory string
}
func DefaultConfig ¶
func DefaultConfig() *Config
type ConversationSummary ¶
type ConversationSummary struct {
// contains filtered or unexported fields
}
func NewConversationSummary ¶
func NewConversationSummary() *ConversationSummary
func (*ConversationSummary) AddMessage ¶
func (s *ConversationSummary) AddMessage(msg Message)
func (*ConversationSummary) GetLastUpdated ¶
func (s *ConversationSummary) GetLastUpdated() time.Time
func (*ConversationSummary) GetMessageCount ¶
func (s *ConversationSummary) GetMessageCount() int
func (*ConversationSummary) GetSummary ¶
func (s *ConversationSummary) GetSummary() string
func (*ConversationSummary) SetSummary ¶
func (s *ConversationSummary) SetSummary(summary string)
type Hybrid ¶
type Hybrid struct {
// contains filtered or unexported fields
}
func NewHybrid ¶
func NewHybrid(sessionID string, provider Provider, llmProvider LLMProvider, config *Config) *Hybrid
func (*Hybrid) GetMessages ¶
type InMemory ¶
type InMemory struct {
*agentproviders.SimpleMemoryProvider
// contains filtered or unexported fields
}
func (*InMemory) GetMessages ¶
type LLMProvider ¶
type Message ¶
type Message = agenttypes.Message
type Provider ¶
type Provider interface {
AddMessage(ctx context.Context, msg Message) error
GetMessages(ctx context.Context, limit int) ([]Message, error)
GetSummary(ctx context.Context) (string, error)
Compress(ctx context.Context) error
Clear(ctx context.Context) error
GetStats() Stats
}
func NewInMemory ¶
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
func (*SQLite) GetMessages ¶
Click to show internal directories.
Click to hide internal directories.