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