mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-09 22:26:29 +00:00
Add Ollama dimension inference and add clearer errors
Instead of the user manually specifying the model dimensions it will now automatically get determined Just like with hf.rs the word "test" gets embedded to determine the dimensions of the output Add a dedicated error type for if the model doesn't exist (don't automatically pull it though) and set the fault of that error to be the user
This commit is contained in:
@ -1179,8 +1179,8 @@ pub fn validate_embedding_settings(
|
||||
}
|
||||
}
|
||||
EmbedderSource::Ollama => {
|
||||
// Existence & corrent dimensions of models cannot easily be checked here.
|
||||
check_set(&dimensions, "dimensions", inferred_source, name)?;
|
||||
// Dimensions get inferred, only model name is required
|
||||
check_unset(&dimensions, "dimensions", inferred_source, name)?;
|
||||
check_set(&model, "model", inferred_source, name)?;
|
||||
check_unset(&api_key, "apiKey", inferred_source, name)?;
|
||||
check_unset(&revision, "revision", inferred_source, name)?;
|
||||
|
Reference in New Issue
Block a user