[router] add chat_template_kwargs in ChatCompletionRequest (#9958)
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
This commit is contained in:
@@ -91,6 +91,7 @@ fn default_chat_completion_request() -> ChatCompletionRequest {
|
||||
session_params: None,
|
||||
separate_reasoning: true,
|
||||
stream_reasoning: true,
|
||||
chat_template_kwargs: None,
|
||||
return_hidden_states: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,6 +330,10 @@ pub struct ChatCompletionRequest {
|
||||
#[serde(default = "default_true")]
|
||||
pub stream_reasoning: bool,
|
||||
|
||||
/// Chat template kwargs
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub chat_template_kwargs: Option<HashMap<String, serde_json::Value>>,
|
||||
|
||||
/// Return model hidden states
|
||||
#[serde(default)]
|
||||
pub return_hidden_states: bool,
|
||||
|
||||
@@ -916,6 +916,7 @@ mod tests {
|
||||
session_params: None,
|
||||
separate_reasoning: true,
|
||||
stream_reasoning: true,
|
||||
chat_template_kwargs: None,
|
||||
return_hidden_states: false,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user