Skip to content

Commit

Permalink
chore: add flag override warning for --model / --chat (#2559)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys authored Jul 1, 2024
1 parent d66f960 commit 7c30d74
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/tabby/src/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,16 @@ impl Modify for SecurityAddon {
fn merge_args(config: &Config, args: &ServeArgs) -> Config {
let mut config = (*config).clone();
if let Some(model) = &args.model {
if config.model.completion.is_some() {
warn!("Overriding completion model from config.toml. The overriding behavior might surprise you. Consider setting the model in config.toml directly.");
}
config.model.completion = Some(to_local_config(model, args.parallelism, &args.device));
};

if let Some(chat_model) = &args.chat_model {
if config.model.chat.is_some() {
warn!("Overriding chat model from config.toml. The overriding behavior might surprise you. Consider setting the model in config.toml directly.");
}
config.model.chat = Some(to_local_config(
chat_model,
args.parallelism,
Expand Down

0 comments on commit 7c30d74

Please sign in to comment.