Update examples/server/utils.hpp

This commit is contained in:
Georgi Gerganov 2024-03-11 10:09:11 +02:00 committed by GitHub
parent 7e72b9915d
commit ade9b90e95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -427,7 +427,7 @@ static json format_final_response_oaicompat(const json & request, json result, s
} }
// return value is vector as there is one case where we might need to generate two responses // return value is vector as there is one case where we might need to generate two responses
static std::vector<json> format_partial_response_oaicompat(json result, std::string completion_id) { static std::vector<json> format_partial_response_oaicompat(json result, const std::string & completion_id) {
if (!result.contains("model") || !result.contains("oaicompat_token_ctr")) { if (!result.contains("model") || !result.contains("oaicompat_token_ctr")) {
return std::vector<json>({result}); return std::vector<json>({result});
} }