Skip to content

Commit 1d4478d

Browse files
stainless-ci-botRobertCraigie
authored andcommitted
feat(api): add gpt-4.5-preview
1 parent 0b77c7c commit 1d4478d

File tree

7 files changed

+50
-11
lines changed

7 files changed

+50
-11
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 74
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-4aa6ee65ba9efc789e05e6a5ef0883b2cadf06def8efd863dbf75e9e233067e1.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-5d30684c3118d049682ea30cdb4dbef39b97d51667da484689193dc40162af32.yml

src/resources/beta/assistants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,8 @@ export interface AssistantUpdateParams {
13001300
| 'gpt-4o-2024-05-13'
13011301
| 'gpt-4o-mini'
13021302
| 'gpt-4o-mini-2024-07-18'
1303+
| 'gpt-4.5-preview'
1304+
| 'gpt-4.5-preview-2025-02-27'
13031305
| 'gpt-4-turbo'
13041306
| 'gpt-4-turbo-2024-04-09'
13051307
| 'gpt-4-0125-preview'

src/resources/beta/realtime/realtime.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,11 +1796,14 @@ export interface SessionCreatedEvent {
17961796

17971797
/**
17981798
* Send this event to update the session’s default configuration. The client may
1799-
* send this event at any time to update the session configuration, and any field
1800-
* may be updated at any time, except for "voice". The server will respond with a
1801-
* `session.updated` event that shows the full effective configuration. Only fields
1802-
* that are present are updated, thus the correct way to clear a field like
1803-
* "instructions" is to pass an empty string.
1799+
* send this event at any time to update any field, except for `voice`. However,
1800+
* note that once a session has been initialized with a particular `model`, it
1801+
* can’t be changed to another model using `session.update`.
1802+
*
1803+
* When the server receives a `session.update`, it will respond with a
1804+
* `session.updated` event showing the full, effective configuration. Only the
1805+
* fields that are present are updated. To clear a field like `instructions`, pass
1806+
* an empty string.
18041807
*/
18051808
export interface SessionUpdateEvent {
18061809
/**
@@ -1982,11 +1985,18 @@ export namespace SessionUpdateEvent {
19821985
*/
19831986
export interface TurnDetection {
19841987
/**
1985-
* Whether or not to automatically generate a response when VAD is enabled. `true`
1986-
* by default.
1988+
* Whether or not to automatically generate a response when a VAD stop event
1989+
* occurs. `true` by default.
19871990
*/
19881991
create_response?: boolean;
19891992

1993+
/**
1994+
* Whether or not to automatically interrupt any ongoing response with output to
1995+
* the default conversation (i.e. `conversation` of `auto`) when a VAD start event
1996+
* occurs. `true` by default.
1997+
*/
1998+
interrupt_response?: boolean;
1999+
19902000
/**
19912001
* Amount of audio to include before the VAD detected speech (in milliseconds).
19922002
* Defaults to 300ms.

src/resources/beta/realtime/sessions.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,19 @@ export namespace Session {
170170
* volume and respond at the end of user speech.
171171
*/
172172
export interface TurnDetection {
173+
/**
174+
* Whether or not to automatically generate a response when a VAD stop event
175+
* occurs. `true` by default.
176+
*/
177+
create_response?: boolean;
178+
179+
/**
180+
* Whether or not to automatically interrupt any ongoing response with output to
181+
* the default conversation (i.e. `conversation` of `auto`) when a VAD start event
182+
* occurs. `true` by default.
183+
*/
184+
interrupt_response?: boolean;
185+
173186
/**
174187
* Amount of audio to include before the VAD detected speech (in milliseconds).
175188
* Defaults to 300ms.
@@ -534,11 +547,18 @@ export namespace SessionCreateParams {
534547
*/
535548
export interface TurnDetection {
536549
/**
537-
* Whether or not to automatically generate a response when VAD is enabled. `true`
538-
* by default.
550+
* Whether or not to automatically generate a response when a VAD stop event
551+
* occurs. `true` by default.
539552
*/
540553
create_response?: boolean;
541554

555+
/**
556+
* Whether or not to automatically interrupt any ongoing response with output to
557+
* the default conversation (i.e. `conversation` of `auto`) when a VAD start event
558+
* occurs. `true` by default.
559+
*/
560+
interrupt_response?: boolean;
561+
542562
/**
543563
* Amount of audio to include before the VAD detected speech (in milliseconds).
544564
* Defaults to 300ms.

src/resources/chat/chat.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export type ChatModel =
5555
| 'o1-preview-2024-09-12'
5656
| 'o1-mini'
5757
| 'o1-mini-2024-09-12'
58+
| 'gpt-4.5-preview'
59+
| 'gpt-4.5-preview-2025-02-27'
5860
| 'gpt-4o'
5961
| 'gpt-4o-2024-11-20'
6062
| 'gpt-4o-2024-08-06'

src/resources/files.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ export interface FileObject {
162162
*/
163163
status: 'uploaded' | 'processed' | 'error';
164164

165+
/**
166+
* The Unix timestamp (in seconds) for when the file will expire.
167+
*/
168+
expires_at?: number;
169+
165170
/**
166171
* @deprecated Deprecated. For details on why a fine-tuning training file failed
167172
* validation, see the `error` field on `fine_tuning.job`.

src/resources/uploads/uploads.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export interface Upload {
8484
created_at: number;
8585

8686
/**
87-
* The Unix timestamp (in seconds) for when the Upload was created.
87+
* The Unix timestamp (in seconds) for when the Upload will expire.
8888
*/
8989
expires_at: number;
9090

0 commit comments

Comments
 (0)