refactor: remove face embedding architecture - single Qdrant _faces collection

- Delete FaceEmbeddingDb module (face_embedding_db.rs)
- Stub match_faces_iterative, generate_seed_embeddings, tmdb_match_handler
- Remove sync_trace_embeddings, populate_face_embeddings_to_qdrant
- Remove embedding from face.json output (face_processor.py)
- Remove embedding from PG UPDATE (store_traced_faces.py)
- Remove workspace traces staging (checkin.rs, qdrant_workspace.rs)
- Fix tests: add pose_angle to Face, hand_nodes to TkgResult

Disabled functions (need reimplement with _faces):
- match_faces_iterative (identity agent)
- generate_seed_embeddings (TMDb seeds)
- tmdb_match_handler (TMDb matching)
- cluster_face_embeddings, search_similar_faces
- merge_traces_within_cuts
This commit is contained in:
Accusys
2026-06-24 22:27:09 +08:00
parent 360cb991e1
commit 074cdcdbed
60 changed files with 657 additions and 9454 deletions
+5 -32
View File
@@ -1,7 +1,7 @@
use anyhow::Result;
use serde::{Deserialize, Serialize};
use std::time::Duration;
use tracing::{debug, error, warn};
use tracing::{debug, error};
use crate::core::config;
use crate::core::llm::function_calling::LLM_CLIENT;
@@ -31,44 +31,17 @@ struct Choice {
message: ChatMessage,
}
/// Generates a 5W1H+ summary for a given scene context.
/// Context should include the combined text of all sentences in the scene.
pub async fn generate_5w1h_summary(scene_text: &str) -> Result<String> {
if !*config::llm::SUMMARY_ENABLED {
warn!("LLM Summary is disabled via config");
return Ok("LLM Disabled".to_string());
}
let prompt = format!(
r#"Analyze the following video scene transcript and provide a concise 5W1H+ summary in JSON format.
Focus on: Who, What, Where, When, Why, How, and Key Objects/Actions.
Transcript:
"{}"
Output format:
{{
"who": "...",
"what": "...",
"where": "...",
"when": "...",
"why": "...",
"how": "...",
"summary": "..."
}}"#,
scene_text
);
pub async fn ask_llm(prompt: &str, system_prompt: &str) -> Result<String> {
let req = ChatRequest {
model: (*config::llm::SUMMARY_MODEL).clone(),
messages: vec![
ChatMessage {
role: "system".to_string(),
content: "You are an expert video analyst assistant.".to_string(),
content: system_prompt.to_string(),
},
ChatMessage {
role: "user".to_string(),
content: prompt,
content: prompt.to_string(),
},
],
temperature: 0.1,
@@ -76,7 +49,7 @@ pub async fn generate_5w1h_summary(scene_text: &str) -> Result<String> {
stream: false,
};
debug!("Calling LLM for summary: {}", *config::llm::SUMMARY_URL);
debug!("Calling LLM: {}", *config::llm::SUMMARY_URL);
let res = LLM_CLIENT
.post(&*config::llm::SUMMARY_URL)