From 5227e3ac583455a8cbebcb07655faf0e69318ae9 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Sat, 4 Jan 2025 18:59:58 +0000 Subject: [PATCH] Update schema for doc embeddings --- trustgraph-base/trustgraph/schema/documents.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/trustgraph-base/trustgraph/schema/documents.py b/trustgraph-base/trustgraph/schema/documents.py index 38add83d..46eee250 100644 --- a/trustgraph-base/trustgraph/schema/documents.py +++ b/trustgraph-base/trustgraph/schema/documents.py @@ -35,6 +35,21 @@ chunk_ingest_queue = topic('chunk-load') ############################################################################ +# Document embeddings are embeddings associated with a chunk + +class ChunkEmbeddings(Record): + chunk = Bytes() + vectors = Array(Array(Double())) + +# This is a 'batching' mechanism for the above data +class DocumentEmbeddings(Record): + metadata = Metadata() + chunks = Array(ChunkEmbeddings()) + +document_embeddings_store_queue = topic('document-embeddings-store') + +############################################################################ + # Doc embeddings query class DocumentEmbeddingsRequest(Record):