Versions in this module Expand all Collapse all v0 v0.4.1 May 10, 2023 v0.4.0 May 10, 2023 Changes in this version + func CleanDB(t *testing.T, db *bun.DB) + func NewPostgresConn(dsn string) *bun.DB + type BaseMemoryStore struct + Client T + func (s *BaseMemoryStore[T]) Attach(observer models.Extractor) + func (s *BaseMemoryStore[T]) NotifyExtractors(ctx context.Context, appState *models.AppState, eventData *models.MessageEvent) + type PgMessageStore struct + Content string + CreatedAt time.Time + DeletedAt time.Time + ID int64 + Metadata map[string]interface{} + Role string + Session *PgSession + SessionID string + TokenCount int + UUID uuid.UUID + UpdatedAt time.Time + func (*PgMessageStore) AfterCreateTable(ctx context.Context, query *bun.CreateTableQuery) error + func (s *PgMessageStore) BeforeCreateTable(_ context.Context, _ *bun.CreateTableQuery) error + type PgMessageVectorStore struct + CreatedAt time.Time + DeletedAt time.Time + Embedding pgvector.Vector + IsEmbedded bool + Message *PgMessageStore + MessageUUID uuid.UUID + Session *PgSession + SessionID string + UUID uuid.UUID + UpdatedAt time.Time + func (*PgMessageVectorStore) AfterCreateTable(ctx context.Context, query *bun.CreateTableQuery) error + func (s *PgMessageVectorStore) BeforeCreateTable(_ context.Context, _ *bun.CreateTableQuery) error + type PgSession struct + CreatedAt time.Time + DeletedAt time.Time + Metadata map[string]interface{} + SessionID string + UUID uuid.UUID + UpdatedAt time.Time + func (*PgSession) AfterCreateTable(ctx context.Context, query *bun.CreateTableQuery) error + func (s *PgSession) BeforeCreateTable(_ context.Context, _ *bun.CreateTableQuery) error + type PgSummaryStore struct + Content string + CreatedAt time.Time + DeletedAt time.Time + Message *PgMessageStore + Metadata map[string]interface{} + Session *PgSession + SessionID string + SummaryPointUUID uuid.UUID + TokenCount int + UUID uuid.UUID + UpdatedAt time.Time + func (*PgSummaryStore) AfterCreateTable(ctx context.Context, query *bun.CreateTableQuery) error + func (s *PgSummaryStore) BeforeCreateTable(_ context.Context, _ *bun.CreateTableQuery) error + type PostgresMemoryStore struct + func NewPostgresMemoryStore(appState *models.AppState, client *bun.DB) (*PostgresMemoryStore, error) + func (pms *PostgresMemoryStore) Close() error + func (pms *PostgresMemoryStore) DeleteSession(ctx context.Context, sessionID string) error + func (pms *PostgresMemoryStore) GetClient() *bun.DB + func (pms *PostgresMemoryStore) GetMemory(ctx context.Context, appState *models.AppState, sessionID string, ...) (*models.Memory, error) + func (pms *PostgresMemoryStore) GetMessageVectors(ctx context.Context, _ *models.AppState, sessionID string, isEmbedded bool) ([]models.Embeddings, error) + func (pms *PostgresMemoryStore) GetSummary(ctx context.Context, _ *models.AppState, sessionID string) (*models.Summary, error) + func (pms *PostgresMemoryStore) OnStart(_ context.Context, _ *models.AppState) error + func (pms *PostgresMemoryStore) PutMemory(ctx context.Context, appState *models.AppState, sessionID string, ...) error + func (pms *PostgresMemoryStore) PutMessageVectors(ctx context.Context, _ *models.AppState, sessionID string, ...) error + func (pms *PostgresMemoryStore) PutSummary(ctx context.Context, _ *models.AppState, sessionID string, ...) error + func (pms *PostgresMemoryStore) SearchMemory(ctx context.Context, appState *models.AppState, sessionID string, ...) ([]models.SearchResult, error) + type StorageError struct + func NewStorageError(message string, originalError error) *StorageError + func (e *StorageError) Error() string