mirror of https://github.com/0xplaygrounds/rig
refactor: remove unnecessary printlns
This commit is contained in:
parent
10757903c0
commit
1bbaff5905
|
@ -107,11 +107,8 @@ impl<M: EmbeddingModel, T: Embed + Send> EmbeddingsBuilder<M, T> {
|
||||||
// Generate the embeddings for each batch.
|
// Generate the embeddings for each batch.
|
||||||
.map(|text| async {
|
.map(|text| async {
|
||||||
let (ids, docs): (Vec<_>, Vec<_>) = text.into_iter().unzip();
|
let (ids, docs): (Vec<_>, Vec<_>) = text.into_iter().unzip();
|
||||||
println!("{ids:?}");
|
|
||||||
println!("{docs:?}");
|
|
||||||
|
|
||||||
let embeddings = self.model.embed_texts(docs).await?;
|
let embeddings = self.model.embed_texts(docs).await?;
|
||||||
println!("Embeddings vec len: {}", embeddings.len());
|
|
||||||
Ok::<_, EmbeddingError>(ids.into_iter().zip(embeddings).collect::<Vec<_>>())
|
Ok::<_, EmbeddingError>(ids.into_iter().zip(embeddings).collect::<Vec<_>>())
|
||||||
})
|
})
|
||||||
// Parallelize the embeddings generation over 10 concurrent requests
|
// Parallelize the embeddings generation over 10 concurrent requests
|
||||||
|
@ -131,8 +128,6 @@ impl<M: EmbeddingModel, T: Embed + Send> EmbeddingsBuilder<M, T> {
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
// println!("{embeddings:?}");
|
|
||||||
|
|
||||||
// Merge the embeddings with their respective documents
|
// Merge the embeddings with their respective documents
|
||||||
Ok(docs
|
Ok(docs
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
Loading…
Reference in New Issue