Skip to content

Commit 9ed7474

Browse files
committed
add ChatTemplateKwargs to ChatCompletionRequest
1 parent 93a611c commit 9ed7474

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

chat.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,11 @@ type ChatCompletionRequest struct {
275275
Metadata map[string]string `json:"metadata,omitempty"`
276276
// Configuration for a predicted output.
277277
Prediction *Prediction `json:"prediction,omitempty"`
278+
// ChatTemplateKwargs provides a way to add non-standard parameters to the request body.
279+
// Additional kwargs to pass to the template renderer. Will be accessible by the chat template.
280+
// Such as think mode for qwen3. "chat_template_kwargs": {"enable_thinking": false}
281+
// https://qwen.readthedocs.io/en/latest/deployment/vllm.html#thinking-non-thinking-modes
282+
ChatTemplateKwargs map[string]any `json:"chat_template_kwargs,omitempty"`
278283
}
279284

280285
type StreamOptions struct {

0 commit comments

Comments
 (0)