[Bugfix][Frontend] Fix validation of logprobs
in ChatCompletionRequest
(#14352)
Signed-off-by: Sebastian Schönnenbeck <sebastian.schoennenbeck@comma-soft.com>
This commit is contained in:
parent
414919138b
commit
dd732028f5
@ -548,7 +548,7 @@ class ChatCompletionRequest(OpenAIBaseModel):
|
||||
if top_logprobs < 0:
|
||||
raise ValueError("`top_logprobs` must be a positive value.")
|
||||
|
||||
if not data.get("logprobs"):
|
||||
if top_logprobs > 0 and not data.get("logprobs"):
|
||||
raise ValueError(
|
||||
"when using `top_logprobs`, `logprobs` must be set to true."
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user