feature/insight-chat-improvements #83
@@ -181,10 +181,7 @@ impl InsightGenerator {
|
|||||||
dao.has_any_summaries(&cx).unwrap_or(false)
|
dao.has_any_summaries(&cx).unwrap_or(false)
|
||||||
};
|
};
|
||||||
let faces_present = {
|
let faces_present = {
|
||||||
let mut dao = self
|
let mut dao = self.face_dao.lock().expect("Unable to lock FaceDao");
|
||||||
.face_dao
|
|
||||||
.lock()
|
|
||||||
.expect("Unable to lock FaceDao");
|
|
||||||
dao.has_any_faces(&cx).unwrap_or(false)
|
dao.has_any_faces(&cx).unwrap_or(false)
|
||||||
};
|
};
|
||||||
ToolGateOpts {
|
ToolGateOpts {
|
||||||
@@ -2217,16 +2214,13 @@ Return ONLY the summary, nothing else."#,
|
|||||||
let mut out = format!("Found {} face(s) in this photo:\n", faces.len());
|
let mut out = format!("Found {} face(s) in this photo:\n", faces.len());
|
||||||
for f in &bound {
|
for f in &bound {
|
||||||
// Invariant: `bound` is filtered on `person_name.is_some()` above.
|
// Invariant: `bound` is filtered on `person_name.is_some()` above.
|
||||||
let name = f.person_name.as_deref().expect("bound face must have a name");
|
let name = f
|
||||||
|
.person_name
|
||||||
|
.as_deref()
|
||||||
|
.expect("bound face must have a name");
|
||||||
out.push_str(&format!(
|
out.push_str(&format!(
|
||||||
"- {} (confidence {:.2}, bbox x={:.2} y={:.2} w={:.2} h={:.2}, source: {})\n",
|
"- {} (confidence {:.2}, bbox x={:.2} y={:.2} w={:.2} h={:.2}, source: {})\n",
|
||||||
name,
|
name, f.confidence, f.bbox_x, f.bbox_y, f.bbox_w, f.bbox_h, f.source,
|
||||||
f.confidence,
|
|
||||||
f.bbox_x,
|
|
||||||
f.bbox_y,
|
|
||||||
f.bbox_w,
|
|
||||||
f.bbox_h,
|
|
||||||
f.source,
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
for f in &unbound {
|
for f in &unbound {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
use crate::ai::apollo_client::ApolloClient;
|
use crate::ai::apollo_client::ApolloClient;
|
||||||
use crate::ai::face_client::FaceClient;
|
use crate::ai::face_client::FaceClient;
|
||||||
use crate::faces;
|
|
||||||
use crate::ai::insight_chat::{ChatLockMap, InsightChatService};
|
use crate::ai::insight_chat::{ChatLockMap, InsightChatService};
|
||||||
use crate::ai::openrouter::OpenRouterClient;
|
use crate::ai::openrouter::OpenRouterClient;
|
||||||
use crate::ai::{InsightGenerator, OllamaClient, SmsApiClient};
|
use crate::ai::{InsightGenerator, OllamaClient, SmsApiClient};
|
||||||
@@ -11,6 +10,7 @@ use crate::database::{
|
|||||||
connect,
|
connect,
|
||||||
};
|
};
|
||||||
use crate::database::{PreviewDao, SqlitePreviewDao};
|
use crate::database::{PreviewDao, SqlitePreviewDao};
|
||||||
|
use crate::faces;
|
||||||
use crate::libraries::{self, Library, LibraryHealthMap};
|
use crate::libraries::{self, Library, LibraryHealthMap};
|
||||||
use crate::tags::{SqliteTagDao, TagDao};
|
use crate::tags::{SqliteTagDao, TagDao};
|
||||||
use crate::video::actors::{
|
use crate::video::actors::{
|
||||||
|
|||||||
Reference in New Issue
Block a user