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.
1 parent 11ac980 commit 077e16fCopy full SHA for 077e16f
examples/server/utils.hpp
@@ -360,7 +360,7 @@ static json oaicompat_completion_params_parse(
360
361
// Handle "logprobs" field
362
// TODO: The response format of this option is not yet OAI-compatible, but seems like no one really using it; We may need to fix it in the future
363
- if (body.contains("logprobs")) {
+ if (json_value(body, "logprobs", false)) {
364
llama_params["n_probs"] = json_value(body, "top_logprobs", 20);
365
} else if (body.contains("top_logprobs")) {
366
throw std::runtime_error("top_logprobs requires logprobs to be set to true");
0 commit comments