mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-05 20:26:31 +00:00
remove-me: Introduce an env var to change the embeddings chunk size
This commit is contained in:
committed by
Louis Dureuil
parent
58a88c7933
commit
112d3f54e9
@ -321,7 +321,14 @@ impl Embedder {
|
||||
pub fn prompt_count_in_chunk_hint(&self) -> usize {
|
||||
match self.data.request.input_type() {
|
||||
InputType::Text => 1,
|
||||
InputType::TextArray => 10,
|
||||
InputType::TextArray => {
|
||||
let chunk_size = std::env::var("MEILI_EMBEDDINGS_CHUNK_SIZE")
|
||||
.ok()
|
||||
.and_then(|chunk_size| chunk_size.parse().ok())
|
||||
.unwrap_or(10);
|
||||
assert!(chunk_size <= 100, "Embedding chunk size cannot exceed 100");
|
||||
chunk_size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user