Skip to content

Commit 184b437

Browse files
committed
refactor: Reorder fields in document embeddings insertion
Move documentVectorStoreDbId before documentVectorStoreSourceDbId in the insertDocumentEmbeddings function to align field order with the logical hierarchy where the store ID (parent reference) comes before the source ID (child reference).
1 parent 2bb5b64 commit 184b437

File tree

1 file changed

+1
-1
lines changed
  • apps/studio.giselles.ai/lib/vector-stores/document

1 file changed

+1
-1
lines changed

apps/studio.giselles.ai/lib/vector-stores/document/database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ export async function insertDocumentEmbeddings(
100100

101101
// Convert embeddings to the format expected by the database
102102
const values = embeddings.map((emb) => ({
103-
documentVectorStoreSourceDbId: sourceDbId,
104103
documentVectorStoreDbId: storeDbId,
104+
documentVectorStoreSourceDbId: sourceDbId,
105105
embeddingProfileId,
106106
embeddingDimensions: dimensions,
107107
documentKey,

0 commit comments

Comments
 (0)