@@ -1483,13 +1483,17 @@ type ChatCompletionNewParams struct {
14831483 // returns the log probabilities of each output token returned in the `content` of
14841484 // `message`.
14851485 Logprobs param.Field [bool ] `json:"logprobs"`
1486+ // An upper bound for the number of tokens that can be generated for a completion,
1487+ // including visible output tokens and
1488+ // [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
1489+ MaxCompletionTokens param.Field [int64 ] `json:"max_completion_tokens"`
14861490 // The maximum number of [tokens](/tokenizer) that can be generated in the chat
1487- // completion.
1491+ // completion. This value can be used to control
1492+ // [costs](https://openai.com/api/pricing/) for text generated via API.
14881493 //
1489- // The total length of input tokens and generated tokens is limited by the model's
1490- // context length.
1491- // [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
1492- // for counting tokens.
1494+ // This value is now deprecated in favor of `max_completion_tokens`, and is not
1495+ // compatible with
1496+ // [o1 series models](https://platform.openai.com/docs/guides/reasoning).
14931497 MaxTokens param.Field [int64 ] `json:"max_tokens"`
14941498 // How many chat completion choices to generate for each input message. Note that
14951499 // you will be charged based on the number of generated tokens across all of the
@@ -1512,11 +1516,11 @@ type ChatCompletionNewParams struct {
15121516 // all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
15131517 //
15141518 // Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1515- // Outputs which guarantees the model will match your supplied JSON schema. Learn
1516- // more in the
1519+ // Outputs which ensures the model will match your supplied JSON schema. Learn more
1520+ // in the
15171521 // [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
15181522 //
1519- // Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1523+ // Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
15201524 // message the model generates is valid JSON.
15211525 //
15221526 // **Important:** when using JSON mode, you **must** also instruct the model to
@@ -1536,8 +1540,11 @@ type ChatCompletionNewParams struct {
15361540 // Specifies the latency tier to use for processing the request. This parameter is
15371541 // relevant for customers subscribed to the scale tier service:
15381542 //
1539- // - If set to 'auto', the system will utilize scale tier credits until they are
1540- // exhausted.
1543+ // - If set to 'auto', and the Project is Scale tier enabled, the system will
1544+ // utilize scale tier credits until they are exhausted.
1545+ // - If set to 'auto', and the Project is not Scale tier enabled, the request will
1546+ // be processed using the default service tier with a lower uptime SLA and no
1547+ // latency guarentee.
15411548 // - If set to 'default', the request will be processed using the default service
15421549 // tier with a lower uptime SLA and no latency guarentee.
15431550 // - When not set, the default behavior is 'auto'.
@@ -1655,11 +1662,11 @@ func (r ChatCompletionNewParamsFunction) MarshalJSON() (data []byte, err error)
16551662// all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
16561663//
16571664// Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1658- // Outputs which guarantees the model will match your supplied JSON schema. Learn
1659- // more in the
1665+ // Outputs which ensures the model will match your supplied JSON schema. Learn more
1666+ // in the
16601667// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
16611668//
1662- // Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1669+ // Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
16631670// message the model generates is valid JSON.
16641671//
16651672// **Important:** when using JSON mode, you **must** also instruct the model to
@@ -1689,11 +1696,11 @@ func (r ChatCompletionNewParamsResponseFormat) ImplementsChatCompletionNewParams
16891696// all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
16901697//
16911698// Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1692- // Outputs which guarantees the model will match your supplied JSON schema. Learn
1693- // more in the
1699+ // Outputs which ensures the model will match your supplied JSON schema. Learn more
1700+ // in the
16941701// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
16951702//
1696- // Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1703+ // Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
16971704// message the model generates is valid JSON.
16981705//
16991706// **Important:** when using JSON mode, you **must** also instruct the model to
@@ -1731,8 +1738,11 @@ func (r ChatCompletionNewParamsResponseFormatType) IsKnown() bool {
17311738// Specifies the latency tier to use for processing the request. This parameter is
17321739// relevant for customers subscribed to the scale tier service:
17331740//
1734- // - If set to 'auto', the system will utilize scale tier credits until they are
1735- // exhausted.
1741+ // - If set to 'auto', and the Project is Scale tier enabled, the system will
1742+ // utilize scale tier credits until they are exhausted.
1743+ // - If set to 'auto', and the Project is not Scale tier enabled, the request will
1744+ // be processed using the default service tier with a lower uptime SLA and no
1745+ // latency guarentee.
17361746// - If set to 'default', the request will be processed using the default service
17371747// tier with a lower uptime SLA and no latency guarentee.
17381748// - When not set, the default behavior is 'auto'.
0 commit comments