//! Trait definition for text embedding models.
use crateBoxFuture;
use crateSynwireError;
/// Trait for text embedding models.
///
/// Implementors produce fixed-dimension floating-point vectors from text input,
/// suitable for similarity search, clustering, and retrieval-augmented generation.
///
/// # Cancel safety
///
/// The futures returned by [`embed_documents`](Self::embed_documents) and
/// [`embed_query`](Self::embed_query) are **not cancel-safe**. Dropping a
/// future mid-flight may leave partial results undelivered. Use
/// [`tokio::time::timeout`] for bounded waits and retry the full request
/// on timeout.