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) {
520520 if (n_choices != 1 ) {
521521 throw std::runtime_error (" Only one completion choice is allowed" );
522522 }
523+
524+ // Handle "echo" field
525+ if (json_value (body, " echo" , false )) {
526+ throw std::runtime_error (" Only no echo is supported" );
527+ }
523528
524529 // 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" };
526531 for (const auto & param : unsupported_params) {
527532 if (body.contains (param)) {
528533 throw std::runtime_error (" Unsupported param: " + param);
You can’t perform that action at this time.
0 commit comments