Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
5e19b159
Unverified
Commit
5e19b159
authored
Sep 04, 2025
by
Tony Lu
Committed by
GitHub
Sep 03, 2025
Browse files
[router] add chat_template_kwargs in ChatCompletionRequest (#9958)
Signed-off-by:
Tony Lu
<
tonylu@linux.alibaba.com
>
parent
788b19a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
sgl-router/benches/request_processing.rs
sgl-router/benches/request_processing.rs
+1
-0
sgl-router/src/protocols/spec.rs
sgl-router/src/protocols/spec.rs
+4
-0
sgl-router/src/protocols/validation.rs
sgl-router/src/protocols/validation.rs
+1
-0
No files found.
sgl-router/benches/request_processing.rs
View file @
5e19b159
...
...
@@ -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
,
}
}
...
...
sgl-router/src/protocols/spec.rs
View file @
5e19b159
...
...
@@ -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
,
...
...
sgl-router/src/protocols/validation.rs
View file @
5e19b159
...
...
@@ -916,6 +916,7 @@ mod tests {
session_params
:
None
,
separate_reasoning
:
true
,
stream_reasoning
:
true
,
chat_template_kwargs
:
None
,
return_hidden_states
:
false
,
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment