Рабочий вариант

This commit is contained in:
2026-01-31 20:19:44 +03:00
parent e210f483b7
commit c8980abe2b
1307 changed files with 1279 additions and 25 deletions

View File

@@ -1,6 +1,5 @@
-- RAG vector DB schema for Postgres (pgvector).
-- Run once against an empty DB. If RAG_EMBEDDINGS_DIM is not 1536, change vector(1536) below.
-- Usage: psql "$RAG_DB_DSN" -f scripts/schema.sql
-- GigaChat Embeddings = 1024; for OpenAI use vector(1536). Usage: psql "$RAG_DB_DSN" -f scripts/schema.sql
CREATE EXTENSION IF NOT EXISTS vector;
@@ -28,7 +27,7 @@ CREATE TABLE IF NOT EXISTS chunks (
chunk_index INTEGER NOT NULL,
hash TEXT NOT NULL,
content TEXT NOT NULL,
embedding vector(1536) NOT NULL,
embedding vector(1024) NOT NULL,
start_line INTEGER,
end_line INTEGER,
change_type TEXT NOT NULL DEFAULT 'added'