Skip to content

Commit

Permalink
style: Small renaming for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
cvauclair committed Nov 29, 2024
1 parent 2d6d7c4 commit a041699
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rig-core/src/embeddings/embedding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ pub trait EmbeddingModel: Clone + Sync + Send {
/// Embed multiple text documents in a single request
fn embed_texts(
&self,
documents: impl IntoIterator<Item = String> + Send,
texts: impl IntoIterator<Item = String> + Send,
) -> impl std::future::Future<Output = Result<Vec<Embedding>, EmbeddingError>> + Send;

/// Embed a single text document.
fn embed_text(
&self,
document: &str,
text: &str,
) -> impl std::future::Future<Output = Result<Embedding, EmbeddingError>> + Send {
async {
Ok(self
.embed_texts(vec![document.to_string()])
.embed_texts(vec![text.to_string()])
.await?
.pop()
.expect("There should be at least one embedding"))
Expand Down

0 comments on commit a041699

Please sign in to comment.