Skip to content

Commit ca40534

Browse files
feat(api): add new Response completed_at prop
1 parent 80dee2f commit ca40534

File tree

8 files changed

+77
-29
lines changed

8 files changed

+77
-29
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 136
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-75926226b642ebb2cb415694da9dff35e8ab40145ac1b791cefb82a83809db4d.yml
3-
openapi_spec_hash: 6a0e391b0ba5747b6b4a3e5fe21de4da
4-
config_hash: adcf23ecf5f84d3cadf1d71e82ec636a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9442fa9212dd61aac2bb0edd19744bee381e75888712f9098bc6ebb92c52b557.yml
3+
openapi_spec_hash: f87823d164b7a8f72a42eba04e482a99
4+
config_hash: ad7136f7366fddec432ec378939e58a7

src/resources/audio/speech.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ export interface SpeechCreateParams {
4646
model: (string & {}) | SpeechModel;
4747

4848
/**
49-
* The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
50-
* `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
51-
* `verse`. Previews of the voices are available in the
49+
* The voice to use when generating the audio. Supported built-in voices are
50+
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
51+
* `shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
52+
* in the
5253
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
5354
*/
5455
voice:

src/resources/chat/completions/completions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,9 @@ export interface ChatCompletionAudioParam {
486486
format: 'wav' | 'aac' | 'mp3' | 'flac' | 'opus' | 'pcm16';
487487

488488
/**
489-
* The voice the model uses to respond. Supported voices are `alloy`, `ash`,
490-
* `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
489+
* The voice the model uses to respond. Supported built-in voices are `alloy`,
490+
* `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
491+
* `marin`, and `cedar`.
491492
*/
492493
voice:
493494
| (string & {})

src/resources/images.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export class Images extends APIResource {
2828

2929
/**
3030
* Creates an edited or extended image given one or more source images and a
31-
* prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`.
31+
* prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
32+
* and `gpt-image-1-mini`) and `dall-e-2`.
3233
*
3334
* @example
3435
* ```ts

src/resources/realtime/realtime.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,10 +1256,10 @@ export interface RealtimeAudioConfigOutput {
12561256
speed?: number;
12571257

12581258
/**
1259-
* The voice the model uses to respond. Voice cannot be changed during the session
1260-
* once the model has responded with audio at least once. Current voice options are
1261-
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
1262-
* and `cedar`. We recommend `marin` and `cedar` for best quality.
1259+
* The voice the model uses to respond. Supported built-in voices are `alloy`,
1260+
* `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
1261+
* `cedar`. Voice cannot be changed during the session once the model has responded
1262+
* with audio at least once. We recommend `marin` and `cedar` for best quality.
12631263
*/
12641264
voice?:
12651265
| (string & {})
@@ -2121,10 +2121,10 @@ export namespace RealtimeResponseCreateAudioOutput {
21212121
format?: RealtimeAPI.RealtimeAudioFormats;
21222122

21232123
/**
2124-
* The voice the model uses to respond. Voice cannot be changed during the session
2125-
* once the model has responded with audio at least once. Current voice options are
2126-
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
2127-
* and `cedar`. We recommend `marin` and `cedar` for best quality.
2124+
* The voice the model uses to respond. Supported built-in voices are `alloy`,
2125+
* `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
2126+
* `cedar`. Voice cannot be changed during the session once the model has responded
2127+
* with audio at least once.
21282128
*/
21292129
voice?:
21302130
| (string & {})

src/resources/responses/input-tokens.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ export interface InputTokenCountParams {
8989
text?: InputTokenCountParams.Text | null;
9090

9191
/**
92-
* How the model should select which tool (or tools) to use when generating a
93-
* response. See the `tools` parameter to see how to specify which tools the model
94-
* can call.
92+
* Controls which tool the model should use, if any.
9593
*/
9694
tool_choice?:
9795
| ResponsesAPI.ToolChoiceOptions

src/resources/responses/responses.ts

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,14 @@ export interface Response {
595595
background?: boolean | null;
596596

597597
/**
598-
* The conversation that this response belongs to. Input items and output items
599-
* from this response are automatically added to this conversation.
598+
* Unix timestamp (in seconds) of when this Response was completed. Only present
599+
* when the status is `completed`.
600+
*/
601+
completed_at?: number | null;
602+
603+
/**
604+
* The conversation that this response belonged to. Input items and output items
605+
* from this response were automatically added to this conversation.
600606
*/
601607
conversation?: Response.Conversation | null;
602608

@@ -727,12 +733,12 @@ export namespace Response {
727733
}
728734

729735
/**
730-
* The conversation that this response belongs to. Input items and output items
731-
* from this response are automatically added to this conversation.
736+
* The conversation that this response belonged to. Input items and output items
737+
* from this response were automatically added to this conversation.
732738
*/
733739
export interface Conversation {
734740
/**
735-
* The unique ID of the conversation.
741+
* The unique ID of the conversation that this response was associated with.
736742
*/
737743
id: string;
738744
}
@@ -1159,13 +1165,19 @@ export interface ResponseCompactionItem {
11591165
*/
11601166
id: string;
11611167

1168+
/**
1169+
* The encrypted content that was produced by compaction.
1170+
*/
11621171
encrypted_content: string;
11631172

11641173
/**
11651174
* The type of the item. Always `compaction`.
11661175
*/
11671176
type: 'compaction';
11681177

1178+
/**
1179+
* The identifier of the actor that created the item.
1180+
*/
11691181
created_by?: string;
11701182
}
11711183

@@ -1174,6 +1186,9 @@ export interface ResponseCompactionItem {
11741186
* [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).
11751187
*/
11761188
export interface ResponseCompactionItemParam {
1189+
/**
1190+
* The encrypted content of the compaction summary.
1191+
*/
11771192
encrypted_content: string;
11781193

11791194
/**
@@ -2172,13 +2187,16 @@ export interface ResponseFunctionCallArgumentsDoneEvent {
21722187
}
21732188

21742189
/**
2175-
* A text input to the model.
2190+
* A piece of message content, such as text, an image, or a file.
21762191
*/
21772192
export type ResponseFunctionCallOutputItem =
21782193
| ResponseInputTextContent
21792194
| ResponseInputImageContent
21802195
| ResponseInputFileContent;
21812196

2197+
/**
2198+
* An array of content outputs (text, image, file) for the function tool call.
2199+
*/
21822200
export type ResponseFunctionCallOutputItemList = Array<ResponseFunctionCallOutputItem>;
21832201

21842202
/**
@@ -2285,7 +2303,7 @@ export namespace ResponseFunctionShellToolCall {
22852303
}
22862304

22872305
/**
2288-
* The output of a shell tool call.
2306+
* The output of a shell tool call that was emitted.
22892307
*/
22902308
export interface ResponseFunctionShellToolCallOutput {
22912309
/**
@@ -2315,12 +2333,15 @@ export interface ResponseFunctionShellToolCallOutput {
23152333
*/
23162334
type: 'shell_call_output';
23172335

2336+
/**
2337+
* The identifier of the actor that created the item.
2338+
*/
23182339
created_by?: string;
23192340
}
23202341

23212342
export namespace ResponseFunctionShellToolCallOutput {
23222343
/**
2323-
* The content of a shell call output.
2344+
* The content of a shell tool call output that was emitted.
23242345
*/
23252346
export interface Output {
23262347
/**
@@ -2329,10 +2350,19 @@ export namespace ResponseFunctionShellToolCallOutput {
23292350
*/
23302351
outcome: Output.Timeout | Output.Exit;
23312352

2353+
/**
2354+
* The standard error output that was captured.
2355+
*/
23322356
stderr: string;
23332357

2358+
/**
2359+
* The standard output that was captured.
2360+
*/
23342361
stdout: string;
23352362

2363+
/**
2364+
* The identifier of the actor that created the item.
2365+
*/
23362366
created_by?: string;
23372367
}
23382368

@@ -2471,7 +2501,7 @@ export namespace ResponseFunctionWebSearch {
24712501
*/
24722502
export interface Search {
24732503
/**
2474-
* The search query.
2504+
* [DEPRECATED] The search query.
24752505
*/
24762506
query: string;
24772507

@@ -2480,6 +2510,11 @@ export namespace ResponseFunctionWebSearch {
24802510
*/
24812511
type: 'search';
24822512

2513+
/**
2514+
* The search queries.
2515+
*/
2516+
queries?: Array<string>;
2517+
24832518
/**
24842519
* The sources used in the search.
24852520
*/
@@ -5731,6 +5766,9 @@ export namespace Tool {
57315766
*/
57325767
file_ids?: Array<string>;
57335768

5769+
/**
5770+
* The memory limit for the code interpreter container.
5771+
*/
57345772
memory_limit?: '1g' | '4g' | '16g' | '64g' | null;
57355773
}
57365774
}

src/resources/videos.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,18 @@ export interface Video {
140140
status: 'queued' | 'in_progress' | 'completed' | 'failed';
141141
}
142142

143+
/**
144+
* An error that occurred while generating the response.
145+
*/
143146
export interface VideoCreateError {
147+
/**
148+
* A machine-readable error code that was returned.
149+
*/
144150
code: string;
145151

152+
/**
153+
* A human-readable description of the error that was returned.
154+
*/
146155
message: string;
147156
}
148157

0 commit comments

Comments
 (0)