We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edc2656 commit ae996a2Copy full SHA for ae996a2
examples/server/server.cpp
@@ -1083,7 +1083,7 @@ struct server_context {
1083
}
1084
1085
// check if there is any token to predict
1086
- if (stop_pos == std::string::npos || (!slot.has_next_token && !is_stop_full && stop_pos > 0)) {
+ if (stop_pos == std::string::npos || is_stop_full || (!slot.has_next_token && !is_stop_full && stop_pos > 0)) {
1087
// no send the stop word in the response
1088
result.text_to_send = slot.generated_text.substr(pos, std::string::npos);
1089
slot.n_sent_text += result.text_to_send.size();
0 commit comments