Documentation
¶
Index ¶
- func HierarchicalWhere(scope, project string, argOffset int) (string, []interface{})
- type Client
- func (c *Client) CleanExpired(ctx context.Context) (int, error)
- func (c *Client) Close() error
- func (c *Client) Delete(ctx context.Context, id string) error
- func (c *Client) EnsureEmbeddingDimension(ctx context.Context, dim int) error
- func (c *Client) GetByID(ctx context.Context, id string) (*t.Memory, error)
- func (c *Client) List(ctx context.Context, filter Filter, limit int) ([]t.Memory, error)
- func (c *Client) RunMigrations(ctx context.Context) error
- func (c *Client) Search(ctx context.Context, embedding []float32, filter Filter, limit int) ([]SearchResult, error)
- func (c *Client) SearchWithWhere(ctx context.Context, embedding []float32, where string, ...) ([]SearchResult, error)
- func (c *Client) Stats(ctx context.Context) (*t.StatsResult, error)
- func (c *Client) UpdateWeight(ctx context.Context, id string, weight float64) error
- func (c *Client) Upsert(ctx context.Context, id string, embedding []float32, mem *t.Memory) error
- type Filter
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HierarchicalWhere ¶
HierarchicalWhere builds the OR-based hierarchical filter for recall. With project set: searches global + project-scoped memories. Without project: searches by explicit scope only.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EnsureEmbeddingDimension ¶
EnsureEmbeddingDimension verifies that the embedding column matches the expected vector dimension. On first run (no column), it creates the column. If the table has data with a different dimension, it returns an error.
func (*Client) SearchWithWhere ¶
func (c *Client) SearchWithWhere(ctx context.Context, embedding []float32, where string, whereArgs []interface{}, limit int) ([]SearchResult, error)
SearchWithWhere performs vector search with a custom WHERE clause (for hierarchical recall)
func (*Client) UpdateWeight ¶
type SearchResult ¶
Click to show internal directories.
Click to hide internal directories.