pub fn embed_texts_parallel_with(
embedder: &Mutex<LlmEmbedding>,
texts: &[String],
parallelism: usize,
batch_size: usize,
on_result: impl FnMut(usize, &[f32]) -> Result<(), AppError>,
) -> Result<(), AppError>Expand description
Like embed_texts_parallel but invokes on_result as soon as each
embedding arrives (BLOCO 5: incremental persistence — a kill loses at
most the in-flight batches, never the already-delivered items).