We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f99d9d1 commit 07f9d4cCopy full SHA for 07f9d4c
examples/main/main.cpp
@@ -277,6 +277,7 @@ int main(int argc, char ** argv) {
277
};
278
279
{
280
+ const bool explicit_chat_template = params.enable_chat_template && (params.use_jinja || !params.chat_template.empty());
281
std::string prompt = params.enable_chat_template ? params.system_prompt : "";
282
283
if (params.enable_chat_template && !prompt.empty()) {
@@ -285,7 +286,7 @@ int main(int argc, char ** argv) {
285
286
}
287
288
if (!params.conversation_mode) {
- if (params.enable_chat_template && !params.prompt.empty()) {
289
+ if (explicit_chat_template && !params.prompt.empty()) {
290
// format and append the user prompt
291
prompt += chat_add_and_format("user", params.prompt);
292
} else {
0 commit comments