fix: VLM re-embedding support + API checks vlm_embedding

- vlm_summary now skips VLM call if description exists, but still generates embedding + Qdrant
- API endpoint checks both vlm_description AND vlm_embedding before saying 'already done'
- Fixed point_id hash generation (was creating 0, now properly hashes)
This commit is contained in:
Accusys
2026-08-25 08:11:48 +08:00
parent 29f14e83c4
commit 8a34dcb8f2
2 changed files with 105 additions and 78 deletions
+4 -2
View File
@@ -905,9 +905,11 @@ async fn trigger_vlm_summary(
}));
}
// Check how many traces already have vlm_description
// Check how many traces need VLM and/or embedding
let done_count: i64 = sqlx::query_scalar(&format!(
"SELECT COUNT(*) FROM {tp_table} WHERE file_uuid = $1 AND vlm_description IS NOT NULL AND vlm_description != ''"
"SELECT COUNT(*) FROM {tp_table} WHERE file_uuid = $1 \
AND vlm_description IS NOT NULL AND vlm_description != '' \
AND vlm_embedding IS NOT NULL"
))
.bind(&file_uuid)
.fetch_one(db.pool())