File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -520,9 +520,14 @@ static json oaicompat_completion_params_parse(const json & body) {
520
520
if (n_choices != 1 ) {
521
521
throw std::runtime_error (" Only one completion choice is allowed" );
522
522
}
523
+
524
+ // Handle "echo" field
525
+ if (json_value (body, " echo" , false )) {
526
+ throw std::runtime_error (" Only no echo is supported" );
527
+ }
523
528
524
529
// Params supported by OAI but unsupported by llama.cpp
525
- static const std::vector<std::string> unsupported_params { " best_of" , " echo " , " suffix" };
530
+ static const std::vector<std::string> unsupported_params { " best_of" , " suffix" };
526
531
for (const auto & param : unsupported_params) {
527
532
if (body.contains (param)) {
528
533
throw std::runtime_error (" Unsupported param: " + param);
You can’t perform that action at this time.
0 commit comments