Skip to content

Commit a00d331

Browse files
feat(api): adding new image model support
1 parent e465063 commit a00d331

File tree

12 files changed

+2534
-421
lines changed

12 files changed

+2534
-421
lines changed

.stats.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 97
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-5633633cc38734869cf7d993f7b549bb8e4d10e0ec45381ec2cd91507cd8eb8f.yml
3-
openapi_spec_hash: c855121b2b2324b99499c9244c21d24d
4-
config_hash: d20837393b73efdb19cd08e04c1cc9a1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-8b68ae6b807dca92e914da1dd9e835a20f69b075e79102a264367fd7fddddb33.yml
3+
openapi_spec_hash: b6ade5b1a6327339e6669e1134de2d03
4+
config_hash: b597cd9a31e9e5ec709e2eefb4c54122

api.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ Methods:
249249

250250
- <code title="post /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fineTuning.checkpoints.permissions.<a href="./src/resources/fine-tuning/checkpoints/permissions.ts">create</a>(fineTunedModelCheckpoint, { ...params }) -> PermissionCreateResponsesPage</code>
251251
- <code title="get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fineTuning.checkpoints.permissions.<a href="./src/resources/fine-tuning/checkpoints/permissions.ts">retrieve</a>(fineTunedModelCheckpoint, { ...params }) -> PermissionRetrieveResponse</code>
252-
- <code title="delete /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fineTuning.checkpoints.permissions.<a href="./src/resources/fine-tuning/checkpoints/permissions.ts">del</a>(fineTunedModelCheckpoint) -> PermissionDeleteResponse</code>
252+
- <code title="delete /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}">client.fineTuning.checkpoints.permissions.<a href="./src/resources/fine-tuning/checkpoints/permissions.ts">del</a>(fineTunedModelCheckpoint, permissionId) -> PermissionDeleteResponse</code>
253253

254254
# VectorStores
255255

@@ -626,6 +626,10 @@ Types:
626626
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputRefusal</a></code>
627627
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputText</a></code>
628628
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningItem</a></code>
629+
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryPartAddedEvent</a></code>
630+
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryPartDoneEvent</a></code>
631+
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryTextDeltaEvent</a></code>
632+
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryTextDoneEvent</a></code>
629633
- <code><a href="./src/resources/responses/responses.ts">ResponseRefusalDeltaEvent</a></code>
630634
- <code><a href="./src/resources/responses/responses.ts">ResponseRefusalDoneEvent</a></code>
631635
- <code><a href="./src/resources/responses/responses.ts">ResponseStatus</a></code>

src/resources/beta/realtime/realtime.ts

+97-1
Original file line numberDiff line numberDiff line change
@@ -915,12 +915,34 @@ export type RealtimeClientEvent =
915915
| ConversationItemTruncateEvent
916916
| InputAudioBufferAppendEvent
917917
| InputAudioBufferClearEvent
918+
| RealtimeClientEvent.OutputAudioBufferClear
918919
| InputAudioBufferCommitEvent
919920
| ResponseCancelEvent
920921
| ResponseCreateEvent
921922
| SessionUpdateEvent
922923
| TranscriptionSessionUpdate;
923924

925+
export namespace RealtimeClientEvent {
926+
/**
927+
* **WebRTC Only:** Emit to cut off the current audio response. This will trigger
928+
* the server to stop generating audio and emit a `output_audio_buffer.cleared`
929+
* event. This event should be preceded by a `response.cancel` client event to stop
930+
* the generation of the current response.
931+
* [Learn more](https://platform.openai.com/docs/guides/realtime-model-capabilities#client-and-server-events-for-audio-in-webrtc).
932+
*/
933+
export interface OutputAudioBufferClear {
934+
/**
935+
* The event type, must be `output_audio_buffer.clear`.
936+
*/
937+
type: 'output_audio_buffer.clear';
938+
939+
/**
940+
* The unique ID of the client event used for error handling.
941+
*/
942+
event_id?: string;
943+
}
944+
}
945+
924946
/**
925947
* The response resource.
926948
*/
@@ -1174,7 +1196,10 @@ export type RealtimeServerEvent =
11741196
| ResponseTextDoneEvent
11751197
| SessionCreatedEvent
11761198
| SessionUpdatedEvent
1177-
| TranscriptionSessionUpdatedEvent;
1199+
| TranscriptionSessionUpdatedEvent
1200+
| RealtimeServerEvent.OutputAudioBufferStarted
1201+
| RealtimeServerEvent.OutputAudioBufferStopped
1202+
| RealtimeServerEvent.OutputAudioBufferCleared;
11781203

11791204
export namespace RealtimeServerEvent {
11801205
/**
@@ -1197,6 +1222,77 @@ export namespace RealtimeServerEvent {
11971222
*/
11981223
type: 'conversation.item.retrieved';
11991224
}
1225+
1226+
/**
1227+
* **WebRTC Only:** Emitted when the server begins streaming audio to the client.
1228+
* This event is emitted after an audio content part has been added
1229+
* (`response.content_part.added`) to the response.
1230+
* [Learn more](https://platform.openai.com/docs/guides/realtime-model-capabilities#client-and-server-events-for-audio-in-webrtc).
1231+
*/
1232+
export interface OutputAudioBufferStarted {
1233+
/**
1234+
* The unique ID of the server event.
1235+
*/
1236+
event_id: string;
1237+
1238+
/**
1239+
* The unique ID of the response that produced the audio.
1240+
*/
1241+
response_id: string;
1242+
1243+
/**
1244+
* The event type, must be `output_audio_buffer.started`.
1245+
*/
1246+
type: 'output_audio_buffer.started';
1247+
}
1248+
1249+
/**
1250+
* **WebRTC Only:** Emitted when the output audio buffer has been completely
1251+
* drained on the server, and no more audio is forthcoming. This event is emitted
1252+
* after the full response data has been sent to the client (`response.done`).
1253+
* [Learn more](https://platform.openai.com/docs/guides/realtime-model-capabilities#client-and-server-events-for-audio-in-webrtc).
1254+
*/
1255+
export interface OutputAudioBufferStopped {
1256+
/**
1257+
* The unique ID of the server event.
1258+
*/
1259+
event_id: string;
1260+
1261+
/**
1262+
* The unique ID of the response that produced the audio.
1263+
*/
1264+
response_id: string;
1265+
1266+
/**
1267+
* The event type, must be `output_audio_buffer.stopped`.
1268+
*/
1269+
type: 'output_audio_buffer.stopped';
1270+
}
1271+
1272+
/**
1273+
* **WebRTC Only:** Emitted when the output audio buffer is cleared. This happens
1274+
* either in VAD mode when the user has interrupted
1275+
* (`input_audio_buffer.speech_started`), or when the client has emitted the
1276+
* `output_audio_buffer.clear` event to manually cut off the current audio
1277+
* response.
1278+
* [Learn more](https://platform.openai.com/docs/guides/realtime-model-capabilities#client-and-server-events-for-audio-in-webrtc).
1279+
*/
1280+
export interface OutputAudioBufferCleared {
1281+
/**
1282+
* The unique ID of the server event.
1283+
*/
1284+
event_id: string;
1285+
1286+
/**
1287+
* The unique ID of the response that produced the audio.
1288+
*/
1289+
response_id: string;
1290+
1291+
/**
1292+
* The event type, must be `output_audio_buffer.cleared`.
1293+
*/
1294+
type: 'output_audio_buffer.cleared';
1295+
}
12001296
}
12011297

12021298
/**

src/resources/beta/threads/threads.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,7 @@ export interface ThreadCreateAndRunParamsBase {
686686
* Override the tools the assistant can use for this run. This is useful for
687687
* modifying the behavior on a per-run basis.
688688
*/
689-
tools?: Array<
690-
AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool | AssistantsAPI.FunctionTool
691-
> | null;
689+
tools?: Array<AssistantsAPI.AssistantTool> | null;
692690

693691
/**
694692
* An alternative to sampling with temperature, called nucleus sampling, where the

0 commit comments

Comments
 (0)