server : minor
This commit is contained in:
parent
ee201791a1
commit
4b32c65d78
1 changed files with 3 additions and 2 deletions
|
@ -754,6 +754,7 @@ struct llama_server_context
|
||||||
}
|
}
|
||||||
|
|
||||||
slot->params.antiprompt.clear();
|
slot->params.antiprompt.clear();
|
||||||
|
|
||||||
const auto &stop = data.find("stop");
|
const auto &stop = data.find("stop");
|
||||||
if (stop != data.end() && stop->is_array())
|
if (stop != data.end() && stop->is_array())
|
||||||
{
|
{
|
||||||
|
@ -2267,7 +2268,7 @@ int main(int argc, char **argv)
|
||||||
if (!json_value(data, "stream", false)) {
|
if (!json_value(data, "stream", false)) {
|
||||||
std::string completion_text;
|
std::string completion_text;
|
||||||
task_result result = llama.next_result(task_id);
|
task_result result = llama.next_result(task_id);
|
||||||
if(!result.error && result.stop) {
|
if (!result.error && result.stop) {
|
||||||
res.set_content(result.result_json.dump(-1, ' ', false, json::error_handler_t::replace), "application/json");
|
res.set_content(result.result_json.dump(-1, ' ', false, json::error_handler_t::replace), "application/json");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2294,7 +2295,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(result.stop) {
|
if (result.stop) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue