move truncation to parsing step leveraging the EmbeddingProvider trait
This commit is contained in:
parent
76caea80f7
commit
9781047156
3 changed files with 45 additions and 41 deletions
|
@ -1232,6 +1232,10 @@ impl EmbeddingProvider for FakeEmbeddingProvider {
|
|||
false
|
||||
}
|
||||
|
||||
fn truncate(&self, span: &str) -> String {
|
||||
span.to_string()
|
||||
}
|
||||
|
||||
async fn embed_batch(&self, spans: Vec<&str>) -> Result<Vec<Vec<f32>>> {
|
||||
self.embedding_count
|
||||
.fetch_add(spans.len(), atomic::Ordering::SeqCst);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue