server : fix token duplication when streaming with stop strings

This commit is contained in:
ZXED 2024-12-27 21:51:56 +03:00
parent d79d8f39b4
commit 19c0925e97
No known key found for this signature in database
GPG key ID: 637FB44813DCFD66

View file

@ -1856,6 +1856,8 @@ struct server_context {
result.text_to_send = slot.generated_text.substr(pos, std::string::npos);
slot.n_sent_text += result.text_to_send.size();
// add the token to slot queue and cache
} else {
result.text_to_send = "";
}
slot.add_token(result);