From 4f0a128e2833c93c4d31f956f3ccc0ecfc459c94 Mon Sep 17 00:00:00 2001 From: Ryan Hua Date: Thu, 30 May 2024 11:29:43 -0400 Subject: [PATCH] fix: change first msg check --- examples/server/utils.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/server/utils.hpp b/examples/server/utils.hpp index d8a2286e4..9d2ae187a 100644 --- a/examples/server/utils.hpp +++ b/examples/server/utils.hpp @@ -483,8 +483,7 @@ static std::vector format_partial_response_oaicompat(json result, const st if (!result.contains("model") || !result.contains("oaicompat_token_ctr")) { return std::vector({result}); } - - bool first = json_value(result, "oaicompat_token_ctr", 0) == 0; + bool first = json_value(result, "oaicompat_token_ctr", 1) == 1; std::string modelname = json_value(result, "model", std::string(DEFAULT_OAICOMPAT_MODEL)); bool stopped_word = json_value(result, "stopped_word", false);