diff --git a/.stats.yml b/.stats.yml index fe9320429..4d1276a5e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 82 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-5ad6884898c07591750dde560118baf7074a59aecd1f367f930c5e42b04e848a.yml -openapi_spec_hash: 0c255269b89767eae26f4d4dc22d3cbd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6663c59193eb95b201e492de17dcbd5e126ba03d18ce66287a3e2c632ca56fe7.yml +openapi_spec_hash: 7996d2c34cc44fe2ce9ffe93c0ab774e config_hash: d36e491b0afc4f79e3afad4b3c9bec70 diff --git a/src/resources/audio/speech.ts b/src/resources/audio/speech.ts index 4324028d5..4b99ee5f4 100644 --- a/src/resources/audio/speech.ts +++ b/src/resources/audio/speech.ts @@ -34,11 +34,23 @@ export interface SpeechCreateParams { /** * The voice to use when generating the audio. Supported voices are `alloy`, `ash`, - * `coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and `shimmer`. Previews of the - * voices are available in the + * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and + * `verse`. Previews of the voices are available in the * [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). */ - voice: 'alloy' | 'ash' | 'coral' | 'echo' | 'fable' | 'onyx' | 'nova' | 'sage' | 'shimmer'; + voice: + | (string & {}) + | 'alloy' + | 'ash' + | 'ballad' + | 'coral' + | 'echo' + | 'fable' + | 'onyx' + | 'nova' + | 'sage' + | 'shimmer' + | 'verse'; /** * Control the voice of your generated audio with additional instructions. Does not diff --git a/src/resources/beta/realtime/realtime.ts b/src/resources/beta/realtime/realtime.ts index 224d94f37..1c02fdd1a 100644 --- a/src/resources/beta/realtime/realtime.ts +++ b/src/resources/beta/realtime/realtime.ts @@ -1005,9 +1005,22 @@ export interface RealtimeResponse { /** * The voice the model used to respond. Current voice options are `alloy`, `ash`, - * `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`. - */ - voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse'; + * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and + * `verse`. + */ + voice?: + | (string & {}) + | 'alloy' + | 'ash' + | 'ballad' + | 'coral' + | 'echo' + | 'fable' + | 'onyx' + | 'nova' + | 'sage' + | 'shimmer' + | 'verse'; } /** @@ -1620,9 +1633,22 @@ export namespace ResponseCreateEvent { /** * The voice the model uses to respond. Voice cannot be changed during the session * once the model has responded with audio at least once. Current voice options are - * `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`. - */ - voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse'; + * `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, + * `shimmer`, and `verse`. + */ + voice?: + | (string & {}) + | 'alloy' + | 'ash' + | 'ballad' + | 'coral' + | 'echo' + | 'fable' + | 'onyx' + | 'nova' + | 'sage' + | 'shimmer' + | 'verse'; } export namespace Response { @@ -2078,9 +2104,22 @@ export namespace SessionUpdateEvent { /** * The voice the model uses to respond. Voice cannot be changed during the session * once the model has responded with audio at least once. Current voice options are - * `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`. - */ - voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse'; + * `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, + * `shimmer`, and `verse`. + */ + voice?: + | (string & {}) + | 'alloy' + | 'ash' + | 'ballad' + | 'coral' + | 'echo' + | 'fable' + | 'onyx' + | 'nova' + | 'sage' + | 'shimmer' + | 'verse'; } export namespace Session { @@ -2376,7 +2415,7 @@ export namespace TranscriptionSessionUpdate { export interface TurnDetection { /** * Whether or not to automatically generate a response when a VAD stop event - * occurs. + * occurs. Not available for transcription sessions. */ create_response?: boolean; @@ -2390,7 +2429,7 @@ export namespace TranscriptionSessionUpdate { /** * Whether or not to automatically interrupt any ongoing response with output to * the default conversation (i.e. `conversation` of `auto`) when a VAD start event - * occurs. + * occurs. Not available for transcription sessions. */ interrupt_response?: boolean; diff --git a/src/resources/beta/realtime/sessions.ts b/src/resources/beta/realtime/sessions.ts index bae50124e..28a44431e 100644 --- a/src/resources/beta/realtime/sessions.ts +++ b/src/resources/beta/realtime/sessions.ts @@ -139,7 +139,19 @@ export interface Session { * once the model has responded with audio at least once. Current voice options are * `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`. */ - voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse'; + voice?: + | (string & {}) + | 'alloy' + | 'ash' + | 'ballad' + | 'coral' + | 'echo' + | 'fable' + | 'onyx' + | 'nova' + | 'sage' + | 'shimmer' + | 'verse'; } export namespace Session { @@ -361,7 +373,19 @@ export interface SessionCreateResponse { * once the model has responded with audio at least once. Current voice options are * `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`. */ - voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse'; + voice?: + | (string & {}) + | 'alloy' + | 'ash' + | 'ballad' + | 'coral' + | 'echo' + | 'fable' + | 'onyx' + | 'nova' + | 'sage' + | 'shimmer' + | 'verse'; } export namespace SessionCreateResponse { @@ -561,9 +585,22 @@ export interface SessionCreateParams { /** * The voice the model uses to respond. Voice cannot be changed during the session * once the model has responded with audio at least once. Current voice options are - * `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`. - */ - voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse'; + * `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, + * `shimmer`, and `verse`. + */ + voice?: + | (string & {}) + | 'alloy' + | 'ash' + | 'ballad' + | 'coral' + | 'echo' + | 'fable' + | 'onyx' + | 'nova' + | 'sage' + | 'shimmer' + | 'verse'; } export namespace SessionCreateParams { diff --git a/src/resources/beta/realtime/transcription-sessions.ts b/src/resources/beta/realtime/transcription-sessions.ts index d749f8502..a54ec1125 100644 --- a/src/resources/beta/realtime/transcription-sessions.ts +++ b/src/resources/beta/realtime/transcription-sessions.ts @@ -255,7 +255,7 @@ export namespace TranscriptionSessionCreateParams { export interface TurnDetection { /** * Whether or not to automatically generate a response when a VAD stop event - * occurs. + * occurs. Not available for transcription sessions. */ create_response?: boolean; @@ -269,7 +269,7 @@ export namespace TranscriptionSessionCreateParams { /** * Whether or not to automatically interrupt any ongoing response with output to * the default conversation (i.e. `conversation` of `auto`) when a VAD start event - * occurs. + * occurs. Not available for transcription sessions. */ interrupt_response?: boolean; diff --git a/src/resources/chat/completions/completions.ts b/src/resources/chat/completions/completions.ts index 9bc7027e2..e32eb81a8 100644 --- a/src/resources/chat/completions/completions.ts +++ b/src/resources/chat/completions/completions.ts @@ -325,7 +325,19 @@ export interface ChatCompletionAudioParam { * The voice the model uses to respond. Supported voices are `alloy`, `ash`, * `ballad`, `coral`, `echo`, `sage`, and `shimmer`. */ - voice: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse'; + voice: + | (string & {}) + | 'alloy' + | 'ash' + | 'ballad' + | 'coral' + | 'echo' + | 'fable' + | 'onyx' + | 'nova' + | 'sage' + | 'shimmer' + | 'verse'; } /** diff --git a/src/resources/responses/input-items.ts b/src/resources/responses/input-items.ts index f2292e5c6..c88bb441d 100644 --- a/src/resources/responses/input-items.ts +++ b/src/resources/responses/input-items.ts @@ -71,6 +71,12 @@ export interface InputItemListParams extends CursorPageParams { */ before?: string; + /** + * Additional fields to include in the response. See the `include` parameter for + * Response creation above for more information. + */ + include?: Array; + /** * The order to return the input items in. Default is `asc`. * diff --git a/src/resources/responses/responses.ts b/src/resources/responses/responses.ts index db75bc6d4..a35b3cca8 100644 --- a/src/resources/responses/responses.ts +++ b/src/resources/responses/responses.ts @@ -241,8 +241,8 @@ export interface Response { * context. * * When using along with `previous_response_id`, the instructions from a previous - * response will be not be carried over to the next response. This makes it simple - * to swap out system (or developer) messages in new responses. + * response will not be carried over to the next response. This makes it simple to + * swap out system (or developer) messages in new responses. */ instructions: string | null; @@ -1292,6 +1292,12 @@ export type ResponseFormatTextConfig = * [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). */ export interface ResponseFormatTextJSONSchemaConfig { + /** + * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores + * and dashes, with a maximum length of 64. + */ + name: string; + /** * The schema for the response format, described as a JSON Schema object. Learn how * to build JSON schemas [here](https://json-schema.org/). @@ -1309,12 +1315,6 @@ export interface ResponseFormatTextJSONSchemaConfig { */ description?: string; - /** - * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores - * and dashes, with a maximum length of 64. - */ - name?: string; - /** * Whether to enable strict schema adherence when generating the output. If set to * true, the model will always follow the exact schema defined in the `schema` @@ -2634,8 +2634,8 @@ export interface ResponseCreateParamsBase { * context. * * When using along with `previous_response_id`, the instructions from a previous - * response will be not be carried over to the next response. This makes it simple - * to swap out system (or developer) messages in new responses. + * response will not be carried over to the next response. This makes it simple to + * swap out system (or developer) messages in new responses. */ instructions?: string | null; diff --git a/tests/api-resources/audio/speech.test.ts b/tests/api-resources/audio/speech.test.ts index cbec6cfac..191c6a313 100644 --- a/tests/api-resources/audio/speech.test.ts +++ b/tests/api-resources/audio/speech.test.ts @@ -13,7 +13,7 @@ describe('resource speech', () => { const response = await client.audio.speech.create({ input: 'input', model: 'string', - voice: 'alloy', + voice: 'ash', instructions: 'instructions', response_format: 'mp3', speed: 0.25, diff --git a/tests/api-resources/chat/completions/completions.test.ts b/tests/api-resources/chat/completions/completions.test.ts index eddf252b1..60c23591a 100644 --- a/tests/api-resources/chat/completions/completions.test.ts +++ b/tests/api-resources/chat/completions/completions.test.ts @@ -27,7 +27,7 @@ describe('resource completions', () => { const response = await client.chat.completions.create({ messages: [{ content: 'string', role: 'developer', name: 'name' }], model: 'gpt-4o', - audio: { format: 'wav', voice: 'alloy' }, + audio: { format: 'wav', voice: 'ash' }, frequency_penalty: -2, function_call: 'none', functions: [{ name: 'name', description: 'description', parameters: { foo: 'bar' } }], diff --git a/tests/api-resources/responses/input-items.test.ts b/tests/api-resources/responses/input-items.test.ts index 51b86f1b3..25ab166c0 100644 --- a/tests/api-resources/responses/input-items.test.ts +++ b/tests/api-resources/responses/input-items.test.ts @@ -32,7 +32,7 @@ describe('resource inputItems', () => { await expect( client.responses.inputItems.list( 'response_id', - { after: 'after', before: 'before', limit: 0, order: 'asc' }, + { after: 'after', before: 'before', include: ['file_search_call.results'], limit: 0, order: 'asc' }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(OpenAI.NotFoundError);