Cleanup unused message embedding code
Fixup some warnings
This commit is contained in:
@@ -80,10 +80,11 @@ async fn main() -> Result<()> {
|
||||
event.event_uid.as_deref().unwrap_or(""),
|
||||
event.start_time,
|
||||
)
|
||||
&& exists {
|
||||
*skipped_count.lock().unwrap() += 1;
|
||||
continue;
|
||||
}
|
||||
&& exists
|
||||
{
|
||||
*skipped_count.lock().unwrap() += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Generate embedding if requested (blocking call)
|
||||
let embedding = if let Some(ref ollama_client) = ollama {
|
||||
|
||||
@@ -65,10 +65,11 @@ async fn main() -> Result<()> {
|
||||
location.latitude,
|
||||
location.longitude,
|
||||
)
|
||||
&& exists {
|
||||
skipped_count += 1;
|
||||
continue;
|
||||
}
|
||||
&& exists
|
||||
{
|
||||
skipped_count += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
batch_inserts.push(InsertLocationRecord {
|
||||
timestamp: location.timestamp,
|
||||
|
||||
@@ -95,10 +95,11 @@ async fn main() -> Result<()> {
|
||||
if args.skip_existing
|
||||
&& let Ok(exists) =
|
||||
dao_instance.search_exists(&context, search.timestamp, &search.query)
|
||||
&& exists {
|
||||
skipped_count += 1;
|
||||
continue;
|
||||
}
|
||||
&& exists
|
||||
{
|
||||
skipped_count += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Only insert if we have an embedding
|
||||
if let Some(embedding) = embedding_opt {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use anyhow::Result;
|
||||
use chrono::NaiveDate;
|
||||
use clap::Parser;
|
||||
use image_api::ai::{strip_summary_boilerplate, OllamaClient, SmsApiClient};
|
||||
use image_api::ai::{OllamaClient, SmsApiClient, strip_summary_boilerplate};
|
||||
use image_api::database::{DailySummaryDao, InsertDailySummary, SqliteDailySummaryDao};
|
||||
use std::env;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
Reference in New Issue
Block a user