From add4d88af484c7cb012b888b4413de06293567f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 18:18:24 +0000 Subject: [PATCH] feat(api): add gpt-4o-2024-11-20 model (#13) --- .stats.yml | 2 +- .../com/openai/models/BatchCreateParams.kt | 6 +++--- .../openai/models/ChatCompletionAudioParam.kt | 20 +++++++++++-------- .../models/ChatCompletionCreateParams.kt | 6 ++++++ .../kotlin/com/openai/models/ChatModel.kt | 6 ++++++ 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 393c909c..63fe3412 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 24 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-fb9db2d2c1f0d6b39d8ee042db5d5c59acba6ad1daf47c18792c1f5fb24b3401.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-aa9b01fc0c17eb0cbc200533fc20d6a49c5e764ceaf8049e08b294532be6e9ff.yml diff --git a/openai-java-core/src/main/kotlin/com/openai/models/BatchCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/BatchCreateParams.kt index 9ae6ecfe..b3a00834 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/BatchCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/BatchCreateParams.kt @@ -89,7 +89,7 @@ constructor( * Your input file must be formatted as a * [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and * must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, - * and can be up to 100 MB in size. + * and can be up to 200 MB in size. */ @JsonProperty("input_file_id") fun inputFileId(): String? = inputFileId @@ -151,7 +151,7 @@ constructor( * Your input file must be formatted as a * [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and * must be uploaded with the purpose `batch`. The file can contain up to 50,000 - * requests, and can be up to 100 MB in size. + * requests, and can be up to 200 MB in size. */ @JsonProperty("input_file_id") fun inputFileId(inputFileId: String) = apply { this.inputFileId = inputFileId } @@ -277,7 +277,7 @@ constructor( * Your input file must be formatted as a * [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and * must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, - * and can be up to 100 MB in size. + * and can be up to 200 MB in size. */ fun inputFileId(inputFileId: String) = apply { this.inputFileId = inputFileId } diff --git a/openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionAudioParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionAudioParam.kt index 53ae56d7..f954c7a7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionAudioParam.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionAudioParam.kt @@ -33,8 +33,9 @@ private constructor( private var validated: Boolean = false /** - * The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`, `coral`, - * `echo`, `sage`, `shimmer`, and `verse`. + * The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, + * and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these + * voices are less expressive). */ fun voice(): Voice = voice.getRequired("voice") @@ -44,8 +45,9 @@ private constructor( fun format(): Format = format.getRequired("format") /** - * The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`, `coral`, - * `echo`, `sage`, `shimmer`, and `verse`. + * The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, + * and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these + * voices are less expressive). */ @JsonProperty("voice") @ExcludeMissing fun _voice() = voice @@ -87,14 +89,16 @@ private constructor( } /** - * The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`, - * `coral`, `echo`, `sage`, `shimmer`, and `verse`. + * The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, + * `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and + * `shimmer`; these voices are less expressive). */ fun voice(voice: Voice) = voice(JsonField.of(voice)) /** - * The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`, - * `coral`, `echo`, `sage`, `shimmer`, and `verse`. + * The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, + * `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and + * `shimmer`; these voices are less expressive). */ @JsonProperty("voice") @ExcludeMissing diff --git a/openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionCreateParams.kt index f206c6f5..44ed9fe9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionCreateParams.kt @@ -1629,6 +1629,8 @@ constructor( @JvmField val GPT_4O = Model(JsonField.of("gpt-4o")) + @JvmField val GPT_4O_2024_11_20 = Model(JsonField.of("gpt-4o-2024-11-20")) + @JvmField val GPT_4O_2024_08_06 = Model(JsonField.of("gpt-4o-2024-08-06")) @JvmField val GPT_4O_2024_05_13 = Model(JsonField.of("gpt-4o-2024-05-13")) @@ -1698,6 +1700,7 @@ constructor( O1_MINI, O1_MINI_2024_09_12, GPT_4O, + GPT_4O_2024_11_20, GPT_4O_2024_08_06, GPT_4O_2024_05_13, GPT_4O_REALTIME_PREVIEW, @@ -1734,6 +1737,7 @@ constructor( O1_MINI, O1_MINI_2024_09_12, GPT_4O, + GPT_4O_2024_11_20, GPT_4O_2024_08_06, GPT_4O_2024_05_13, GPT_4O_REALTIME_PREVIEW, @@ -1772,6 +1776,7 @@ constructor( O1_MINI -> Value.O1_MINI O1_MINI_2024_09_12 -> Value.O1_MINI_2024_09_12 GPT_4O -> Value.GPT_4O + GPT_4O_2024_11_20 -> Value.GPT_4O_2024_11_20 GPT_4O_2024_08_06 -> Value.GPT_4O_2024_08_06 GPT_4O_2024_05_13 -> Value.GPT_4O_2024_05_13 GPT_4O_REALTIME_PREVIEW -> Value.GPT_4O_REALTIME_PREVIEW @@ -1810,6 +1815,7 @@ constructor( O1_MINI -> Known.O1_MINI O1_MINI_2024_09_12 -> Known.O1_MINI_2024_09_12 GPT_4O -> Known.GPT_4O + GPT_4O_2024_11_20 -> Known.GPT_4O_2024_11_20 GPT_4O_2024_08_06 -> Known.GPT_4O_2024_08_06 GPT_4O_2024_05_13 -> Known.GPT_4O_2024_05_13 GPT_4O_REALTIME_PREVIEW -> Known.GPT_4O_REALTIME_PREVIEW diff --git a/openai-java-core/src/main/kotlin/com/openai/models/ChatModel.kt b/openai-java-core/src/main/kotlin/com/openai/models/ChatModel.kt index c93b3b74..2e8840da 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/ChatModel.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/ChatModel.kt @@ -40,6 +40,8 @@ private constructor( @JvmField val GPT_4O = ChatModel(JsonField.of("gpt-4o")) + @JvmField val GPT_4O_2024_11_20 = ChatModel(JsonField.of("gpt-4o-2024-11-20")) + @JvmField val GPT_4O_2024_08_06 = ChatModel(JsonField.of("gpt-4o-2024-08-06")) @JvmField val GPT_4O_2024_05_13 = ChatModel(JsonField.of("gpt-4o-2024-05-13")) @@ -109,6 +111,7 @@ private constructor( O1_MINI, O1_MINI_2024_09_12, GPT_4O, + GPT_4O_2024_11_20, GPT_4O_2024_08_06, GPT_4O_2024_05_13, GPT_4O_REALTIME_PREVIEW, @@ -145,6 +148,7 @@ private constructor( O1_MINI, O1_MINI_2024_09_12, GPT_4O, + GPT_4O_2024_11_20, GPT_4O_2024_08_06, GPT_4O_2024_05_13, GPT_4O_REALTIME_PREVIEW, @@ -183,6 +187,7 @@ private constructor( O1_MINI -> Value.O1_MINI O1_MINI_2024_09_12 -> Value.O1_MINI_2024_09_12 GPT_4O -> Value.GPT_4O + GPT_4O_2024_11_20 -> Value.GPT_4O_2024_11_20 GPT_4O_2024_08_06 -> Value.GPT_4O_2024_08_06 GPT_4O_2024_05_13 -> Value.GPT_4O_2024_05_13 GPT_4O_REALTIME_PREVIEW -> Value.GPT_4O_REALTIME_PREVIEW @@ -221,6 +226,7 @@ private constructor( O1_MINI -> Known.O1_MINI O1_MINI_2024_09_12 -> Known.O1_MINI_2024_09_12 GPT_4O -> Known.GPT_4O + GPT_4O_2024_11_20 -> Known.GPT_4O_2024_11_20 GPT_4O_2024_08_06 -> Known.GPT_4O_2024_08_06 GPT_4O_2024_05_13 -> Known.GPT_4O_2024_05_13 GPT_4O_REALTIME_PREVIEW -> Known.GPT_4O_REALTIME_PREVIEW