We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
stop
1 parent ccc377e commit e8c92bcCopy full SHA for e8c92bc
llama.cpp/server/server.cpp
@@ -2400,9 +2400,7 @@ json oaicompat_completion_params_parse(
2400
}
2401
2402
// Handle 'stop' field
2403
- if (body["stop"].is_null()) {
2404
- llama_params["stop"] = json::array({});
2405
- } else if (body["stop"].is_string()) {
+ if (body.contains("stop") && body["stop"].is_string()) {
2406
llama_params["stop"] = json::array({body["stop"].get<std::string>()});
2407
} else {
2408
llama_params["stop"] = json_value(body, "stop", json::array());
0 commit comments