Skip to content

Commit e00c9d1

Browse files
ericcurtinngxson
andcommitted
Update examples/server/server.cpp
Co-authored-by: Xuan-Son Nguyen <[email protected]> Signed-off-by: Eric Curtin <[email protected]>
1 parent a4e9e4d commit e00c9d1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/server/server.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,10 +1899,10 @@ struct server_context {
18991899
auto templates = common_chat_templates_from_model(model, "");
19001900
common_chat_inputs inputs;
19011901
inputs.messages = json::array({
1902-
{
1903-
{ "role", "user" },
1904-
{ "content", "test" },
1905-
}
1902+
{
1903+
{ "role", "user" },
1904+
{ "content", "test" },
1905+
}
19061906
});
19071907
GGML_ASSERT(templates.template_default);
19081908
try {
@@ -1925,12 +1925,12 @@ struct server_context {
19251925
};
19261926

19271927
if (use_jinja) {
1928-
return apply_jinja_templates();
1928+
return validate_jinja_templates();
19291929
} else {
19301930
const char * tmpl = llama_model_chat_template(model, /* name */ nullptr);
19311931
const int32_t chat_res = llama_chat_apply_template(tmpl, chat, 1, true, nullptr, 0);
19321932
if (chat_res < 0) {
1933-
return apply_jinja_templates();
1933+
return validate_jinja_templates();
19341934
}
19351935

19361936
return chat_res > 0;

0 commit comments

Comments
 (0)