add ChatTemplateKwargs to ChatCompletionRequest (#980)

Co-authored-by: Justa <justa.cai@akuvox.com>
This commit is contained in:
Justa
2025-05-13 19:52:44 +08:00
committed by GitHub
parent 0116f2994d
commit 6aaa732296

View File

@@ -275,6 +275,11 @@ type ChatCompletionRequest struct {
Metadata map[string]string `json:"metadata,omitempty"` Metadata map[string]string `json:"metadata,omitempty"`
// Configuration for a predicted output. // Configuration for a predicted output.
Prediction *Prediction `json:"prediction,omitempty"` Prediction *Prediction `json:"prediction,omitempty"`
// ChatTemplateKwargs provides a way to add non-standard parameters to the request body.
// Additional kwargs to pass to the template renderer. Will be accessible by the chat template.
// Such as think mode for qwen3. "chat_template_kwargs": {"enable_thinking": false}
// https://qwen.readthedocs.io/en/latest/deployment/vllm.html#thinking-non-thinking-modes
ChatTemplateKwargs map[string]any `json:"chat_template_kwargs,omitempty"`
} }
type StreamOptions struct { type StreamOptions struct {