mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-12 04:44:52 +00:00
Changing back this logprobs default.
This commit is contained in:
parent
6744df5873
commit
d46d3c65ea
@ -782,7 +782,7 @@ pub(crate) struct ChatRequest {
|
||||
/// output token returned in the content of message.
|
||||
#[serde(default)]
|
||||
#[schema(example = "false")]
|
||||
pub logprobs: bool,
|
||||
pub logprobs: Option<bool>,
|
||||
|
||||
/// An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with
|
||||
/// an associated log probability. logprobs must be set to true if this parameter is used.
|
||||
|
@ -1123,6 +1123,8 @@ async fn chat_completions(
|
||||
let (generate_request, using_tools): (GenerateRequest, bool) =
|
||||
chat.try_into_generate(&infer)?;
|
||||
|
||||
let logprobs = logprobs.unwrap_or_default();
|
||||
|
||||
// static values that will be returned in all cases
|
||||
let model_id = info.model_id.clone();
|
||||
let system_fingerprint = format!("{}-{}", info.version, info.docker_label.unwrap_or("native"));
|
||||
|
@ -56,7 +56,7 @@ pub(crate) struct VertexParameters {
|
||||
/// output token returned in the content of message.
|
||||
#[serde(default)]
|
||||
#[schema(example = "false")]
|
||||
pub logprobs: bool,
|
||||
pub logprobs: Option<bool>,
|
||||
|
||||
/// An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with
|
||||
/// an associated log probability. logprobs must be set to true if this parameter is used.
|
||||
|
Loading…
Reference in New Issue
Block a user