mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
manual embedders: limit max size of errors to 250
This commit is contained in:
parent
4087a88dbe
commit
f4c94ac57f
@ -20,7 +20,7 @@ impl Embedder {
|
||||
|
||||
pub fn embed(&self, mut texts: Vec<String>) -> Result<Vec<Embeddings<f32>>, 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user