openai 4.87.3 → 4.87.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/batches.d.ts +4 -4
- package/resources/batches.d.ts.map +1 -1
- package/resources/chat/completions/completions.d.ts +12 -6
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/responses/index.d.ts +1 -1
- package/resources/responses/index.d.ts.map +1 -1
- package/resources/responses/index.js +1 -2
- package/resources/responses/index.js.map +1 -1
- package/resources/responses/index.mjs +1 -1
- package/resources/responses/index.mjs.map +1 -1
- package/resources/responses/input-items.d.ts +7 -121
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/input-items.js +4 -7
- package/resources/responses/input-items.js.map +1 -1
- package/resources/responses/input-items.mjs +3 -5
- package/resources/responses/input-items.mjs.map +1 -1
- package/resources/responses/responses.d.ts +152 -26
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +5 -2
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +4 -2
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.ts +2 -2
- package/resources/shared.d.ts.map +1 -1
- package/src/index.ts +4 -0
- package/src/resources/batches.ts +4 -4
- package/src/resources/chat/completions/completions.ts +12 -6
- package/src/resources/responses/index.ts +1 -6
- package/src/resources/responses/input-items.ts +10 -199
- package/src/resources/responses/input-items.ts.orig +114 -0
- package/src/resources/responses/responses.ts +186 -31
- package/src/resources/shared.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
ResponseItemListDataPage,
|
|
5
|
-
InputItems,
|
|
6
|
-
type ResponseItemList,
|
|
7
|
-
type InputItemListParams,
|
|
8
|
-
} from './input-items';
|
|
3
|
+
export { InputItems, type ResponseItemList, type InputItemListParams } from './input-items';
|
|
9
4
|
export { Responses } from './responses';
|
|
@@ -4,7 +4,8 @@ import { APIResource } from '../../resource';
|
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
6
|
import * as ResponsesAPI from './responses';
|
|
7
|
-
import {
|
|
7
|
+
import { ResponseItemsPage } from './responses';
|
|
8
|
+
import { type CursorPageParams } from '../../pagination';
|
|
8
9
|
|
|
9
10
|
export class InputItems extends APIResource {
|
|
10
11
|
/**
|
|
@@ -14,67 +15,26 @@ export class InputItems extends APIResource {
|
|
|
14
15
|
responseId: string,
|
|
15
16
|
query?: InputItemListParams,
|
|
16
17
|
options?: Core.RequestOptions,
|
|
17
|
-
): Core.PagePromise<
|
|
18
|
-
ResponseItemListDataPage,
|
|
19
|
-
| ResponseItemList.Message
|
|
20
|
-
| ResponsesAPI.ResponseOutputMessage
|
|
21
|
-
| ResponsesAPI.ResponseFileSearchToolCall
|
|
22
|
-
| ResponsesAPI.ResponseComputerToolCall
|
|
23
|
-
| ResponseItemList.ComputerCallOutput
|
|
24
|
-
| ResponsesAPI.ResponseFunctionWebSearch
|
|
25
|
-
| ResponsesAPI.ResponseFunctionToolCall
|
|
26
|
-
| ResponseItemList.FunctionCallOutput
|
|
27
|
-
>;
|
|
18
|
+
): Core.PagePromise<ResponseItemsPage, ResponsesAPI.ResponseItem>;
|
|
28
19
|
list(
|
|
29
20
|
responseId: string,
|
|
30
21
|
options?: Core.RequestOptions,
|
|
31
|
-
): Core.PagePromise<
|
|
32
|
-
ResponseItemListDataPage,
|
|
33
|
-
| ResponseItemList.Message
|
|
34
|
-
| ResponsesAPI.ResponseOutputMessage
|
|
35
|
-
| ResponsesAPI.ResponseFileSearchToolCall
|
|
36
|
-
| ResponsesAPI.ResponseComputerToolCall
|
|
37
|
-
| ResponseItemList.ComputerCallOutput
|
|
38
|
-
| ResponsesAPI.ResponseFunctionWebSearch
|
|
39
|
-
| ResponsesAPI.ResponseFunctionToolCall
|
|
40
|
-
| ResponseItemList.FunctionCallOutput
|
|
41
|
-
>;
|
|
22
|
+
): Core.PagePromise<ResponseItemsPage, ResponsesAPI.ResponseItem>;
|
|
42
23
|
list(
|
|
43
24
|
responseId: string,
|
|
44
25
|
query: InputItemListParams | Core.RequestOptions = {},
|
|
45
26
|
options?: Core.RequestOptions,
|
|
46
|
-
): Core.PagePromise<
|
|
47
|
-
ResponseItemListDataPage,
|
|
48
|
-
| ResponseItemList.Message
|
|
49
|
-
| ResponsesAPI.ResponseOutputMessage
|
|
50
|
-
| ResponsesAPI.ResponseFileSearchToolCall
|
|
51
|
-
| ResponsesAPI.ResponseComputerToolCall
|
|
52
|
-
| ResponseItemList.ComputerCallOutput
|
|
53
|
-
| ResponsesAPI.ResponseFunctionWebSearch
|
|
54
|
-
| ResponsesAPI.ResponseFunctionToolCall
|
|
55
|
-
| ResponseItemList.FunctionCallOutput
|
|
56
|
-
> {
|
|
27
|
+
): Core.PagePromise<ResponseItemsPage, ResponsesAPI.ResponseItem> {
|
|
57
28
|
if (isRequestOptions(query)) {
|
|
58
29
|
return this.list(responseId, {}, query);
|
|
59
30
|
}
|
|
60
|
-
return this._client.getAPIList(`/responses/${responseId}/input_items`,
|
|
31
|
+
return this._client.getAPIList(`/responses/${responseId}/input_items`, ResponseItemsPage, {
|
|
61
32
|
query,
|
|
62
33
|
...options,
|
|
63
34
|
});
|
|
64
35
|
}
|
|
65
36
|
}
|
|
66
37
|
|
|
67
|
-
export class ResponseItemListDataPage extends CursorPage<
|
|
68
|
-
| ResponseItemList.Message
|
|
69
|
-
| ResponsesAPI.ResponseOutputMessage
|
|
70
|
-
| ResponsesAPI.ResponseFileSearchToolCall
|
|
71
|
-
| ResponsesAPI.ResponseComputerToolCall
|
|
72
|
-
| ResponseItemList.ComputerCallOutput
|
|
73
|
-
| ResponsesAPI.ResponseFunctionWebSearch
|
|
74
|
-
| ResponsesAPI.ResponseFunctionToolCall
|
|
75
|
-
| ResponseItemList.FunctionCallOutput
|
|
76
|
-
> {}
|
|
77
|
-
|
|
78
38
|
/**
|
|
79
39
|
* A list of Response items.
|
|
80
40
|
*/
|
|
@@ -82,16 +42,7 @@ export interface ResponseItemList {
|
|
|
82
42
|
/**
|
|
83
43
|
* A list of items used to generate this response.
|
|
84
44
|
*/
|
|
85
|
-
data: Array<
|
|
86
|
-
| ResponseItemList.Message
|
|
87
|
-
| ResponsesAPI.ResponseOutputMessage
|
|
88
|
-
| ResponsesAPI.ResponseFileSearchToolCall
|
|
89
|
-
| ResponsesAPI.ResponseComputerToolCall
|
|
90
|
-
| ResponseItemList.ComputerCallOutput
|
|
91
|
-
| ResponsesAPI.ResponseFunctionWebSearch
|
|
92
|
-
| ResponsesAPI.ResponseFunctionToolCall
|
|
93
|
-
| ResponseItemList.FunctionCallOutput
|
|
94
|
-
>;
|
|
45
|
+
data: Array<ResponsesAPI.ResponseItem>;
|
|
95
46
|
|
|
96
47
|
/**
|
|
97
48
|
* The ID of the first item in the list.
|
|
@@ -114,142 +65,6 @@ export interface ResponseItemList {
|
|
|
114
65
|
object: 'list';
|
|
115
66
|
}
|
|
116
67
|
|
|
117
|
-
export namespace ResponseItemList {
|
|
118
|
-
export interface Message {
|
|
119
|
-
/**
|
|
120
|
-
* The unique ID of the message input.
|
|
121
|
-
*/
|
|
122
|
-
id: string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* A list of one or many input items to the model, containing different content
|
|
126
|
-
* types.
|
|
127
|
-
*/
|
|
128
|
-
content: ResponsesAPI.ResponseInputMessageContentList;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The role of the message input. One of `user`, `system`, or `developer`.
|
|
132
|
-
*/
|
|
133
|
-
role: 'user' | 'system' | 'developer';
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* The status of item. One of `in_progress`, `completed`, or `incomplete`.
|
|
137
|
-
* Populated when items are returned via API.
|
|
138
|
-
*/
|
|
139
|
-
status?: 'in_progress' | 'completed' | 'incomplete';
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* The type of the message input. Always set to `message`.
|
|
143
|
-
*/
|
|
144
|
-
type?: 'message';
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export interface ComputerCallOutput {
|
|
148
|
-
/**
|
|
149
|
-
* The unique ID of the computer call tool output.
|
|
150
|
-
*/
|
|
151
|
-
id: string;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* The ID of the computer tool call that produced the output.
|
|
155
|
-
*/
|
|
156
|
-
call_id: string;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* A computer screenshot image used with the computer use tool.
|
|
160
|
-
*/
|
|
161
|
-
output: ComputerCallOutput.Output;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* The type of the computer tool call output. Always `computer_call_output`.
|
|
165
|
-
*/
|
|
166
|
-
type: 'computer_call_output';
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* The safety checks reported by the API that have been acknowledged by the
|
|
170
|
-
* developer.
|
|
171
|
-
*/
|
|
172
|
-
acknowledged_safety_checks?: Array<ComputerCallOutput.AcknowledgedSafetyCheck>;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* The status of the message input. One of `in_progress`, `completed`, or
|
|
176
|
-
* `incomplete`. Populated when input items are returned via API.
|
|
177
|
-
*/
|
|
178
|
-
status?: 'in_progress' | 'completed' | 'incomplete';
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export namespace ComputerCallOutput {
|
|
182
|
-
/**
|
|
183
|
-
* A computer screenshot image used with the computer use tool.
|
|
184
|
-
*/
|
|
185
|
-
export interface Output {
|
|
186
|
-
/**
|
|
187
|
-
* Specifies the event type. For a computer screenshot, this property is always set
|
|
188
|
-
* to `computer_screenshot`.
|
|
189
|
-
*/
|
|
190
|
-
type: 'computer_screenshot';
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* The identifier of an uploaded file that contains the screenshot.
|
|
194
|
-
*/
|
|
195
|
-
file_id?: string;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* The URL of the screenshot image.
|
|
199
|
-
*/
|
|
200
|
-
image_url?: string;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* A pending safety check for the computer call.
|
|
205
|
-
*/
|
|
206
|
-
export interface AcknowledgedSafetyCheck {
|
|
207
|
-
/**
|
|
208
|
-
* The ID of the pending safety check.
|
|
209
|
-
*/
|
|
210
|
-
id: string;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* The type of the pending safety check.
|
|
214
|
-
*/
|
|
215
|
-
code: string;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Details about the pending safety check.
|
|
219
|
-
*/
|
|
220
|
-
message: string;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export interface FunctionCallOutput {
|
|
225
|
-
/**
|
|
226
|
-
* The unique ID of the function call tool output.
|
|
227
|
-
*/
|
|
228
|
-
id: string;
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* The unique ID of the function tool call generated by the model.
|
|
232
|
-
*/
|
|
233
|
-
call_id: string;
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* A JSON string of the output of the function tool call.
|
|
237
|
-
*/
|
|
238
|
-
output: string;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* The type of the function tool call output. Always `function_call_output`.
|
|
242
|
-
*/
|
|
243
|
-
type: 'function_call_output';
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
247
|
-
* Populated when items are returned via API.
|
|
248
|
-
*/
|
|
249
|
-
status?: 'in_progress' | 'completed' | 'incomplete';
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
68
|
export interface InputItemListParams extends CursorPageParams {
|
|
254
69
|
/**
|
|
255
70
|
* An item ID to list items before, used in pagination.
|
|
@@ -265,12 +80,8 @@ export interface InputItemListParams extends CursorPageParams {
|
|
|
265
80
|
order?: 'asc' | 'desc';
|
|
266
81
|
}
|
|
267
82
|
|
|
268
|
-
InputItems.ResponseItemListDataPage = ResponseItemListDataPage;
|
|
269
|
-
|
|
270
83
|
export declare namespace InputItems {
|
|
271
|
-
export {
|
|
272
|
-
type ResponseItemList as ResponseItemList,
|
|
273
|
-
ResponseItemListDataPage as ResponseItemListDataPage,
|
|
274
|
-
type InputItemListParams as InputItemListParams,
|
|
275
|
-
};
|
|
84
|
+
export { type ResponseItemList as ResponseItemList, type InputItemListParams as InputItemListParams };
|
|
276
85
|
}
|
|
86
|
+
|
|
87
|
+
export { ResponseItemsPage };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
import * as ResponsesAPI from './responses';
|
|
7
|
+
import { ResponseItemsPage } from './responses';
|
|
8
|
+
import { type CursorPageParams } from '../../pagination';
|
|
9
|
+
|
|
10
|
+
export class InputItems extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns a list of input items for a given response.
|
|
13
|
+
*/
|
|
14
|
+
list(
|
|
15
|
+
responseId: string,
|
|
16
|
+
query?: InputItemListParams,
|
|
17
|
+
options?: Core.RequestOptions,
|
|
18
|
+
): Core.PagePromise<ResponseItemsPage, ResponsesAPI.ResponseItem>;
|
|
19
|
+
list(
|
|
20
|
+
responseId: string,
|
|
21
|
+
options?: Core.RequestOptions,
|
|
22
|
+
): Core.PagePromise<ResponseItemsPage, ResponsesAPI.ResponseItem>;
|
|
23
|
+
list(
|
|
24
|
+
responseId: string,
|
|
25
|
+
query: InputItemListParams | Core.RequestOptions = {},
|
|
26
|
+
options?: Core.RequestOptions,
|
|
27
|
+
): Core.PagePromise<ResponseItemsPage, ResponsesAPI.ResponseItem> {
|
|
28
|
+
if (isRequestOptions(query)) {
|
|
29
|
+
return this.list(responseId, {}, query);
|
|
30
|
+
}
|
|
31
|
+
return this._client.getAPIList(`/responses/${responseId}/input_items`, ResponseItemsPage, {
|
|
32
|
+
query,
|
|
33
|
+
...options,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
<<<<<<< HEAD
|
|
39
|
+
export class ResponseItemListDataPage extends CursorPage<
|
|
40
|
+
// @ts-ignore some items don't necessarily have the `id` property
|
|
41
|
+
| ResponseItemList.Message
|
|
42
|
+
| ResponsesAPI.ResponseOutputMessage
|
|
43
|
+
| ResponsesAPI.ResponseFileSearchToolCall
|
|
44
|
+
| ResponsesAPI.ResponseComputerToolCall
|
|
45
|
+
| ResponseItemList.ComputerCallOutput
|
|
46
|
+
| ResponsesAPI.ResponseFunctionWebSearch
|
|
47
|
+
| ResponsesAPI.ResponseFunctionToolCall
|
|
48
|
+
| ResponseItemList.FunctionCallOutput
|
|
49
|
+
> {}
|
|
50
|
+
|
|
51
|
+
||||||| parent of e5ea4a71 (fix(types): improve responses type names (#1392))
|
|
52
|
+
export class ResponseItemListDataPage extends CursorPage<
|
|
53
|
+
| ResponseItemList.Message
|
|
54
|
+
| ResponsesAPI.ResponseOutputMessage
|
|
55
|
+
| ResponsesAPI.ResponseFileSearchToolCall
|
|
56
|
+
| ResponsesAPI.ResponseComputerToolCall
|
|
57
|
+
| ResponseItemList.ComputerCallOutput
|
|
58
|
+
| ResponsesAPI.ResponseFunctionWebSearch
|
|
59
|
+
| ResponsesAPI.ResponseFunctionToolCall
|
|
60
|
+
| ResponseItemList.FunctionCallOutput
|
|
61
|
+
> {}
|
|
62
|
+
|
|
63
|
+
=======
|
|
64
|
+
>>>>>>> e5ea4a71 (fix(types): improve responses type names (#1392))
|
|
65
|
+
/**
|
|
66
|
+
* A list of Response items.
|
|
67
|
+
*/
|
|
68
|
+
export interface ResponseItemList {
|
|
69
|
+
/**
|
|
70
|
+
* A list of items used to generate this response.
|
|
71
|
+
*/
|
|
72
|
+
data: Array<ResponsesAPI.ResponseItem>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The ID of the first item in the list.
|
|
76
|
+
*/
|
|
77
|
+
first_id: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Whether there are more items available.
|
|
81
|
+
*/
|
|
82
|
+
has_more: boolean;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The ID of the last item in the list.
|
|
86
|
+
*/
|
|
87
|
+
last_id: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The type of object returned, must be `list`.
|
|
91
|
+
*/
|
|
92
|
+
object: 'list';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface InputItemListParams extends CursorPageParams {
|
|
96
|
+
/**
|
|
97
|
+
* An item ID to list items before, used in pagination.
|
|
98
|
+
*/
|
|
99
|
+
before?: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The order to return the input items in. Default is `asc`.
|
|
103
|
+
*
|
|
104
|
+
* - `asc`: Return the input items in ascending order.
|
|
105
|
+
* - `desc`: Return the input items in descending order.
|
|
106
|
+
*/
|
|
107
|
+
order?: 'asc' | 'desc';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export declare namespace InputItems {
|
|
111
|
+
export { type ResponseItemList as ResponseItemList, type InputItemListParams as InputItemListParams };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export { ResponseItemsPage };
|
|
@@ -9,12 +9,13 @@ import {
|
|
|
9
9
|
import * as Core from '../../core';
|
|
10
10
|
import { APIPromise, isRequestOptions } from '../../core';
|
|
11
11
|
import { APIResource } from '../../resource';
|
|
12
|
-
import { Stream } from '../../streaming';
|
|
13
12
|
import * as Shared from '../shared';
|
|
14
13
|
import * as InputItemsAPI from './input-items';
|
|
15
|
-
import { InputItemListParams, InputItems, ResponseItemList
|
|
14
|
+
import { InputItemListParams, InputItems, ResponseItemList } from './input-items';
|
|
16
15
|
import * as ResponsesAPI from './responses';
|
|
17
16
|
import { ResponseStream, ResponseStreamParams } from '../../lib/responses/ResponseStream';
|
|
17
|
+
import { CursorPage } from '../../pagination';
|
|
18
|
+
import { Stream } from '../../streaming';
|
|
18
19
|
|
|
19
20
|
export interface ParsedResponseOutputText<ParsedT> extends ResponseOutputText {
|
|
20
21
|
parsed: ParsedT | null;
|
|
@@ -137,6 +138,8 @@ export class Responses extends APIResource {
|
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
|
|
141
|
+
export class ResponseItemsPage extends CursorPage<ResponseItem> {}
|
|
142
|
+
|
|
140
143
|
/**
|
|
141
144
|
* A tool that controls a virtual computer. Learn more about the
|
|
142
145
|
* [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
|
|
@@ -966,6 +969,83 @@ export namespace ResponseComputerToolCall {
|
|
|
966
969
|
}
|
|
967
970
|
}
|
|
968
971
|
|
|
972
|
+
export interface ResponseComputerToolCallOutputItem {
|
|
973
|
+
/**
|
|
974
|
+
* The unique ID of the computer call tool output.
|
|
975
|
+
*/
|
|
976
|
+
id: string;
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* The ID of the computer tool call that produced the output.
|
|
980
|
+
*/
|
|
981
|
+
call_id: string;
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* A computer screenshot image used with the computer use tool.
|
|
985
|
+
*/
|
|
986
|
+
output: ResponseComputerToolCallOutputScreenshot;
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* The type of the computer tool call output. Always `computer_call_output`.
|
|
990
|
+
*/
|
|
991
|
+
type: 'computer_call_output';
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* The safety checks reported by the API that have been acknowledged by the
|
|
995
|
+
* developer.
|
|
996
|
+
*/
|
|
997
|
+
acknowledged_safety_checks?: Array<ResponseComputerToolCallOutputItem.AcknowledgedSafetyCheck>;
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* The status of the message input. One of `in_progress`, `completed`, or
|
|
1001
|
+
* `incomplete`. Populated when input items are returned via API.
|
|
1002
|
+
*/
|
|
1003
|
+
status?: 'in_progress' | 'completed' | 'incomplete';
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
export namespace ResponseComputerToolCallOutputItem {
|
|
1007
|
+
/**
|
|
1008
|
+
* A pending safety check for the computer call.
|
|
1009
|
+
*/
|
|
1010
|
+
export interface AcknowledgedSafetyCheck {
|
|
1011
|
+
/**
|
|
1012
|
+
* The ID of the pending safety check.
|
|
1013
|
+
*/
|
|
1014
|
+
id: string;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* The type of the pending safety check.
|
|
1018
|
+
*/
|
|
1019
|
+
code: string;
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* Details about the pending safety check.
|
|
1023
|
+
*/
|
|
1024
|
+
message: string;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* A computer screenshot image used with the computer use tool.
|
|
1030
|
+
*/
|
|
1031
|
+
export interface ResponseComputerToolCallOutputScreenshot {
|
|
1032
|
+
/**
|
|
1033
|
+
* Specifies the event type. For a computer screenshot, this property is always set
|
|
1034
|
+
* to `computer_screenshot`.
|
|
1035
|
+
*/
|
|
1036
|
+
type: 'computer_screenshot';
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* The identifier of an uploaded file that contains the screenshot.
|
|
1040
|
+
*/
|
|
1041
|
+
file_id?: string;
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* The URL of the screenshot image.
|
|
1045
|
+
*/
|
|
1046
|
+
image_url?: string;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
969
1049
|
/**
|
|
970
1050
|
* Multi-modal input and output contents.
|
|
971
1051
|
*/
|
|
@@ -1362,11 +1442,6 @@ export interface ResponseFunctionCallArgumentsDoneEvent {
|
|
|
1362
1442
|
* for more information.
|
|
1363
1443
|
*/
|
|
1364
1444
|
export interface ResponseFunctionToolCall {
|
|
1365
|
-
/**
|
|
1366
|
-
* The unique ID of the function tool call.
|
|
1367
|
-
*/
|
|
1368
|
-
id: string;
|
|
1369
|
-
|
|
1370
1445
|
/**
|
|
1371
1446
|
* A JSON string of the arguments to pass to the function.
|
|
1372
1447
|
*/
|
|
@@ -1387,6 +1462,51 @@ export interface ResponseFunctionToolCall {
|
|
|
1387
1462
|
*/
|
|
1388
1463
|
type: 'function_call';
|
|
1389
1464
|
|
|
1465
|
+
/**
|
|
1466
|
+
* The unique ID of the function tool call.
|
|
1467
|
+
*/
|
|
1468
|
+
id?: string;
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
1472
|
+
* Populated when items are returned via API.
|
|
1473
|
+
*/
|
|
1474
|
+
status?: 'in_progress' | 'completed' | 'incomplete';
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* A tool call to run a function. See the
|
|
1479
|
+
* [function calling guide](https://platform.openai.com/docs/guides/function-calling)
|
|
1480
|
+
* for more information.
|
|
1481
|
+
*/
|
|
1482
|
+
export interface ResponseFunctionToolCallItem extends ResponseFunctionToolCall {
|
|
1483
|
+
/**
|
|
1484
|
+
* The unique ID of the function call tool output.
|
|
1485
|
+
*/
|
|
1486
|
+
id: string;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
export interface ResponseFunctionToolCallOutputItem {
|
|
1490
|
+
/**
|
|
1491
|
+
* The unique ID of the function call tool output.
|
|
1492
|
+
*/
|
|
1493
|
+
id: string;
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* The unique ID of the function tool call generated by the model.
|
|
1497
|
+
*/
|
|
1498
|
+
call_id: string;
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* A JSON string of the output of the function tool call.
|
|
1502
|
+
*/
|
|
1503
|
+
output: string;
|
|
1504
|
+
|
|
1505
|
+
/**
|
|
1506
|
+
* The type of the function tool call output. Always `function_call_output`.
|
|
1507
|
+
*/
|
|
1508
|
+
type: 'function_call_output';
|
|
1509
|
+
|
|
1390
1510
|
/**
|
|
1391
1511
|
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
1392
1512
|
* Populated when items are returned via API.
|
|
@@ -1607,7 +1727,7 @@ export namespace ResponseInputItem {
|
|
|
1607
1727
|
/**
|
|
1608
1728
|
* A computer screenshot image used with the computer use tool.
|
|
1609
1729
|
*/
|
|
1610
|
-
output:
|
|
1730
|
+
output: ResponsesAPI.ResponseComputerToolCallOutputScreenshot;
|
|
1611
1731
|
|
|
1612
1732
|
/**
|
|
1613
1733
|
* The type of the computer tool call output. Always `computer_call_output`.
|
|
@@ -1633,27 +1753,6 @@ export namespace ResponseInputItem {
|
|
|
1633
1753
|
}
|
|
1634
1754
|
|
|
1635
1755
|
export namespace ComputerCallOutput {
|
|
1636
|
-
/**
|
|
1637
|
-
* A computer screenshot image used with the computer use tool.
|
|
1638
|
-
*/
|
|
1639
|
-
export interface Output {
|
|
1640
|
-
/**
|
|
1641
|
-
* Specifies the event type. For a computer screenshot, this property is always set
|
|
1642
|
-
* to `computer_screenshot`.
|
|
1643
|
-
*/
|
|
1644
|
-
type: 'computer_screenshot';
|
|
1645
|
-
|
|
1646
|
-
/**
|
|
1647
|
-
* The identifier of an uploaded file that contains the screenshot.
|
|
1648
|
-
*/
|
|
1649
|
-
file_id?: string;
|
|
1650
|
-
|
|
1651
|
-
/**
|
|
1652
|
-
* The URL of the screenshot image.
|
|
1653
|
-
*/
|
|
1654
|
-
image_url?: string;
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
1756
|
/**
|
|
1658
1757
|
* A pending safety check for the computer call.
|
|
1659
1758
|
*/
|
|
@@ -1729,6 +1828,35 @@ export namespace ResponseInputItem {
|
|
|
1729
1828
|
*/
|
|
1730
1829
|
export type ResponseInputMessageContentList = Array<ResponseInputContent>;
|
|
1731
1830
|
|
|
1831
|
+
export interface ResponseInputMessageItem {
|
|
1832
|
+
/**
|
|
1833
|
+
* The unique ID of the message input.
|
|
1834
|
+
*/
|
|
1835
|
+
id: string;
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* A list of one or many input items to the model, containing different content
|
|
1839
|
+
* types.
|
|
1840
|
+
*/
|
|
1841
|
+
content: ResponseInputMessageContentList;
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* The role of the message input. One of `user`, `system`, or `developer`.
|
|
1845
|
+
*/
|
|
1846
|
+
role: 'user' | 'system' | 'developer';
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* The status of item. One of `in_progress`, `completed`, or `incomplete`.
|
|
1850
|
+
* Populated when items are returned via API.
|
|
1851
|
+
*/
|
|
1852
|
+
status?: 'in_progress' | 'completed' | 'incomplete';
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* The type of the message input. Always set to `message`.
|
|
1856
|
+
*/
|
|
1857
|
+
type?: 'message';
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1732
1860
|
/**
|
|
1733
1861
|
* A text input to the model.
|
|
1734
1862
|
*/
|
|
@@ -1744,6 +1872,19 @@ export interface ResponseInputText {
|
|
|
1744
1872
|
type: 'input_text';
|
|
1745
1873
|
}
|
|
1746
1874
|
|
|
1875
|
+
/**
|
|
1876
|
+
* Content item used to generate a response.
|
|
1877
|
+
*/
|
|
1878
|
+
export type ResponseItem =
|
|
1879
|
+
| ResponseInputMessageItem
|
|
1880
|
+
| ResponseOutputMessage
|
|
1881
|
+
| ResponseFileSearchToolCall
|
|
1882
|
+
| ResponseComputerToolCall
|
|
1883
|
+
| ResponseComputerToolCallOutputItem
|
|
1884
|
+
| ResponseFunctionWebSearch
|
|
1885
|
+
| ResponseFunctionToolCallItem
|
|
1886
|
+
| ResponseFunctionToolCallOutputItem;
|
|
1887
|
+
|
|
1747
1888
|
/**
|
|
1748
1889
|
* An audio output from the model.
|
|
1749
1890
|
*/
|
|
@@ -2305,6 +2446,11 @@ export interface ResponseUsage {
|
|
|
2305
2446
|
*/
|
|
2306
2447
|
input_tokens: number;
|
|
2307
2448
|
|
|
2449
|
+
/**
|
|
2450
|
+
* A detailed breakdown of the input tokens.
|
|
2451
|
+
*/
|
|
2452
|
+
input_tokens_details: ResponseUsage.InputTokensDetails;
|
|
2453
|
+
|
|
2308
2454
|
/**
|
|
2309
2455
|
* The number of output tokens.
|
|
2310
2456
|
*/
|
|
@@ -2322,6 +2468,17 @@ export interface ResponseUsage {
|
|
|
2322
2468
|
}
|
|
2323
2469
|
|
|
2324
2470
|
export namespace ResponseUsage {
|
|
2471
|
+
/**
|
|
2472
|
+
* A detailed breakdown of the input tokens.
|
|
2473
|
+
*/
|
|
2474
|
+
export interface InputTokensDetails {
|
|
2475
|
+
/**
|
|
2476
|
+
* The number of tokens that were retrieved from the cache.
|
|
2477
|
+
* [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
|
|
2478
|
+
*/
|
|
2479
|
+
cached_tokens: number;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2325
2482
|
/**
|
|
2326
2483
|
* A detailed breakdown of the output tokens.
|
|
2327
2484
|
*/
|
|
@@ -2706,13 +2863,11 @@ export interface ResponseRetrieveParams {
|
|
|
2706
2863
|
}
|
|
2707
2864
|
|
|
2708
2865
|
Responses.InputItems = InputItems;
|
|
2709
|
-
Responses.ResponseItemListDataPage = ResponseItemListDataPage;
|
|
2710
2866
|
|
|
2711
2867
|
export declare namespace Responses {
|
|
2712
2868
|
export {
|
|
2713
2869
|
InputItems as InputItems,
|
|
2714
2870
|
type ResponseItemList as ResponseItemList,
|
|
2715
|
-
ResponseItemListDataPage as ResponseItemListDataPage,
|
|
2716
2871
|
type InputItemListParams as InputItemListParams,
|
|
2717
2872
|
};
|
|
2718
2873
|
}
|
package/src/resources/shared.ts
CHANGED
|
@@ -171,10 +171,10 @@ export interface Reasoning {
|
|
|
171
171
|
* supported values are `low`, `medium`, and `high`. Reducing reasoning effort can
|
|
172
172
|
* result in faster responses and fewer tokens used on reasoning in a response.
|
|
173
173
|
*/
|
|
174
|
-
effort
|
|
174
|
+
effort?: ReasoningEffort | null;
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* **
|
|
177
|
+
* **computer_use_preview only**
|
|
178
178
|
*
|
|
179
179
|
* A summary of the reasoning performed by the model. This can be useful for
|
|
180
180
|
* debugging and understanding the model's reasoning process. One of `concise` or
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.87.
|
|
1
|
+
export const VERSION = '4.87.4'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.87.
|
|
1
|
+
export declare const VERSION = "4.87.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|