fix: change first msg check

This commit is contained in:
Ryan Hua 2024-05-30 11:29:43 -04:00
parent 5dcdf94676
commit 4f0a128e28

View file

@ -483,8 +483,7 @@ static std::vector<json> format_partial_response_oaicompat(json result, const st
if (!result.contains("model") || !result.contains("oaicompat_token_ctr")) {
return std::vector<json>({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);