Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 68
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-b60d5559d5150ecd3b49136064e5e251d832899770ff385b711378389afba370.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-7b0a5d715d94f75ac7795bd4d2175a0e3243af9b935a86c273f371e45583140f.yml
20 changes: 11 additions & 9 deletions chatcompletion.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ type ChatCompletionAudioParam struct {
// Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`,
// or `pcm16`.
Format param.Field[ChatCompletionAudioParamFormat] `json:"format,required"`
// Specifies the voice type. Supported voices are `alloy`, `echo`, `fable`, `onyx`,
// `nova`, and `shimmer`.
// The voice the model uses to respond. Supported voices are `alloy`, `ash`,
// `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
Voice param.Field[ChatCompletionAudioParamVoice] `json:"voice,required"`
}

Expand Down Expand Up @@ -412,22 +412,24 @@ func (r ChatCompletionAudioParamFormat) IsKnown() bool {
return false
}

// Specifies the voice type. Supported voices are `alloy`, `echo`, `fable`, `onyx`,
// `nova`, and `shimmer`.
// The voice the model uses to respond. Supported voices are `alloy`, `ash`,
// `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
type ChatCompletionAudioParamVoice string

const (
ChatCompletionAudioParamVoiceAlloy ChatCompletionAudioParamVoice = "alloy"
ChatCompletionAudioParamVoiceAsh ChatCompletionAudioParamVoice = "ash"
ChatCompletionAudioParamVoiceBallad ChatCompletionAudioParamVoice = "ballad"
ChatCompletionAudioParamVoiceCoral ChatCompletionAudioParamVoice = "coral"
ChatCompletionAudioParamVoiceEcho ChatCompletionAudioParamVoice = "echo"
ChatCompletionAudioParamVoiceFable ChatCompletionAudioParamVoice = "fable"
ChatCompletionAudioParamVoiceOnyx ChatCompletionAudioParamVoice = "onyx"
ChatCompletionAudioParamVoiceNova ChatCompletionAudioParamVoice = "nova"
ChatCompletionAudioParamVoiceSage ChatCompletionAudioParamVoice = "sage"
ChatCompletionAudioParamVoiceShimmer ChatCompletionAudioParamVoice = "shimmer"
ChatCompletionAudioParamVoiceVerse ChatCompletionAudioParamVoice = "verse"
)

func (r ChatCompletionAudioParamVoice) IsKnown() bool {
switch r {
case ChatCompletionAudioParamVoiceAlloy, ChatCompletionAudioParamVoiceEcho, ChatCompletionAudioParamVoiceFable, ChatCompletionAudioParamVoiceOnyx, ChatCompletionAudioParamVoiceNova, ChatCompletionAudioParamVoiceShimmer:
case ChatCompletionAudioParamVoiceAlloy, ChatCompletionAudioParamVoiceAsh, ChatCompletionAudioParamVoiceBallad, ChatCompletionAudioParamVoiceCoral, ChatCompletionAudioParamVoiceEcho, ChatCompletionAudioParamVoiceSage, ChatCompletionAudioParamVoiceShimmer, ChatCompletionAudioParamVoiceVerse:
return true
}
return false
Expand Down Expand Up @@ -460,7 +462,7 @@ type ChatCompletionChunk struct {
// `stream_options: {"include_usage": true}` in your request. When present, it
// contains a null value except for the last chunk which contains the token usage
// statistics for the entire request.
Usage CompletionUsage `json:"usage"`
Usage CompletionUsage `json:"usage,nullable"`
JSON chatCompletionChunkJSON `json:"-"`
}

Expand Down