diff --git a/.stats.yml b/.stats.yml index 140d244..e9032de 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 76 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-be834d63e326a82494e819085137f5eb15866f3fc787db1f3afe7168d419e18a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-9ce5257763fb30c6e0e1ee2bef7e13baf661511e09572207e528d643da8e16b3.yml diff --git a/chatcompletion.go b/chatcompletion.go index 3a389c7..eb44e69 100644 --- a/chatcompletion.go +++ b/chatcompletion.go @@ -2200,7 +2200,7 @@ func (r ChatCompletionNewParams) MarshalJSON() (data []byte, err error) { // `none` is the default when no functions are present. `auto` is the default if // functions are present. // -// Satisfied by [ChatCompletionNewParamsFunctionCallString], +// Satisfied by [ChatCompletionNewParamsFunctionCallFunctionCallMode], // [ChatCompletionFunctionCallOptionParam]. // // Deprecated: deprecated @@ -2211,22 +2211,22 @@ type ChatCompletionNewParamsFunctionCallUnion interface { // `none` means the model will not call a function and instead generates a message. // `auto` means the model can pick between generating a message or calling a // function. -type ChatCompletionNewParamsFunctionCallString string +type ChatCompletionNewParamsFunctionCallFunctionCallMode string const ( - ChatCompletionNewParamsFunctionCallStringNone ChatCompletionNewParamsFunctionCallString = "none" - ChatCompletionNewParamsFunctionCallStringAuto ChatCompletionNewParamsFunctionCallString = "auto" + ChatCompletionNewParamsFunctionCallFunctionCallModeNone ChatCompletionNewParamsFunctionCallFunctionCallMode = "none" + ChatCompletionNewParamsFunctionCallFunctionCallModeAuto ChatCompletionNewParamsFunctionCallFunctionCallMode = "auto" ) -func (r ChatCompletionNewParamsFunctionCallString) IsKnown() bool { +func (r ChatCompletionNewParamsFunctionCallFunctionCallMode) IsKnown() bool { switch r { - case ChatCompletionNewParamsFunctionCallStringNone, ChatCompletionNewParamsFunctionCallStringAuto: + case ChatCompletionNewParamsFunctionCallFunctionCallModeNone, ChatCompletionNewParamsFunctionCallFunctionCallModeAuto: return true } return false } -func (r ChatCompletionNewParamsFunctionCallString) implementsChatCompletionNewParamsFunctionCallUnion() { +func (r ChatCompletionNewParamsFunctionCallFunctionCallMode) implementsChatCompletionNewParamsFunctionCallUnion() { } // Deprecated: deprecated diff --git a/chatcompletion_test.go b/chatcompletion_test.go index effbedf..fa9a191 100644 --- a/chatcompletion_test.go +++ b/chatcompletion_test.go @@ -38,7 +38,7 @@ func TestChatCompletionNewWithOptionalParams(t *testing.T) { Voice: openai.F(openai.ChatCompletionAudioParamVoiceAlloy), }), FrequencyPenalty: openai.F(-2.000000), - FunctionCall: openai.F[openai.ChatCompletionNewParamsFunctionCallUnion](openai.ChatCompletionNewParamsFunctionCallString(openai.ChatCompletionNewParamsFunctionCallStringNone)), + FunctionCall: openai.F[openai.ChatCompletionNewParamsFunctionCallUnion](openai.ChatCompletionNewParamsFunctionCallFunctionCallMode(openai.ChatCompletionNewParamsFunctionCallFunctionCallModeNone)), Functions: openai.F([]openai.ChatCompletionNewParamsFunction{{ Name: openai.F("name"), Description: openai.F("description"),