naming oai_compat --> oaicompat
This commit is contained in:
parent
ffc4441b1d
commit
db66153d92
1 changed files with 4 additions and 4 deletions
|
@ -308,7 +308,7 @@ struct server_task_result_cmpl_final : server_task_result {
|
||||||
|
|
||||||
virtual json to_json() override {
|
virtual json to_json() override {
|
||||||
if (oaicompat) {
|
if (oaicompat) {
|
||||||
return to_json_oai_compat();
|
return to_json_oaicompat();
|
||||||
}
|
}
|
||||||
// otherwise, non-OAI-compat JSON
|
// otherwise, non-OAI-compat JSON
|
||||||
json res = json {
|
json res = json {
|
||||||
|
@ -334,7 +334,7 @@ struct server_task_result_cmpl_final : server_task_result {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
json to_json_oai_compat() {
|
json to_json_oaicompat() {
|
||||||
std::string finish_reason = "length";
|
std::string finish_reason = "length";
|
||||||
if (stop == STOP_TYPE_WORD || stop == STOP_TYPE_EOS) {
|
if (stop == STOP_TYPE_WORD || stop == STOP_TYPE_EOS) {
|
||||||
finish_reason = "stop";
|
finish_reason = "stop";
|
||||||
|
@ -406,7 +406,7 @@ struct server_task_result_cmpl_partial : server_task_result {
|
||||||
|
|
||||||
virtual json to_json() override {
|
virtual json to_json() override {
|
||||||
if (oaicompat) {
|
if (oaicompat) {
|
||||||
return to_json_oai_compat();
|
return to_json_oaicompat();
|
||||||
}
|
}
|
||||||
bool is_stop = stop != STOP_TYPE_NONE;
|
bool is_stop = stop != STOP_TYPE_NONE;
|
||||||
// non-OAI-compat JSON
|
// non-OAI-compat JSON
|
||||||
|
@ -432,7 +432,7 @@ struct server_task_result_cmpl_partial : server_task_result {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
json to_json_oai_compat() {
|
json to_json_oaicompat() {
|
||||||
bool first = n_decoded == 0;
|
bool first = n_decoded == 0;
|
||||||
|
|
||||||
std::string finish_reason;
|
std::string finish_reason;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue