feat: implement RAG indexing worker with vector database schema and document embedding support
Build and Release / release (push) Successful in 1m24s

This commit is contained in:
2026-06-04 00:55:41 +07:00
parent 2b07f264b6
commit b9df8d33b3
4 changed files with 71 additions and 59 deletions
+2 -1
View File
@@ -7,13 +7,14 @@ CREATE TABLE IF NOT EXISTS rag_chunks (
project_id UUID REFERENCES projects(id) ON DELETE CASCADE,
chunk_index INT NOT NULL,
content TEXT NOT NULL,
embedding vector(3072),
embedding vector(1536),
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
);
CREATE INDEX idx_rag_chunks_source ON rag_chunks(source_type, source_id);
CREATE INDEX idx_rag_chunks_project ON rag_chunks(project_id);
CREATE INDEX idx_rag_chunks_embedding_hnsw ON rag_chunks USING hnsw (embedding vector_cosine_ops);
CREATE TRIGGER trigger_rag_chunks_updated_at
BEFORE UPDATE ON rag_chunks