Update router/src/main.rs

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
This commit is contained in:
drbh 2024-02-01 09:05:42 -05:00 committed by GitHub
parent 6e08f5b265
commit da3f8a4598
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -159,8 +159,10 @@ async fn main() -> Result<(), RouterError> {
let tokenizer_config_full_path = if tokenizer_config_path.is_none() && local_model { let tokenizer_config_full_path = if tokenizer_config_path.is_none() && local_model {
// if no tokenizer config path is provided, we default to the local tokenizer config // if no tokenizer config path is provided, we default to the local tokenizer config
Some(local_path.join("tokenizer_config.json")) Some(local_path.join("tokenizer_config.json"))
} else if let Some(tokenizer_config_path) = tokenizer_config_path { if let Some(tokenizer_config_path) = tokenizer_config_path {
Some(std::path::PathBuf::from(tokenizer_config_path)) Some(std::path::PathBuf::from(tokenizer_config_path))
} else if local_model {
Some(local_path.join("tokenizer_config.json"))
} else { } else {
None None
}; };