feat: embeddings table + projector handlers (pure-Python cosine, T88)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
-- Embeddings stored as JSON arrays (pure-Python cosine at query time).
|
||||
-- Phase 4.5+ may swap to sqlite-vec when the host Python supports
|
||||
-- loadable extensions; the schema is intentionally simple to make that
|
||||
-- migration straightforward.
|
||||
CREATE TABLE embeddings (
|
||||
memory_id INTEGER PRIMARY KEY,
|
||||
vector_json TEXT NOT NULL, -- JSON array of floats, length = dim
|
||||
model TEXT NOT NULL,
|
||||
dim INTEGER NOT NULL,
|
||||
indexed_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
FOREIGN KEY (memory_id) REFERENCES memories(id)
|
||||
);
|
||||
|
||||
CREATE INDEX embeddings_model_idx ON embeddings(model);
|
||||
Reference in New Issue
Block a user