Fixed failing to return result on stopping token.

This commit is contained in:
digiwombat 2023-05-28 16:45:05 -04:00
parent 6c58f64a3b
commit 33b6957177

View file

@ -236,6 +236,7 @@ struct llama_server_context
if (!embd.empty() && embd.back() == llama_token_eos()) {
stopping_word = llama_token_to_str(ctx, embd.back());
has_next_token = false;
return result;
}
has_next_token = n_remain != 0;