Browse Source

Apply 01-cache.diff

Daniel Hiltgen 1 năm trước cách đây
mục cha
commit
0a0e9f3e0f
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      llm/ext_server/server.cpp

+ 3 - 1
llm/ext_server/server.cpp

@@ -1007,13 +1007,15 @@ struct llama_server_context
                 slot.n_sent_text += result.text_to_send.size();
                 slot.n_sent_text += result.text_to_send.size();
                 // add the token to slot queue and cache
                 // add the token to slot queue and cache
             }
             }
-            slot.add_token_string(result);
+
             if (slot.params.stream)
             if (slot.params.stream)
             {
             {
                 send_partial_response(slot, result);
                 send_partial_response(slot, result);
             }
             }
         }
         }
 
 
+        slot.add_token_string(result);
+
         if (incomplete)
         if (incomplete)
         {
         {
             slot.has_next_token = true;
             slot.has_next_token = true;