debug: log VLM enrich query details
This commit is contained in:
+10
-7
@@ -163,15 +163,18 @@ async fn enrich_vlm_from_pg(
|
||||
};
|
||||
|
||||
let tp_table = crate::core::db::schema::table_name("trace_profiles");
|
||||
let rows: Vec<(i64, i64, Option<String>)> = sqlx::query_as(&format!(
|
||||
let query = format!(
|
||||
"SELECT start_frame, end_frame, vlm_description FROM {tp_table} \
|
||||
WHERE file_uuid = $1 AND trace_id = $2"
|
||||
))
|
||||
.bind(file_uuid)
|
||||
.bind(trace_id)
|
||||
.fetch_all(db.pool())
|
||||
.await
|
||||
.ok()?;
|
||||
);
|
||||
tracing::info!("[VLM-enrich] Query: {}, file_uuid={}, trace_id={}", query, file_uuid, trace_id);
|
||||
let result = sqlx::query_as(&query)
|
||||
.bind(file_uuid)
|
||||
.bind(trace_id)
|
||||
.fetch_all(db.pool())
|
||||
.await;
|
||||
tracing::info!("[VLM-enrich] Query result: {:?}", result.as_ref().map(|r| r.len()));
|
||||
let rows: Vec<(i64, i64, Option<String>)> = result.ok()?;
|
||||
|
||||
let (start_frame, end_frame, vlm_desc) = rows.into_iter().next()?;
|
||||
let text = vlm_desc.unwrap_or_default();
|
||||
|
||||
Reference in New Issue
Block a user