Documentation
¶
Index ¶
- func Save(dir string, s *Session) error
- type Manager
- type Message
- type Session
- func (s *Session) Add(role, content string)
- func (s *Session) AddWithTools(role, content string, toolsUsed []string)
- func (s *Session) ApplyConsolidation(version uint64, keep int) bool
- func (s *Session) History(max int) []Message
- func (s *Session) NeedsConsolidation(memoryWindow int) bool
- func (s *Session) SnapshotForConsolidation(memoryWindow int) (oldMessages []Message, keep int, version uint64, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
Dir string
// contains filtered or unexported fields
}
func NewManager ¶
type Session ¶
type Session struct {
Key string
CreatedAt time.Time
UpdatedAt time.Time
Messages []Message
Metadata map[string]any
// contains filtered or unexported fields
}
func (*Session) AddWithTools ¶ added in v0.2.3
func (*Session) ApplyConsolidation ¶ added in v0.2.3
func (*Session) NeedsConsolidation ¶ added in v0.2.3
Click to show internal directories.
Click to hide internal directories.