Versions in this module Expand all Collapse all v0 v0.0.1 Aug 9, 2024 Changes in this version + const DefaultLimit + const DefaultSchema + const DefaultTableName + type SqliteChatMessageHistory struct + Ctx context.Context + DB *sql.DB + DBAddress string + Limit int + Overwrite bool + Schema []byte + Session string + TableName string + func NewSqliteChatMessageHistory(options ...SqliteChatMessageHistoryOption) *SqliteChatMessageHistory + func (h *SqliteChatMessageHistory) AddAIMessage(ctx context.Context, text string) error + func (h *SqliteChatMessageHistory) AddMessage(ctx context.Context, message llms.ChatMessage) error + func (h *SqliteChatMessageHistory) AddUserMessage(ctx context.Context, text string) error + func (h *SqliteChatMessageHistory) Clear(ctx context.Context) error + func (h *SqliteChatMessageHistory) Messages(ctx context.Context) ([]llms.ChatMessage, error) + func (h *SqliteChatMessageHistory) SetMessages(ctx context.Context, messages []llms.ChatMessage) error + type SqliteChatMessageHistoryOption func(m *SqliteChatMessageHistory) + func WithContext(ctx context.Context) SqliteChatMessageHistoryOption + func WithDB(db *sql.DB) SqliteChatMessageHistoryOption + func WithDBAddress(addr string) SqliteChatMessageHistoryOption + func WithLimit(limit int) SqliteChatMessageHistoryOption + func WithOverwrite() SqliteChatMessageHistoryOption + func WithSchema(schema []byte) SqliteChatMessageHistoryOption + func WithSession(session string) SqliteChatMessageHistoryOption + func WithTableName(name string) SqliteChatMessageHistoryOption