add should_truncate to embedding providers
This commit is contained in:
parent
e377ada1a9
commit
76caea80f7
2 changed files with 23 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue