refactor: docstrings

This commit is contained in:
Joshua Mo 2025-04-12 20:20:17 +01:00
parent cac599a776
commit 18e31a6e51
1 changed files with 4 additions and 4 deletions

View File

@ -60,21 +60,21 @@ pub trait EmbeddingModel: Clone + Sync + Send {
}
}
/// Trait for embedding models that can generate embeddings for documents.
/// Trait for embedding models that can generate embeddings for images.
pub trait ImageEmbeddingModel: Clone + Sync + Send {
/// The maximum number of documents that can be embedded in a single request.
/// The maximum number of images that can be embedded in a single request.
const MAX_DOCUMENTS: usize;
/// The number of dimensions in the embedding vector.
fn ndims(&self) -> usize;
/// Embed multiple text documents in a single request
/// Embed multiple images in a single request from bytes.
fn embed_images(
&self,
images: impl IntoIterator<Item = Vec<u8>> + Send,
) -> impl std::future::Future<Output = Result<Vec<Embedding>, EmbeddingError>> + Send;
/// Embed a single text document.
/// Embed a single image from bytes.
fn embed_image<'a>(
&'a self,
bytes: &'a [u8],