File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -208,9 +208,13 @@ int main(int argc, char ** argv) {
208208
209209 // auto enable conversation mode if chat template is available
210210 const bool has_chat_template = !common_get_builtin_chat_template (model).empty () || !params.chat_template .empty ();
211- if (params.conversation_mode == COMMON_CONVERSATION_MODE_AUTO && has_chat_template) {
212- LOG_INF (" %s: chat template is available, enabling conversation mode (disable it with -no-cnv)\n " , __func__);
213- params.conversation_mode = COMMON_CONVERSATION_MODE_ENABLED;
211+ if (params.conversation_mode == COMMON_CONVERSATION_MODE_AUTO) {
212+ if (has_chat_template) {
213+ LOG_INF (" %s: chat template is available, enabling conversation mode (disable it with -no-cnv)\n " , __func__);
214+ params.conversation_mode = COMMON_CONVERSATION_MODE_ENABLED;
215+ } else {
216+ params.conversation_mode = COMMON_CONVERSATION_MODE_DISABLED;
217+ }
214218 }
215219
216220 // in case user force-activate conversation mode (via -cnv) without proper chat template, we show a warning
You can’t perform that action at this time.
0 commit comments