mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-30 03:10:45 +02:00
e3bb2935d0
Unify embedding config, build providers from system settings, and fail startup when index builds error or time out. Move Surreal assets under common/db so embeds exclude crate source, and read storage via streams.
24 lines
812 B
Plaintext
24 lines
812 B
Plaintext
-- Copy embeddings from base tables to dedicated tables
|
|
-- This runs BEFORE the field removal migration
|
|
|
|
FOR $chunk IN (SELECT * FROM text_chunk WHERE embedding != NONE AND array::len(embedding) > 0) {
|
|
CREATE text_chunk_embedding CONTENT {
|
|
chunk_id: $chunk.id,
|
|
embedding: $chunk.embedding,
|
|
user_id: $chunk.user_id,
|
|
source_id: $chunk.source_id,
|
|
created_at: $chunk.created_at,
|
|
updated_at: $chunk.updated_at
|
|
};
|
|
};
|
|
|
|
FOR $entity IN (SELECT * FROM knowledge_entity WHERE embedding != NONE AND array::len(embedding) > 0) {
|
|
CREATE knowledge_entity_embedding CONTENT {
|
|
entity_id: $entity.id,
|
|
embedding: $entity.embedding,
|
|
user_id: $entity.user_id,
|
|
created_at: $entity.created_at,
|
|
updated_at: $entity.updated_at
|
|
};
|
|
};
|