embed_chunks_inline

Function embed_chunks_inline 

Source
pub async fn embed_chunks_inline(
    config: &Config,
    pool: &SqlitePool,
    chunks: &[Chunk],
) -> (u64, u64)
Expand description

Embed chunks during sync (inline). Non-fatal on failure.

Called by crate::ingest::run_sync after chunking each document. Checks each chunk for existing, up-to-date embeddings before calling the provider, avoiding redundant API calls.

§Returns

A tuple (embedded, pending):

  • embedded — number of chunks successfully embedded (or already up-to-date)
  • pending — number of chunks that failed to embed