Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ type ChatCompletionRequest struct {
// 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"`
// Add additional JSON properties to the request
ExtraBody map[string]any `json:"extra_body,omitempty"`
}

type StreamOptions struct {
Expand Down Expand Up @@ -425,6 +427,7 @@ func (c *Client) CreateChatCompletion(
http.MethodPost,
c.fullURL(urlSuffix, withModel(request.Model)),
withBody(request),
withExtraBody(request.ExtraBody),
)
if err != nil {
return
Expand Down
1 change: 1 addition & 0 deletions chat_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func (c *Client) CreateChatCompletionStream(
http.MethodPost,
c.fullURL(urlSuffix, withModel(request.Model)),
withBody(request),
withExtraBody(request.ExtraBody),
)
if err != nil {
return nil, err
Expand Down
Loading
Loading