Build insight title from generated summary

This commit is contained in:
Cameron
2026-02-24 16:08:25 -05:00
parent 1fb3441a38
commit 7a0da1ab4a
6 changed files with 63 additions and 150 deletions

View File

@@ -1011,18 +1011,7 @@ impl InsightGenerator {
None
};
// 10. Generate title and summary with Ollama (using multi-source context + image if supported)
let title = ollama_client
.generate_photo_title(
date_taken,
location.as_deref(),
contact.as_deref(),
Some(&combined_context),
custom_system_prompt.as_deref(),
image_base64.clone(),
)
.await?;
// 10. Generate summary first, then derive title from the summary
let summary = ollama_client
.generate_photo_summary(
date_taken,
@@ -1034,6 +1023,10 @@ impl InsightGenerator {
)
.await?;
let title = ollama_client
.generate_photo_title(&summary, custom_system_prompt.as_deref())
.await?;
log::info!("Generated title: {}", title);
log::info!("Generated summary: {}", summary);