Skip to content

Commit f354ff9

Browse files
committed
Ensure toolcalls are registered when no -sys provided
1 parent d1b12b8 commit f354ff9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

examples/main/main.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,8 @@ int main(int argc, char ** argv) {
346346

347347
if (params.conversation_mode && params.enable_chat_template) {
348348
// format the system prompt in conversation mode (will use template default if empty)
349-
prompt = params.system_prompt;
349+
prompt = chat_add_and_format("system", params.system_prompt, true);
350350

351-
if (!prompt.empty()) {
352-
prompt = chat_add_and_format("system", prompt, true);
353-
}
354351
} else {
355352
// otherwise use the prompt as is
356353
prompt = params.prompt;

0 commit comments

Comments
 (0)