Versions in this module Expand all Collapse all v1 v1.0.0 Jul 31, 2023 Changes in this version + var ErrInvalidInputValues = errors.New("invalid input values") + type Buffer struct + AIPrefix string + ChatHistory *ChatMessageHistory + Depth int + HumanPrefix string + InputKey string + MemoryKey string + OutputKey string + ReturnMessages bool + func NewBuffer() *Buffer + func (m *Buffer) Clear() error + func (m *Buffer) LoadMemoryVariables(map[string]any) (map[string]any, error) + func (m *Buffer) MemoryVariables() []string + func (m *Buffer) SaveContext(inputValues, outputValues map[string]any) error + type ChatMessageHistory struct + func NewChatMessageHistory(options ...NewChatMessageOption) *ChatMessageHistory + func (h *ChatMessageHistory) AddAIMessage(text string) + func (h *ChatMessageHistory) AddUserMessage(text string) + func (h *ChatMessageHistory) Clear() + func (h *ChatMessageHistory) Keep(depth int) + func (h *ChatMessageHistory) Messages() []schema.ChatMessage + type NewChatMessageOption func(m *ChatMessageHistory) + func WithPreviousMessages(previousMessages []schema.ChatMessage) NewChatMessageOption