@@ -4,6 +4,7 @@ import * as Core from 'openai/core';
4
4
import { APIResource } from 'openai/resource' ;
5
5
import { isRequestOptions } from 'openai/core' ;
6
6
import * as AssistantsAPI from 'openai/resources/beta/assistants/assistants' ;
7
+ import * as Shared from 'openai/resources/shared' ;
7
8
import * as FilesAPI from 'openai/resources/beta/assistants/files' ;
8
9
import { CursorPage , type CursorPageParams } from 'openai/pagination' ;
9
10
@@ -163,47 +164,13 @@ export namespace Assistant {
163
164
}
164
165
165
166
export interface Function {
166
- /**
167
- * The function definition.
168
- */
169
- function : Function . Function ;
167
+ function : Shared . FunctionObject ;
170
168
171
169
/**
172
170
* The type of tool being defined: `function`
173
171
*/
174
172
type : 'function' ;
175
173
}
176
-
177
- export namespace Function {
178
- /**
179
- * The function definition.
180
- */
181
- export interface Function {
182
- /**
183
- * A description of what the function does, used by the model to choose when and
184
- * how to call the function.
185
- */
186
- description : string ;
187
-
188
- /**
189
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
190
- * underscores and dashes, with a maximum length of 64.
191
- */
192
- name : string ;
193
-
194
- /**
195
- * The parameters the functions accepts, described as a JSON Schema object. See the
196
- * [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
197
- * examples, and the
198
- * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
199
- * documentation about the format.
200
- *
201
- * To describe a function that accepts no parameters, provide the value
202
- * `{"type": "object", "properties": {}}`.
203
- */
204
- parameters : Record < string , unknown > ;
205
- }
206
- }
207
174
}
208
175
209
176
export interface AssistantDeleted {
@@ -282,47 +249,13 @@ export namespace AssistantCreateParams {
282
249
}
283
250
284
251
export interface AssistantToolsFunction {
285
- /**
286
- * The function definition.
287
- */
288
- function : AssistantToolsFunction . Function ;
252
+ function : Shared . FunctionObject ;
289
253
290
254
/**
291
255
* The type of tool being defined: `function`
292
256
*/
293
257
type : 'function' ;
294
258
}
295
-
296
- export namespace AssistantToolsFunction {
297
- /**
298
- * The function definition.
299
- */
300
- export interface Function {
301
- /**
302
- * A description of what the function does, used by the model to choose when and
303
- * how to call the function.
304
- */
305
- description : string ;
306
-
307
- /**
308
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
309
- * underscores and dashes, with a maximum length of 64.
310
- */
311
- name : string ;
312
-
313
- /**
314
- * The parameters the functions accepts, described as a JSON Schema object. See the
315
- * [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
316
- * examples, and the
317
- * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
318
- * documentation about the format.
319
- *
320
- * To describe a function that accepts no parameters, provide the value
321
- * `{"type": "object", "properties": {}}`.
322
- */
323
- parameters : Record < string , unknown > ;
324
- }
325
- }
326
259
}
327
260
328
261
export interface AssistantUpdateParams {
@@ -395,47 +328,13 @@ export namespace AssistantUpdateParams {
395
328
}
396
329
397
330
export interface AssistantToolsFunction {
398
- /**
399
- * The function definition.
400
- */
401
- function : AssistantToolsFunction . Function ;
331
+ function : Shared . FunctionObject ;
402
332
403
333
/**
404
334
* The type of tool being defined: `function`
405
335
*/
406
336
type : 'function' ;
407
337
}
408
-
409
- export namespace AssistantToolsFunction {
410
- /**
411
- * The function definition.
412
- */
413
- export interface Function {
414
- /**
415
- * A description of what the function does, used by the model to choose when and
416
- * how to call the function.
417
- */
418
- description : string ;
419
-
420
- /**
421
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
422
- * underscores and dashes, with a maximum length of 64.
423
- */
424
- name : string ;
425
-
426
- /**
427
- * The parameters the functions accepts, described as a JSON Schema object. See the
428
- * [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
429
- * examples, and the
430
- * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
431
- * documentation about the format.
432
- *
433
- * To describe a function that accepts no parameters, provide the value
434
- * `{"type": "object", "properties": {}}`.
435
- */
436
- parameters : Record < string , unknown > ;
437
- }
438
- }
439
338
}
440
339
441
340
export interface AssistantListParams extends CursorPageParams {
0 commit comments