Build insight title from generated summary
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user