feat: implement RAG indexing worker with vector database schema and document embedding support
Build and Release / release (push) Successful in 1m24s
Build and Release / release (push) Successful in 1m24s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user