add should_truncate to embedding providers

This commit is contained in:
KCaverly 2023-08-30 11:58:45 -04:00
parent e377ada1a9
commit 76caea80f7
2 changed files with 23 additions and 0 deletions

View file

@ -1228,6 +1228,10 @@ impl EmbeddingProvider for FakeEmbeddingProvider {
span.len()
}
fn should_truncate(&self, span: &str) -> bool {
false
}
async fn embed_batch(&self, spans: Vec<&str>) -> Result<Vec<Vec<f32>>> {
self.embedding_count
.fetch_add(spans.len(), atomic::Ordering::SeqCst);