Skip to content

Commit 0b069a4

Browse files
committed
server : fix chat res
1 parent 71c2c7f commit 0b069a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/server/server.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,10 @@ struct server_context {
661661
if (res >= 0) {
662662
llama_chat_message chat[] = {{"user", "test"}};
663663
std::string tmpl = std::string(model_template.data(), model_template.size());
664-
res = llama_chat_apply_template(model, tmpl.c_str(), chat, 1, true, nullptr, 0);
664+
int32_t chat_res = llama_chat_apply_template(model, tmpl.c_str(), chat, 1, true, nullptr, 0);
665+
return chat_res > 0;
665666
}
666-
return res >= 0;
667+
return false;
667668
}
668669

669670
void init() {

0 commit comments

Comments
 (0)