@@ -157,8 +157,7 @@ type ChatCompletion struct {
157
157
Model string `json:"model,required"`
158
158
// The object type, which is always `chat.completion`.
159
159
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.
162
161
ServiceTier ChatCompletionServiceTier `json:"service_tier,nullable"`
163
162
// This fingerprint represents the backend configuration that the model runs with.
164
163
//
@@ -293,8 +292,7 @@ func (r ChatCompletionObject) IsKnown() bool {
293
292
return false
294
293
}
295
294
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.
298
296
type ChatCompletionServiceTier string
299
297
300
298
const (
@@ -541,8 +539,7 @@ type ChatCompletionChunk struct {
541
539
Model string `json:"model,required"`
542
540
// The object type, which is always `chat.completion.chunk`.
543
541
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.
546
543
ServiceTier ChatCompletionChunkServiceTier `json:"service_tier,nullable"`
547
544
// This fingerprint represents the backend configuration that the model runs with.
548
545
// Can be used in conjunction with the `seed` request parameter to understand when
@@ -839,8 +836,7 @@ func (r ChatCompletionChunkObject) IsKnown() bool {
839
836
return false
840
837
}
841
838
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.
844
840
type ChatCompletionChunkServiceTier string
845
841
846
842
const (
@@ -1687,7 +1683,7 @@ func (r ChatCompletionToolType) IsKnown() bool {
1687
1683
// `none` is the default when no tools are present. `auto` is the default if tools
1688
1684
// are present.
1689
1685
//
1690
- // Satisfied by [ChatCompletionToolChoiceOptionBehavior ],
1686
+ // Satisfied by [ChatCompletionToolChoiceOptionAuto ],
1691
1687
// [ChatCompletionNamedToolChoiceParam].
1692
1688
type ChatCompletionToolChoiceOptionUnionParam interface {
1693
1689
implementsChatCompletionToolChoiceOptionUnionParam ()
@@ -1696,24 +1692,23 @@ type ChatCompletionToolChoiceOptionUnionParam interface {
1696
1692
// `none` means the model will not call any tool and instead generates a message.
1697
1693
// `auto` means the model can pick between generating a message or calling one or
1698
1694
// more tools. `required` means the model must call one or more tools.
1699
- type ChatCompletionToolChoiceOptionBehavior string
1695
+ type ChatCompletionToolChoiceOptionAuto string
1700
1696
1701
1697
const (
1702
- ChatCompletionToolChoiceOptionBehaviorNone ChatCompletionToolChoiceOptionBehavior = "none"
1703
- ChatCompletionToolChoiceOptionBehaviorAuto ChatCompletionToolChoiceOptionBehavior = "auto"
1704
- ChatCompletionToolChoiceOptionBehaviorRequired ChatCompletionToolChoiceOptionBehavior = "required"
1698
+ ChatCompletionToolChoiceOptionAutoNone ChatCompletionToolChoiceOptionAuto = "none"
1699
+ ChatCompletionToolChoiceOptionAutoAuto ChatCompletionToolChoiceOptionAuto = "auto"
1700
+ ChatCompletionToolChoiceOptionAutoRequired ChatCompletionToolChoiceOptionAuto = "required"
1705
1701
)
1706
1702
1707
- func (r ChatCompletionToolChoiceOptionBehavior ) IsKnown () bool {
1703
+ func (r ChatCompletionToolChoiceOptionAuto ) IsKnown () bool {
1708
1704
switch r {
1709
- case ChatCompletionToolChoiceOptionBehaviorNone , ChatCompletionToolChoiceOptionBehaviorAuto , ChatCompletionToolChoiceOptionBehaviorRequired :
1705
+ case ChatCompletionToolChoiceOptionAutoNone , ChatCompletionToolChoiceOptionAutoAuto , ChatCompletionToolChoiceOptionAutoRequired :
1710
1706
return true
1711
1707
}
1712
1708
return false
1713
1709
}
1714
1710
1715
- func (r ChatCompletionToolChoiceOptionBehavior ) implementsChatCompletionToolChoiceOptionUnionParam () {
1716
- }
1711
+ func (r ChatCompletionToolChoiceOptionAuto ) implementsChatCompletionToolChoiceOptionUnionParam () {}
1717
1712
1718
1713
type ChatCompletionToolMessageParam struct {
1719
1714
// The contents of the tool message.
@@ -1913,9 +1908,6 @@ type ChatCompletionNewParams struct {
1913
1908
// - If set to 'default', the request will be processed using the default service
1914
1909
// tier with a lower uptime SLA and no latency guarentee.
1915
1910
// - 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.
1919
1911
ServiceTier param.Field [ChatCompletionNewParamsServiceTier ] `json:"service_tier"`
1920
1912
// Up to 4 sequences where the API will stop generating further tokens.
1921
1913
Stop param.Field [ChatCompletionNewParamsStopUnion ] `json:"stop"`
@@ -1979,7 +1971,7 @@ func (r ChatCompletionNewParams) MarshalJSON() (data []byte, err error) {
1979
1971
// `none` is the default when no functions are present. `auto` is the default if
1980
1972
// functions are present.
1981
1973
//
1982
- // Satisfied by [ChatCompletionNewParamsFunctionCallBehavior ],
1974
+ // Satisfied by [ChatCompletionNewParamsFunctionCallAuto ],
1983
1975
// [ChatCompletionFunctionCallOptionParam].
1984
1976
//
1985
1977
// Deprecated: deprecated
@@ -1990,22 +1982,22 @@ type ChatCompletionNewParamsFunctionCallUnion interface {
1990
1982
// `none` means the model will not call a function and instead generates a message.
1991
1983
// `auto` means the model can pick between generating a message or calling a
1992
1984
// function.
1993
- type ChatCompletionNewParamsFunctionCallBehavior string
1985
+ type ChatCompletionNewParamsFunctionCallAuto string
1994
1986
1995
1987
const (
1996
- ChatCompletionNewParamsFunctionCallBehaviorNone ChatCompletionNewParamsFunctionCallBehavior = "none"
1997
- ChatCompletionNewParamsFunctionCallBehaviorAuto ChatCompletionNewParamsFunctionCallBehavior = "auto"
1988
+ ChatCompletionNewParamsFunctionCallAutoNone ChatCompletionNewParamsFunctionCallAuto = "none"
1989
+ ChatCompletionNewParamsFunctionCallAutoAuto ChatCompletionNewParamsFunctionCallAuto = "auto"
1998
1990
)
1999
1991
2000
- func (r ChatCompletionNewParamsFunctionCallBehavior ) IsKnown () bool {
1992
+ func (r ChatCompletionNewParamsFunctionCallAuto ) IsKnown () bool {
2001
1993
switch r {
2002
- case ChatCompletionNewParamsFunctionCallBehaviorNone , ChatCompletionNewParamsFunctionCallBehaviorAuto :
1994
+ case ChatCompletionNewParamsFunctionCallAutoNone , ChatCompletionNewParamsFunctionCallAutoAuto :
2003
1995
return true
2004
1996
}
2005
1997
return false
2006
1998
}
2007
1999
2008
- func (r ChatCompletionNewParamsFunctionCallBehavior ) implementsChatCompletionNewParamsFunctionCallUnion () {
2000
+ func (r ChatCompletionNewParamsFunctionCallAuto ) implementsChatCompletionNewParamsFunctionCallUnion () {
2009
2001
}
2010
2002
2011
2003
// Deprecated: deprecated
@@ -2113,9 +2105,6 @@ func (r ChatCompletionNewParamsResponseFormatType) IsKnown() bool {
2113
2105
// - If set to 'default', the request will be processed using the default service
2114
2106
// tier with a lower uptime SLA and no latency guarentee.
2115
2107
// - 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.
2119
2108
type ChatCompletionNewParamsServiceTier string
2120
2109
2121
2110
const (
0 commit comments