@@ -157,8 +157,7 @@ type ChatCompletion struct {
157157 Model string `json:"model,required"`
158158 // The object type, which is always `chat.completion`.
159159 Object ChatCompletionObject `json:"object,required"`
160- // The service tier used for processing the request. This field is only included if
161- // the `service_tier` parameter is specified in the request.
160+ // The service tier used for processing the request.
162161 ServiceTier ChatCompletionServiceTier `json:"service_tier,nullable"`
163162 // This fingerprint represents the backend configuration that the model runs with.
164163 //
@@ -293,8 +292,7 @@ func (r ChatCompletionObject) IsKnown() bool {
293292 return false
294293}
295294
296- // The service tier used for processing the request. This field is only included if
297- // the `service_tier` parameter is specified in the request.
295+ // The service tier used for processing the request.
298296type ChatCompletionServiceTier string
299297
300298const (
@@ -541,8 +539,7 @@ type ChatCompletionChunk struct {
541539 Model string `json:"model,required"`
542540 // The object type, which is always `chat.completion.chunk`.
543541 Object ChatCompletionChunkObject `json:"object,required"`
544- // The service tier used for processing the request. This field is only included if
545- // the `service_tier` parameter is specified in the request.
542+ // The service tier used for processing the request.
546543 ServiceTier ChatCompletionChunkServiceTier `json:"service_tier,nullable"`
547544 // This fingerprint represents the backend configuration that the model runs with.
548545 // Can be used in conjunction with the `seed` request parameter to understand when
@@ -839,8 +836,7 @@ func (r ChatCompletionChunkObject) IsKnown() bool {
839836 return false
840837}
841838
842- // The service tier used for processing the request. This field is only included if
843- // the `service_tier` parameter is specified in the request.
839+ // The service tier used for processing the request.
844840type ChatCompletionChunkServiceTier string
845841
846842const (
@@ -1687,7 +1683,7 @@ func (r ChatCompletionToolType) IsKnown() bool {
16871683// `none` is the default when no tools are present. `auto` is the default if tools
16881684// are present.
16891685//
1690- // Satisfied by [ChatCompletionToolChoiceOptionBehavior ],
1686+ // Satisfied by [ChatCompletionToolChoiceOptionAuto ],
16911687// [ChatCompletionNamedToolChoiceParam].
16921688type ChatCompletionToolChoiceOptionUnionParam interface {
16931689 implementsChatCompletionToolChoiceOptionUnionParam ()
@@ -1696,24 +1692,23 @@ type ChatCompletionToolChoiceOptionUnionParam interface {
16961692// `none` means the model will not call any tool and instead generates a message.
16971693// `auto` means the model can pick between generating a message or calling one or
16981694// more tools. `required` means the model must call one or more tools.
1699- type ChatCompletionToolChoiceOptionBehavior string
1695+ type ChatCompletionToolChoiceOptionAuto string
17001696
17011697const (
1702- ChatCompletionToolChoiceOptionBehaviorNone ChatCompletionToolChoiceOptionBehavior = "none"
1703- ChatCompletionToolChoiceOptionBehaviorAuto ChatCompletionToolChoiceOptionBehavior = "auto"
1704- ChatCompletionToolChoiceOptionBehaviorRequired ChatCompletionToolChoiceOptionBehavior = "required"
1698+ ChatCompletionToolChoiceOptionAutoNone ChatCompletionToolChoiceOptionAuto = "none"
1699+ ChatCompletionToolChoiceOptionAutoAuto ChatCompletionToolChoiceOptionAuto = "auto"
1700+ ChatCompletionToolChoiceOptionAutoRequired ChatCompletionToolChoiceOptionAuto = "required"
17051701)
17061702
1707- func (r ChatCompletionToolChoiceOptionBehavior ) IsKnown () bool {
1703+ func (r ChatCompletionToolChoiceOptionAuto ) IsKnown () bool {
17081704 switch r {
1709- case ChatCompletionToolChoiceOptionBehaviorNone , ChatCompletionToolChoiceOptionBehaviorAuto , ChatCompletionToolChoiceOptionBehaviorRequired :
1705+ case ChatCompletionToolChoiceOptionAutoNone , ChatCompletionToolChoiceOptionAutoAuto , ChatCompletionToolChoiceOptionAutoRequired :
17101706 return true
17111707 }
17121708 return false
17131709}
17141710
1715- func (r ChatCompletionToolChoiceOptionBehavior ) implementsChatCompletionToolChoiceOptionUnionParam () {
1716- }
1711+ func (r ChatCompletionToolChoiceOptionAuto ) implementsChatCompletionToolChoiceOptionUnionParam () {}
17171712
17181713type ChatCompletionToolMessageParam struct {
17191714 // The contents of the tool message.
@@ -1913,9 +1908,6 @@ type ChatCompletionNewParams struct {
19131908 // - If set to 'default', the request will be processed using the default service
19141909 // tier with a lower uptime SLA and no latency guarentee.
19151910 // - When not set, the default behavior is 'auto'.
1916- //
1917- // When this parameter is set, the response body will include the `service_tier`
1918- // utilized.
19191911 ServiceTier param.Field [ChatCompletionNewParamsServiceTier ] `json:"service_tier"`
19201912 // Up to 4 sequences where the API will stop generating further tokens.
19211913 Stop param.Field [ChatCompletionNewParamsStopUnion ] `json:"stop"`
@@ -1979,7 +1971,7 @@ func (r ChatCompletionNewParams) MarshalJSON() (data []byte, err error) {
19791971// `none` is the default when no functions are present. `auto` is the default if
19801972// functions are present.
19811973//
1982- // Satisfied by [ChatCompletionNewParamsFunctionCallBehavior ],
1974+ // Satisfied by [ChatCompletionNewParamsFunctionCallAuto ],
19831975// [ChatCompletionFunctionCallOptionParam].
19841976//
19851977// Deprecated: deprecated
@@ -1990,22 +1982,22 @@ type ChatCompletionNewParamsFunctionCallUnion interface {
19901982// `none` means the model will not call a function and instead generates a message.
19911983// `auto` means the model can pick between generating a message or calling a
19921984// function.
1993- type ChatCompletionNewParamsFunctionCallBehavior string
1985+ type ChatCompletionNewParamsFunctionCallAuto string
19941986
19951987const (
1996- ChatCompletionNewParamsFunctionCallBehaviorNone ChatCompletionNewParamsFunctionCallBehavior = "none"
1997- ChatCompletionNewParamsFunctionCallBehaviorAuto ChatCompletionNewParamsFunctionCallBehavior = "auto"
1988+ ChatCompletionNewParamsFunctionCallAutoNone ChatCompletionNewParamsFunctionCallAuto = "none"
1989+ ChatCompletionNewParamsFunctionCallAutoAuto ChatCompletionNewParamsFunctionCallAuto = "auto"
19981990)
19991991
2000- func (r ChatCompletionNewParamsFunctionCallBehavior ) IsKnown () bool {
1992+ func (r ChatCompletionNewParamsFunctionCallAuto ) IsKnown () bool {
20011993 switch r {
2002- case ChatCompletionNewParamsFunctionCallBehaviorNone , ChatCompletionNewParamsFunctionCallBehaviorAuto :
1994+ case ChatCompletionNewParamsFunctionCallAutoNone , ChatCompletionNewParamsFunctionCallAutoAuto :
20031995 return true
20041996 }
20051997 return false
20061998}
20071999
2008- func (r ChatCompletionNewParamsFunctionCallBehavior ) implementsChatCompletionNewParamsFunctionCallUnion () {
2000+ func (r ChatCompletionNewParamsFunctionCallAuto ) implementsChatCompletionNewParamsFunctionCallUnion () {
20092001}
20102002
20112003// Deprecated: deprecated
@@ -2113,9 +2105,6 @@ func (r ChatCompletionNewParamsResponseFormatType) IsKnown() bool {
21132105// - If set to 'default', the request will be processed using the default service
21142106// tier with a lower uptime SLA and no latency guarentee.
21152107// - When not set, the default behavior is 'auto'.
2116- //
2117- // When this parameter is set, the response body will include the `service_tier`
2118- // utilized.
21192108type ChatCompletionNewParamsServiceTier string
21202109
21212110const (
0 commit comments