소스 검색

server : fix token duplication when streaming with stop strings (#10997)

Alexey Parfenov 1 년 전
부모
커밋
16cdce7b68
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      examples/server/server.cpp

+ 2 - 0
examples/server/server.cpp

@@ -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);