Skip to content

Commit 9823a8b

Browse files
authored
Chat Completion API: add ReasoningEffort and new o1 models (#928)
* add reasoning_effort param * add o1 model * fix lint
1 parent 7a2915a commit 9823a8b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

chat.go

+2
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ type ChatCompletionRequest struct {
258258
// Store can be set to true to store the output of this completion request for use in distillations and evals.
259259
// https://platform.openai.com/docs/api-reference/chat/create#chat-create-store
260260
Store bool `json:"store,omitempty"`
261+
// Controls effort on reasoning for reasoning models. It can be set to "low", "medium", or "high".
262+
ReasoningEffort string `json:"reasoning_effort,omitempty"`
261263
// Metadata to store with the completion.
262264
Metadata map[string]string `json:"metadata,omitempty"`
263265
}

completion.go

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const (
2929
O1Mini20240912 = "o1-mini-2024-09-12"
3030
O1Preview = "o1-preview"
3131
O1Preview20240912 = "o1-preview-2024-09-12"
32+
O1 = "o1"
33+
O120241217 = "o1-2024-12-17"
3234
GPT432K0613 = "gpt-4-32k-0613"
3335
GPT432K0314 = "gpt-4-32k-0314"
3436
GPT432K = "gpt-4-32k"

0 commit comments

Comments
 (0)