build backend to collect and search using embeddings

This commit is contained in:
2025-01-04 00:15:29 -07:00
parent c4521af5c2
commit 3be1648ee4
16 changed files with 679 additions and 489 deletions

View File

@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS cache (
id INTEGER PRIMARY KEY,
url TEXT NOT NULL UNIQUE,
response TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
ttl INTEGER DEFAULT 0
);
CREATE INDEX idx_url ON cache (url);
CREATE INDEX idx_created_at ON cache (created_at);