server : fix chat res
This commit is contained in:
parent
71c2c7fb8b
commit
0b069a4710
1 changed files with 3 additions and 2 deletions
|
@ -661,9 +661,10 @@ struct server_context {
|
||||||
if (res >= 0) {
|
if (res >= 0) {
|
||||||
llama_chat_message chat[] = {{"user", "test"}};
|
llama_chat_message chat[] = {{"user", "test"}};
|
||||||
std::string tmpl = std::string(model_template.data(), model_template.size());
|
std::string tmpl = std::string(model_template.data(), model_template.size());
|
||||||
res = llama_chat_apply_template(model, tmpl.c_str(), chat, 1, true, nullptr, 0);
|
int32_t chat_res = llama_chat_apply_template(model, tmpl.c_str(), chat, 1, true, nullptr, 0);
|
||||||
|
return chat_res > 0;
|
||||||
}
|
}
|
||||||
return res >= 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init() {
|
void init() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue