Documentation
¶
Index ¶
- type ActorStore
- func (m *ActorStore) Create(actor *db.Actor) error
- func (m *ActorStore) DeleteByID(id id.ID) error
- func (m *ActorStore) GetByID(id id.ID) (*db.Actor, error)
- func (m *ActorStore) List(limit int) ([]db.Actor, error)
- func (m *ActorStore) Search(query string, limit int) ([]db.Actor, error)
- func (m *ActorStore) Update(actor *db.Actor) error
- func (m *ActorStore) Upsert(actor *db.Actor) error
- type FragmentFilter
- type FragmentStore
- func (f *FragmentStore) Create(fragment *db.Fragment) error
- func (f *FragmentStore) DeleteByID(fragmentID id.ID) error
- func (f *FragmentStore) DeleteBySession(sessionID id.ID) error
- func (f *FragmentStore) GetByActor(actorID id.ID, limit int) ([]db.Fragment, error)
- func (f *FragmentStore) GetByID(fragmentID id.ID) (*db.Fragment, error)
- func (f *FragmentStore) GetBySession(sessionID id.ID, limit int) ([]db.Fragment, error)
- func (f *FragmentStore) GetRecentByManager(managerID id.ID, limit int) ([]db.Fragment, error)
- func (f *FragmentStore) GetRecentSessionsByActor(actorID id.ID, limit int) ([]id.ID, error)
- func (f *FragmentStore) SearchByFilter(filter FragmentFilter) ([]db.Fragment, error)
- func (f *FragmentStore) SearchSimilar(embedding pgvector.Vector, sessionID id.ID, limit int) ([]db.Fragment, error)
- func (f *FragmentStore) UpdateContent(fragmentID id.ID, content string) error
- func (f *FragmentStore) UpdateEmbedding(fragmentID id.ID, embedding []float32) error
- func (f *FragmentStore) UpdateID(oldID id.ID, newID id.ID) error
- func (f *FragmentStore) UpdateMetadata(fragmentID id.ID, metadata map[string]interface{}) error
- func (f *FragmentStore) Upsert(fragment *db.Fragment) error
- type MetadataCondition
- type MetadataOperator
- type SessionStore
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorStore ¶
type ActorStore struct {
Store
}
func NewActorStore ¶
func NewActorStore(ctx context.Context, db *gorm.DB) *ActorStore
NewActorStore returns a new ActorStore initialized with the provided context and DB connection
func (*ActorStore) Create ¶
func (m *ActorStore) Create(actor *db.Actor) error
Create inserts a new Actor record into the database
func (*ActorStore) DeleteByID ¶
func (m *ActorStore) DeleteByID(id id.ID) error
DeleteByID removes an Actor record from the database by ID
func (*ActorStore) List ¶
func (m *ActorStore) List(limit int) ([]db.Actor, error)
List returns a slice of Actors up to the specified limit
func (*ActorStore) Search ¶
Search returns a slice of Actors whose names match the given query, up to the limit
type FragmentFilter ¶
type FragmentStore ¶
type FragmentStore struct {
Store
// contains filtered or unexported fields
}
func NewFragmentStore ¶
func NewFragmentStore(ctx context.Context, db *gorm.DB, fragmentTable db.FragmentTable) *FragmentStore
func (*FragmentStore) DeleteByID ¶
func (f *FragmentStore) DeleteByID(fragmentID id.ID) error
func (*FragmentStore) DeleteBySession ¶
func (f *FragmentStore) DeleteBySession(sessionID id.ID) error
func (*FragmentStore) GetByActor ¶
func (*FragmentStore) GetBySession ¶
func (*FragmentStore) GetRecentByManager ¶
func (*FragmentStore) GetRecentSessionsByActor ¶
func (*FragmentStore) SearchByFilter ¶
func (f *FragmentStore) SearchByFilter(filter FragmentFilter) ([]db.Fragment, error)
func (*FragmentStore) SearchSimilar ¶
func (*FragmentStore) UpdateContent ¶
func (f *FragmentStore) UpdateContent(fragmentID id.ID, content string) error
func (*FragmentStore) UpdateEmbedding ¶
func (f *FragmentStore) UpdateEmbedding(fragmentID id.ID, embedding []float32) error
func (*FragmentStore) UpdateMetadata ¶
func (f *FragmentStore) UpdateMetadata(fragmentID id.ID, metadata map[string]interface{}) error
type MetadataCondition ¶
type MetadataCondition struct {
Key string
Value interface{}
Operator MetadataOperator
}
type MetadataOperator ¶
type MetadataOperator string
const ( MetadataOpEquals MetadataOperator = "=" MetadataOpNotEquals MetadataOperator = "!=" MetadataOpContains MetadataOperator = "?" MetadataOpIn MetadataOperator = "IN" )
type SessionStore ¶
type SessionStore struct {
Store
}
func NewSessionStore ¶
func NewSessionStore(ctx context.Context, db *gorm.DB) *SessionStore
Click to show internal directories.
Click to hide internal directories.