mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
feat: support do_sample param in ChatRequest
This commit is contained in:
parent
06c3d4b1ec
commit
0520bde039
@ -709,6 +709,10 @@ pub(crate) struct ChatRequest {
|
||||
#[schema(nullable = true, example = "null")]
|
||||
#[serde(deserialize_with = "deserialize_tool_choice::deserialize")]
|
||||
pub tool_choice: Option<ToolType>,
|
||||
|
||||
#[serde(default)]
|
||||
#[schema(default = "false", example = true)]
|
||||
pub do_sample: bool,
|
||||
}
|
||||
|
||||
fn default_tool_prompt() -> Option<String> {
|
||||
|
@ -1060,7 +1060,7 @@ async fn chat_completions(
|
||||
top_k: None,
|
||||
top_p: req.top_p,
|
||||
typical_p: None,
|
||||
do_sample: true,
|
||||
do_sample: req.do_sample,
|
||||
max_new_tokens,
|
||||
return_full_text: None,
|
||||
stop,
|
||||
|
Loading…
Reference in New Issue
Block a user