From 7c30d7483644db27bcf6135c68160f771de47883 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Mon, 1 Jul 2024 23:30:13 +0900 Subject: [PATCH] chore: add flag override warning for --model / --chat (#2559) --- crates/tabby/src/serve.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/tabby/src/serve.rs b/crates/tabby/src/serve.rs index bf305d16b19..e8e6f29488d 100644 --- a/crates/tabby/src/serve.rs +++ b/crates/tabby/src/serve.rs @@ -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,