From f4c94ac57f82c30b3d05eaeda50fcec8af43587f Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Mon, 15 Jul 2024 21:40:50 +0200 Subject: [PATCH] manual embedders: limit max size of errors to 250 --- milli/src/vector/manual.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/vector/manual.rs b/milli/src/vector/manual.rs index e5d3689c0..4cfbb0d3c 100644 --- a/milli/src/vector/manual.rs +++ b/milli/src/vector/manual.rs @@ -20,7 +20,7 @@ impl Embedder { pub fn embed(&self, mut texts: Vec) -> Result>, EmbedError> { let Some(text) = texts.pop() else { return Ok(Default::default()) }; - Err(EmbedError::embed_on_manual_embedder(text)) + Err(EmbedError::embed_on_manual_embedder(text.chars().take(250).collect())) } pub fn dimensions(&self) -> usize {