Documentation
¶
Overview ¶
Package inmemory provides an in-memory vector store for memoryrails.
It uses brute-force cosine similarity search and is suitable for development, testing, and small-scale applications (< 10K memories). Data is not persisted across restarts.
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) Delete(_ context.Context, id string) error
- func (s *Store) Get(_ context.Context, id string) (*memoryrails.Memory, error)
- func (s *Store) Len() int
- func (s *Store) List(_ context.Context, opts memoryrails.ListOptions) ([]*memoryrails.Memory, error)
- func (s *Store) Put(_ context.Context, memory *memoryrails.Memory) error
- func (s *Store) Search(_ context.Context, embedding []float64, opts memoryrails.SearchOptions) ([]memoryrails.SearchResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an in-memory vector store using brute-force cosine similarity.
func (*Store) List ¶
func (s *Store) List(_ context.Context, opts memoryrails.ListOptions) ([]*memoryrails.Memory, error)
func (*Store) Search ¶
func (s *Store) Search(_ context.Context, embedding []float64, opts memoryrails.SearchOptions) ([]memoryrails.SearchResult, error)
Click to show internal directories.
Click to hide internal directories.