Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.1.0-alpha.32 #102

Merged
merged 3 commits into from
Oct 30, 2024
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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.31"
".": "0.1.0-alpha.32"
}
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.32 (2024-10-30)

Full Changelog: [v0.1.0-alpha.31...v0.1.0-alpha.32](https://github.com/openai/openai-go/compare/v0.1.0-alpha.31...v0.1.0-alpha.32)

### Features

* **api:** add new, expressive voices for Realtime and Audio in Chat Completions ([#101](https://github.com/openai/openai-go/issues/101)) ([f946acc](https://github.com/openai/openai-go/commit/f946acc71a92f885bed87f0d4e724fb40cae0f14))

## 0.1.0-alpha.31 (2024-10-23)

Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/openai/openai-go/compare/v0.1.0-alpha.30...v0.1.0-alpha.31)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/openai/openai-go@v0.1.0-alpha.31'
go get -u 'github.com/openai/openai-go@v0.1.0-alpha.32'
```

<!-- x-release-please-end -->
Expand Down
20 changes: 11 additions & 9 deletions chatcompletion.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,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 @@ -483,22 +483,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 @@ -531,7 +533,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
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.1.0-alpha.31" // x-release-please-version
const PackageVersion = "0.1.0-alpha.32" // x-release-please-version