fork of hey-api/openapi-ts because I need some additional things

chore: add ajv to devDependencies

Lubos be305b3e 6770421b

+5435 -5431
+1
eslint.config.js
··· 64 64 '**/dist/', 65 65 '**/node_modules/', 66 66 'temp/', 67 + 'examples/openapi-ts-openai/src/client/**/*.ts', 67 68 'packages/openapi-ts/src/legacy/handlebars/compiled/**/*.js', 68 69 'packages/openapi-ts/src/legacy/handlebars/templates/**/*.hbs', 69 70 '**/test/generated/',
-1
examples/openapi-ts-openai/openapi-ts.config.ts
··· 6 6 input: path.resolve('..', '..', 'specs', '3.1.x', 'openai.yaml'), 7 7 output: { 8 8 format: 'prettier', 9 - lint: 'eslint', 10 9 path: './src/client', 11 10 }, 12 11 plugins: [
+1 -1
examples/openapi-ts-openai/src/client/index.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - export * from './sdk.gen'; 4 3 export * from './types.gen'; 4 + export * from './sdk.gen';
+5273 -5273
examples/openapi-ts-openai/src/client/types.gen.ts
··· 33 33 */ 34 34 export type AdminApiKey = { 35 35 /** 36 - * The Unix timestamp (in seconds) of when the API key was created 36 + * The object type, which is always `organization.admin_api_key` 37 37 */ 38 - created_at: number; 38 + object: string; 39 39 /** 40 40 * The identifier, which can be referenced in API endpoints 41 41 */ 42 42 id: string; 43 43 /** 44 - * The Unix timestamp (in seconds) of when the API key was last used 44 + * The name of the API key 45 + */ 46 + name: string; 47 + /** 48 + * The redacted value of the API key 45 49 */ 46 - last_used_at: number; 50 + redacted_value: string; 47 51 /** 48 - * The name of the API key 52 + * The value of the API key. Only shown on create. 49 53 */ 50 - name: string; 54 + value?: string; 51 55 /** 52 - * The object type, which is always `organization.admin_api_key` 56 + * The Unix timestamp (in seconds) of when the API key was created 53 57 */ 54 - object: string; 58 + created_at: number; 59 + /** 60 + * The Unix timestamp (in seconds) of when the API key was last used 61 + */ 62 + last_used_at: number; 55 63 owner: { 56 64 /** 57 - * The Unix timestamp (in seconds) of when the user was created 65 + * Always `user` 66 + */ 67 + type?: string; 68 + /** 69 + * The object type, which is always organization.user 58 70 */ 59 - created_at?: number; 71 + object?: string; 60 72 /** 61 73 * The identifier, which can be referenced in API endpoints 62 74 */ ··· 66 78 */ 67 79 name?: string; 68 80 /** 69 - * The object type, which is always organization.user 81 + * The Unix timestamp (in seconds) of when the user was created 70 82 */ 71 - object?: string; 83 + created_at?: number; 72 84 /** 73 85 * Always `owner` 74 86 */ 75 87 role?: string; 76 - /** 77 - * Always `user` 78 - */ 79 - type?: string; 80 88 }; 81 - /** 82 - * The redacted value of the API key 83 - */ 84 - redacted_value: string; 85 - /** 86 - * The value of the API key. Only shown on create. 87 - */ 88 - value?: string; 89 89 }; 90 90 91 91 export type ApiKeyList = { 92 + object?: string; 92 93 data?: Array<AdminApiKey>; 93 - first_id?: string; 94 94 has_more?: boolean; 95 + first_id?: string; 95 96 last_id?: string; 96 - object?: string; 97 97 }; 98 98 99 99 /** ··· 103 103 */ 104 104 export type AssistantObject = { 105 105 /** 106 + * The identifier, which can be referenced in API endpoints. 107 + */ 108 + id: string; 109 + /** 110 + * The object type, which is always `assistant`. 111 + */ 112 + object: 'assistant'; 113 + /** 106 114 * The Unix timestamp (in seconds) for when the assistant was created. 107 115 */ 108 116 created_at: number; 109 117 /** 110 - * The description of the assistant. The maximum length is 512 characters. 118 + * The name of the assistant. The maximum length is 256 characters. 111 119 * 112 120 */ 113 - description: string; 114 - /** 115 - * The identifier, which can be referenced in API endpoints. 116 - */ 117 - id: string; 121 + name: string; 118 122 /** 119 - * The system instructions that the assistant uses. The maximum length is 256,000 characters. 123 + * The description of the assistant. The maximum length is 512 characters. 120 124 * 121 125 */ 122 - instructions: string; 123 - metadata: Metadata; 126 + description: string; 124 127 /** 125 128 * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. 126 129 * 127 130 */ 128 131 model: string; 129 132 /** 130 - * The name of the assistant. The maximum length is 256 characters. 133 + * The system instructions that the assistant uses. The maximum length is 256,000 characters. 131 134 * 132 135 */ 133 - name: string; 134 - /** 135 - * The object type, which is always `assistant`. 136 - */ 137 - object: 'assistant'; 138 - response_format?: AssistantsApiResponseFormatOption; 136 + instructions: string; 139 137 /** 140 - * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 138 + * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. 141 139 * 142 140 */ 143 - temperature?: number; 141 + tools: Array<AssistantTool>; 144 142 /** 145 143 * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. 146 144 * ··· 161 159 vector_store_ids?: Array<string>; 162 160 }; 163 161 }; 162 + metadata: Metadata; 164 163 /** 165 - * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. 164 + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 166 165 * 167 166 */ 168 - tools: Array<AssistantTool>; 167 + temperature?: number; 169 168 /** 170 169 * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. 171 170 * ··· 173 172 * 174 173 */ 175 174 top_p?: number; 175 + response_format?: AssistantsApiResponseFormatOption; 176 176 }; 177 177 178 178 /** ··· 215 215 } & ErrorEvent); 216 216 217 217 export const AssistantSupportedModels = { 218 - GPT_3_5_TURBO: 'gpt-3.5-turbo', 219 - GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125', 220 - GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613', 221 - GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106', 222 - GPT_4: 'gpt-4', 223 - GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k', 224 - GPT_4O: 'gpt-4o', 225 - GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613', 226 - GPT_4O_2024_05_13: 'gpt-4o-2024-05-13', 227 - GPT_4O_2024_08_06: 'gpt-4o-2024-08-06', 228 - GPT_4O_2024_11_20: 'gpt-4o-2024-11-20', 229 - GPT_4O_MINI: 'gpt-4o-mini', 230 - GPT_4O_MINI_2024_07_18: 'gpt-4o-mini-2024-07-18', 231 - GPT_4_0125_PREVIEW: 'gpt-4-0125-preview', 232 - GPT_4_0314: 'gpt-4-0314', 233 - GPT_4_0613: 'gpt-4-0613', 218 + GPT_5: 'gpt-5', 219 + GPT_5_MINI: 'gpt-5-mini', 220 + GPT_5_NANO: 'gpt-5-nano', 221 + GPT_5_2025_08_07: 'gpt-5-2025-08-07', 222 + GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07', 223 + GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07', 234 224 GPT_4_1: 'gpt-4.1', 235 - GPT_4_1106_PREVIEW: 'gpt-4-1106-preview', 225 + GPT_4_1_MINI: 'gpt-4.1-mini', 226 + GPT_4_1_NANO: 'gpt-4.1-nano', 236 227 GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14', 237 - GPT_4_1_MINI: 'gpt-4.1-mini', 238 228 GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14', 239 - GPT_4_1_NANO: 'gpt-4.1-nano', 240 229 GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14', 241 - GPT_4_32K: 'gpt-4-32k', 242 - GPT_4_32K_0314: 'gpt-4-32k-0314', 243 - GPT_4_32K_0613: 'gpt-4-32k-0613', 230 + O3_MINI: 'o3-mini', 231 + O3_MINI_2025_01_31: 'o3-mini-2025-01-31', 232 + O1: 'o1', 233 + O1_2024_12_17: 'o1-2024-12-17', 234 + GPT_4O: 'gpt-4o', 235 + GPT_4O_2024_11_20: 'gpt-4o-2024-11-20', 236 + GPT_4O_2024_08_06: 'gpt-4o-2024-08-06', 237 + GPT_4O_2024_05_13: 'gpt-4o-2024-05-13', 238 + GPT_4O_MINI: 'gpt-4o-mini', 239 + GPT_4O_MINI_2024_07_18: 'gpt-4o-mini-2024-07-18', 244 240 GPT_4_5_PREVIEW: 'gpt-4.5-preview', 245 241 GPT_4_5_PREVIEW_2025_02_27: 'gpt-4.5-preview-2025-02-27', 246 242 GPT_4_TURBO: 'gpt-4-turbo', 247 243 GPT_4_TURBO_2024_04_09: 'gpt-4-turbo-2024-04-09', 244 + GPT_4_0125_PREVIEW: 'gpt-4-0125-preview', 248 245 GPT_4_TURBO_PREVIEW: 'gpt-4-turbo-preview', 246 + GPT_4_1106_PREVIEW: 'gpt-4-1106-preview', 249 247 GPT_4_VISION_PREVIEW: 'gpt-4-vision-preview', 250 - GPT_5: 'gpt-5', 251 - GPT_5_2025_08_07: 'gpt-5-2025-08-07', 252 - GPT_5_MINI: 'gpt-5-mini', 253 - GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07', 254 - GPT_5_NANO: 'gpt-5-nano', 255 - GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07', 256 - O1: 'o1', 257 - O1_2024_12_17: 'o1-2024-12-17', 258 - O3_MINI: 'o3-mini', 259 - O3_MINI_2025_01_31: 'o3-mini-2025-01-31', 248 + GPT_4: 'gpt-4', 249 + GPT_4_0314: 'gpt-4-0314', 250 + GPT_4_0613: 'gpt-4-0613', 251 + GPT_4_32K: 'gpt-4-32k', 252 + GPT_4_32K_0314: 'gpt-4-32k-0314', 253 + GPT_4_32K_0613: 'gpt-4-32k-0613', 254 + GPT_3_5_TURBO: 'gpt-3.5-turbo', 255 + GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k', 256 + GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613', 257 + GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106', 258 + GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125', 259 + GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613', 260 260 } as const; 261 261 262 262 export type AssistantSupportedModels = ··· 276 276 * FileSearch tool 277 277 */ 278 278 export type AssistantToolsFileSearch = { 279 + /** 280 + * The type of tool being defined: `file_search` 281 + */ 282 + type: 'file_search'; 279 283 /** 280 284 * Overrides for the file search tool. 281 285 */ ··· 289 293 max_num_results?: number; 290 294 ranking_options?: FileSearchRankingOptions; 291 295 }; 292 - /** 293 - * The type of tool being defined: `file_search` 294 - */ 295 - type: 'file_search'; 296 296 }; 297 297 298 298 /** ··· 309 309 * Function tool 310 310 */ 311 311 export type AssistantToolsFunction = { 312 - function: FunctionObject; 313 312 /** 314 313 * The type of tool being defined: `function` 315 314 */ 316 315 type: 'function'; 316 + function: FunctionObject; 317 317 }; 318 318 319 319 /** ··· 350 350 * Specifies a tool the model should use. Use to force the model to call a specific tool. 351 351 */ 352 352 export type AssistantsNamedToolChoice = { 353 + /** 354 + * The type of the tool. If type is `function`, the function name must be set 355 + */ 356 + type: 'function' | 'code_interpreter' | 'file_search'; 353 357 function?: { 354 358 /** 355 359 * The name of the function to call. 356 360 */ 357 361 name: string; 358 362 }; 359 - /** 360 - * The type of the tool. If type is `function`, the function name must be set 361 - */ 362 - type: 'function' | 'code_interpreter' | 'file_search'; 363 363 }; 364 364 365 365 /** ··· 368 368 */ 369 369 export const AudioResponseFormat = { 370 370 JSON: 'json', 371 - SRT: 'srt', 372 371 TEXT: 'text', 372 + SRT: 'srt', 373 373 VERBOSE_JSON: 'verbose_json', 374 374 VTT: 'vtt', 375 375 } as const; ··· 385 385 * A log of a user action or configuration change within this organization. 386 386 */ 387 387 export type AuditLog = { 388 + /** 389 + * The ID of this log. 390 + */ 391 + id: string; 392 + type: AuditLogEventType; 393 + /** 394 + * The Unix timestamp (in seconds) of the event. 395 + */ 396 + effective_at: number; 397 + /** 398 + * The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project. 399 + */ 400 + project?: { 401 + /** 402 + * The project ID. 403 + */ 404 + id?: string; 405 + /** 406 + * The project title. 407 + */ 408 + name?: string; 409 + }; 388 410 actor: AuditLogActor; 389 411 /** 390 412 * The details for events with this `type`. 391 413 */ 392 414 'api_key.created'?: { 415 + /** 416 + * The tracking ID of the API key. 417 + */ 418 + id?: string; 393 419 /** 394 420 * The payload used to create the API key. 395 421 */ ··· 399 425 */ 400 426 scopes?: Array<string>; 401 427 }; 402 - /** 403 - * The tracking ID of the API key. 404 - */ 405 - id?: string; 406 428 }; 407 429 /** 408 430 * The details for events with this `type`. 409 431 */ 410 - 'api_key.deleted'?: { 432 + 'api_key.updated'?: { 411 433 /** 412 434 * The tracking ID of the API key. 413 435 */ 414 436 id?: string; 415 - }; 416 - /** 417 - * The details for events with this `type`. 418 - */ 419 - 'api_key.updated'?: { 420 437 /** 421 438 * The payload used to update the API key. 422 439 */ ··· 426 443 */ 427 444 scopes?: Array<string>; 428 445 }; 429 - /** 430 - * The tracking ID of the API key. 431 - */ 432 - id?: string; 433 446 }; 434 447 /** 435 448 * The details for events with this `type`. 436 449 */ 437 - 'certificate.created'?: { 450 + 'api_key.deleted'?: { 438 451 /** 439 - * The certificate ID. 452 + * The tracking ID of the API key. 440 453 */ 441 454 id?: string; 442 - /** 443 - * The name of the certificate. 444 - */ 445 - name?: string; 446 455 }; 447 456 /** 448 - * The details for events with this `type`. 457 + * The project and fine-tuned model checkpoint that the checkpoint permission was created for. 449 458 */ 450 - 'certificate.deleted'?: { 451 - /** 452 - * The certificate content in PEM format. 453 - */ 454 - certificate?: string; 459 + 'checkpoint_permission.created'?: { 455 460 /** 456 - * The certificate ID. 461 + * The ID of the checkpoint permission. 457 462 */ 458 463 id?: string; 459 464 /** 460 - * The name of the certificate. 461 - */ 462 - name?: string; 463 - }; 464 - /** 465 - * The details for events with this `type`. 466 - */ 467 - 'certificate.updated'?: { 468 - /** 469 - * The certificate ID. 465 + * The payload used to create the checkpoint permission. 470 466 */ 471 - id?: string; 472 - /** 473 - * The name of the certificate. 474 - */ 475 - name?: string; 476 - }; 477 - /** 478 - * The details for events with this `type`. 479 - */ 480 - 'certificates.activated'?: { 481 - certificates?: Array<{ 467 + data?: { 482 468 /** 483 - * The certificate ID. 469 + * The ID of the project that the checkpoint permission was created for. 484 470 */ 485 - id?: string; 486 - /** 487 - * The name of the certificate. 488 - */ 489 - name?: string; 490 - }>; 491 - }; 492 - /** 493 - * The details for events with this `type`. 494 - */ 495 - 'certificates.deactivated'?: { 496 - certificates?: Array<{ 497 - /** 498 - * The certificate ID. 499 - */ 500 - id?: string; 501 - /** 502 - * The name of the certificate. 503 - */ 504 - name?: string; 505 - }>; 506 - }; 507 - /** 508 - * The project and fine-tuned model checkpoint that the checkpoint permission was created for. 509 - */ 510 - 'checkpoint_permission.created'?: { 511 - /** 512 - * The payload used to create the checkpoint permission. 513 - */ 514 - data?: { 471 + project_id?: string; 515 472 /** 516 473 * The ID of the fine-tuned model checkpoint. 517 474 */ 518 475 fine_tuned_model_checkpoint?: string; 519 - /** 520 - * The ID of the project that the checkpoint permission was created for. 521 - */ 522 - project_id?: string; 523 476 }; 524 - /** 525 - * The ID of the checkpoint permission. 526 - */ 527 - id?: string; 528 477 }; 529 478 /** 530 479 * The details for events with this `type`. ··· 536 485 id?: string; 537 486 }; 538 487 /** 539 - * The Unix timestamp (in seconds) of the event. 540 - */ 541 - effective_at: number; 542 - /** 543 - * The ID of this log. 544 - */ 545 - id: string; 546 - /** 547 488 * The details for events with this `type`. 548 489 */ 549 - 'invite.accepted'?: { 490 + 'invite.sent'?: { 550 491 /** 551 492 * The ID of the invite. 552 493 */ 553 494 id?: string; 554 - }; 555 - /** 556 - * The details for events with this `type`. 557 - */ 558 - 'invite.deleted'?: { 559 - /** 560 - * The ID of the invite. 561 - */ 562 - id?: string; 563 - }; 564 - /** 565 - * The details for events with this `type`. 566 - */ 567 - 'invite.sent'?: { 568 495 /** 569 496 * The payload used to create the invite. 570 497 */ ··· 578 505 */ 579 506 role?: string; 580 507 }; 508 + }; 509 + /** 510 + * The details for events with this `type`. 511 + */ 512 + 'invite.accepted'?: { 513 + /** 514 + * The ID of the invite. 515 + */ 516 + id?: string; 517 + }; 518 + /** 519 + * The details for events with this `type`. 520 + */ 521 + 'invite.deleted'?: { 581 522 /** 582 523 * The ID of the invite. 583 524 */ ··· 613 554 * The details for events with this `type`. 614 555 */ 615 556 'organization.updated'?: { 557 + /** 558 + * The organization ID. 559 + */ 560 + id?: string; 616 561 /** 617 562 * The payload used to update the organization settings. 618 563 */ 619 564 changes_requested?: { 620 565 /** 621 - * How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects` 622 - */ 623 - api_call_logging?: string; 624 - /** 625 - * The list of project ids if api_call_logging is set to `enabled_for_selected_projects` 566 + * The organization title. 626 567 */ 627 - api_call_logging_project_ids?: string; 568 + title?: string; 628 569 /** 629 570 * The organization description. 630 571 */ ··· 638 579 */ 639 580 threads_ui_visibility?: string; 640 581 /** 641 - * The organization title. 642 - */ 643 - title?: string; 644 - /** 645 582 * Visibility of the usage dashboard which shows activity and costs for your organization. One of `ANY_ROLE` or `OWNERS`. 646 583 */ 647 584 usage_dashboard_visibility?: string; 585 + /** 586 + * How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects` 587 + */ 588 + api_call_logging?: string; 589 + /** 590 + * The list of project ids if api_call_logging is set to `enabled_for_selected_projects` 591 + */ 592 + api_call_logging_project_ids?: string; 648 593 }; 649 - /** 650 - * The organization ID. 651 - */ 652 - id?: string; 653 - }; 654 - /** 655 - * The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project. 656 - */ 657 - project?: { 658 - /** 659 - * The project ID. 660 - */ 661 - id?: string; 662 - /** 663 - * The project title. 664 - */ 665 - name?: string; 666 594 }; 667 595 /** 668 596 * The details for events with this `type`. 669 597 */ 670 - 'project.archived'?: { 598 + 'project.created'?: { 671 599 /** 672 600 * The project ID. 673 601 */ 674 602 id?: string; 675 - }; 676 - /** 677 - * The details for events with this `type`. 678 - */ 679 - 'project.created'?: { 680 603 /** 681 604 * The payload used to create the project. 682 605 */ ··· 690 613 */ 691 614 title?: string; 692 615 }; 693 - /** 694 - * The project ID. 695 - */ 696 - id?: string; 697 616 }; 698 617 /** 699 618 * The details for events with this `type`. 700 619 */ 701 620 'project.updated'?: { 621 + /** 622 + * The project ID. 623 + */ 624 + id?: string; 702 625 /** 703 626 * The payload used to update the project. 704 627 */ ··· 708 631 */ 709 632 title?: string; 710 633 }; 711 - /** 712 - * The project ID. 713 - */ 714 - id?: string; 715 634 }; 716 635 /** 717 636 * The details for events with this `type`. 718 637 */ 719 - 'rate_limit.deleted'?: { 638 + 'project.archived'?: { 720 639 /** 721 - * The rate limit ID 640 + * The project ID. 722 641 */ 723 642 id?: string; 724 643 }; ··· 727 646 */ 728 647 'rate_limit.updated'?: { 729 648 /** 649 + * The rate limit ID 650 + */ 651 + id?: string; 652 + /** 730 653 * The payload used to update the rate limits. 731 654 */ 732 655 changes_requested?: { 733 656 /** 734 - * The maximum batch input tokens per day. Only relevant for certain models. 657 + * The maximum requests per minute. 735 658 */ 736 - batch_1_day_max_input_tokens?: number; 659 + max_requests_per_1_minute?: number; 737 660 /** 738 - * The maximum audio megabytes per minute. Only relevant for certain models. 661 + * The maximum tokens per minute. 739 662 */ 740 - max_audio_megabytes_per_1_minute?: number; 663 + max_tokens_per_1_minute?: number; 741 664 /** 742 665 * The maximum images per minute. Only relevant for certain models. 743 666 */ 744 667 max_images_per_1_minute?: number; 745 668 /** 669 + * The maximum audio megabytes per minute. Only relevant for certain models. 670 + */ 671 + max_audio_megabytes_per_1_minute?: number; 672 + /** 746 673 * The maximum requests per day. Only relevant for certain models. 747 674 */ 748 675 max_requests_per_1_day?: number; 749 676 /** 750 - * The maximum requests per minute. 677 + * The maximum batch input tokens per day. Only relevant for certain models. 751 678 */ 752 - max_requests_per_1_minute?: number; 753 - /** 754 - * The maximum tokens per minute. 755 - */ 756 - max_tokens_per_1_minute?: number; 679 + batch_1_day_max_input_tokens?: number; 757 680 }; 681 + }; 682 + /** 683 + * The details for events with this `type`. 684 + */ 685 + 'rate_limit.deleted'?: { 758 686 /** 759 687 * The rate limit ID 760 688 */ ··· 764 692 * The details for events with this `type`. 765 693 */ 766 694 'service_account.created'?: { 695 + /** 696 + * The service account ID. 697 + */ 698 + id?: string; 767 699 /** 768 700 * The payload used to create the service account. 769 701 */ ··· 773 705 */ 774 706 role?: string; 775 707 }; 776 - /** 777 - * The service account ID. 778 - */ 779 - id?: string; 780 708 }; 781 709 /** 782 710 * The details for events with this `type`. 783 711 */ 784 - 'service_account.deleted'?: { 712 + 'service_account.updated'?: { 785 713 /** 786 714 * The service account ID. 787 715 */ 788 716 id?: string; 789 - }; 790 - /** 791 - * The details for events with this `type`. 792 - */ 793 - 'service_account.updated'?: { 794 717 /** 795 718 * The payload used to updated the service account. 796 719 */ ··· 800 723 */ 801 724 role?: string; 802 725 }; 726 + }; 727 + /** 728 + * The details for events with this `type`. 729 + */ 730 + 'service_account.deleted'?: { 803 731 /** 804 732 * The service account ID. 805 733 */ 806 734 id?: string; 807 735 }; 808 - type: AuditLogEventType; 809 736 /** 810 737 * The details for events with this `type`. 811 738 */ 812 739 'user.added'?: { 813 740 /** 741 + * The user ID. 742 + */ 743 + id?: string; 744 + /** 814 745 * The payload used to add the user to the project. 815 746 */ 816 747 data?: { ··· 819 750 */ 820 751 role?: string; 821 752 }; 753 + }; 754 + /** 755 + * The details for events with this `type`. 756 + */ 757 + 'user.updated'?: { 822 758 /** 823 - * The user ID. 759 + * The project ID. 824 760 */ 825 761 id?: string; 762 + /** 763 + * The payload used to update the user. 764 + */ 765 + changes_requested?: { 766 + /** 767 + * The role of the user. Is either `owner` or `member`. 768 + */ 769 + role?: string; 770 + }; 826 771 }; 827 772 /** 828 773 * The details for events with this `type`. ··· 836 781 /** 837 782 * The details for events with this `type`. 838 783 */ 839 - 'user.updated'?: { 784 + 'certificate.created'?: { 785 + /** 786 + * The certificate ID. 787 + */ 788 + id?: string; 840 789 /** 841 - * The payload used to update the user. 790 + * The name of the certificate. 842 791 */ 843 - changes_requested?: { 844 - /** 845 - * The role of the user. Is either `owner` or `member`. 846 - */ 847 - role?: string; 848 - }; 792 + name?: string; 793 + }; 794 + /** 795 + * The details for events with this `type`. 796 + */ 797 + 'certificate.updated'?: { 849 798 /** 850 - * The project ID. 799 + * The certificate ID. 851 800 */ 852 801 id?: string; 802 + /** 803 + * The name of the certificate. 804 + */ 805 + name?: string; 806 + }; 807 + /** 808 + * The details for events with this `type`. 809 + */ 810 + 'certificate.deleted'?: { 811 + /** 812 + * The certificate ID. 813 + */ 814 + id?: string; 815 + /** 816 + * The name of the certificate. 817 + */ 818 + name?: string; 819 + /** 820 + * The certificate content in PEM format. 821 + */ 822 + certificate?: string; 823 + }; 824 + /** 825 + * The details for events with this `type`. 826 + */ 827 + 'certificates.activated'?: { 828 + certificates?: Array<{ 829 + /** 830 + * The certificate ID. 831 + */ 832 + id?: string; 833 + /** 834 + * The name of the certificate. 835 + */ 836 + name?: string; 837 + }>; 838 + }; 839 + /** 840 + * The details for events with this `type`. 841 + */ 842 + 'certificates.deactivated'?: { 843 + certificates?: Array<{ 844 + /** 845 + * The certificate ID. 846 + */ 847 + id?: string; 848 + /** 849 + * The name of the certificate. 850 + */ 851 + name?: string; 852 + }>; 853 853 }; 854 854 }; 855 855 ··· 857 857 * The actor who performed the audit logged action. 858 858 */ 859 859 export type AuditLogActor = { 860 - api_key?: AuditLogActorApiKey; 861 - session?: AuditLogActorSession; 862 860 /** 863 861 * The type of actor. Is either `session` or `api_key`. 864 862 */ 865 863 type?: 'session' | 'api_key'; 864 + session?: AuditLogActorSession; 865 + api_key?: AuditLogActorApiKey; 866 866 }; 867 867 868 868 /** ··· 873 873 * The tracking id of the API key. 874 874 */ 875 875 id?: string; 876 - service_account?: AuditLogActorServiceAccount; 877 876 /** 878 877 * The type of API key. Can be either `user` or `service_account`. 879 878 */ 880 879 type?: 'user' | 'service_account'; 881 880 user?: AuditLogActorUser; 881 + service_account?: AuditLogActorServiceAccount; 882 882 }; 883 883 884 884 /** ··· 895 895 * The session in which the audit logged action was performed. 896 896 */ 897 897 export type AuditLogActorSession = { 898 + user?: AuditLogActorUser; 898 899 /** 899 900 * The IP address from which the action was performed. 900 901 */ 901 902 ip_address?: string; 902 - user?: AuditLogActorUser; 903 903 }; 904 904 905 905 /** ··· 907 907 */ 908 908 export type AuditLogActorUser = { 909 909 /** 910 + * The user id. 911 + */ 912 + id?: string; 913 + /** 910 914 * The user email. 911 915 */ 912 916 email?: string; 913 - /** 914 - * The user id. 915 - */ 916 - id?: string; 917 917 }; 918 918 919 919 /** ··· 921 921 */ 922 922 export const AuditLogEventType = { 923 923 API_KEY_CREATED: 'api_key.created', 924 - API_KEY_DELETED: 'api_key.deleted', 925 924 API_KEY_UPDATED: 'api_key.updated', 925 + API_KEY_DELETED: 'api_key.deleted', 926 926 CHECKPOINT_PERMISSION_CREATED: 'checkpoint_permission.created', 927 927 CHECKPOINT_PERMISSION_DELETED: 'checkpoint_permission.deleted', 928 + INVITE_SENT: 'invite.sent', 928 929 INVITE_ACCEPTED: 'invite.accepted', 929 930 INVITE_DELETED: 'invite.deleted', 930 - INVITE_SENT: 'invite.sent', 931 + LOGIN_SUCCEEDED: 'login.succeeded', 931 932 LOGIN_FAILED: 'login.failed', 932 - LOGIN_SUCCEEDED: 'login.succeeded', 933 + LOGOUT_SUCCEEDED: 'logout.succeeded', 933 934 LOGOUT_FAILED: 'logout.failed', 934 - LOGOUT_SUCCEEDED: 'logout.succeeded', 935 935 ORGANIZATION_UPDATED: 'organization.updated', 936 - PROJECT_ARCHIVED: 'project.archived', 937 936 PROJECT_CREATED: 'project.created', 938 937 PROJECT_UPDATED: 'project.updated', 939 - RATE_LIMIT_DELETED: 'rate_limit.deleted', 940 - RATE_LIMIT_UPDATED: 'rate_limit.updated', 938 + PROJECT_ARCHIVED: 'project.archived', 941 939 SERVICE_ACCOUNT_CREATED: 'service_account.created', 942 - SERVICE_ACCOUNT_DELETED: 'service_account.deleted', 943 940 SERVICE_ACCOUNT_UPDATED: 'service_account.updated', 941 + SERVICE_ACCOUNT_DELETED: 'service_account.deleted', 942 + RATE_LIMIT_UPDATED: 'rate_limit.updated', 943 + RATE_LIMIT_DELETED: 'rate_limit.deleted', 944 944 USER_ADDED: 'user.added', 945 - USER_DELETED: 'user.deleted', 946 945 USER_UPDATED: 'user.updated', 946 + USER_DELETED: 'user.deleted', 947 947 } as const; 948 948 949 949 /** ··· 965 965 }; 966 966 967 967 export type Batch = { 968 + id: string; 968 969 /** 969 - * The Unix timestamp (in seconds) for when the batch was cancelled. 970 + * The object type, which is always `batch`. 970 971 */ 971 - cancelled_at?: number; 972 + object: 'batch'; 972 973 /** 973 - * The Unix timestamp (in seconds) for when the batch started cancelling. 974 + * The OpenAI API endpoint used by the batch. 974 975 */ 975 - cancelling_at?: number; 976 + endpoint: string; 977 + errors?: { 978 + /** 979 + * The object type, which is always `list`. 980 + */ 981 + object?: string; 982 + data?: Array<BatchError>; 983 + }; 976 984 /** 977 - * The Unix timestamp (in seconds) for when the batch was completed. 985 + * The ID of the input file for the batch. 978 986 */ 979 - completed_at?: number; 987 + input_file_id: string; 980 988 /** 981 989 * The time frame within which the batch should be processed. 982 990 */ 983 991 completion_window: string; 984 992 /** 985 - * The Unix timestamp (in seconds) for when the batch was created. 993 + * The current status of the batch. 986 994 */ 987 - created_at: number; 995 + status: 996 + | 'validating' 997 + | 'failed' 998 + | 'in_progress' 999 + | 'finalizing' 1000 + | 'completed' 1001 + | 'expired' 1002 + | 'cancelling' 1003 + | 'cancelled'; 988 1004 /** 989 - * The OpenAI API endpoint used by the batch. 1005 + * The ID of the file containing the outputs of successfully executed requests. 990 1006 */ 991 - endpoint: string; 1007 + output_file_id?: string; 992 1008 /** 993 1009 * The ID of the file containing the outputs of requests with errors. 994 1010 */ 995 1011 error_file_id?: string; 996 - errors?: { 997 - data?: Array<BatchError>; 998 - /** 999 - * The object type, which is always `list`. 1000 - */ 1001 - object?: string; 1002 - }; 1012 + /** 1013 + * The Unix timestamp (in seconds) for when the batch was created. 1014 + */ 1015 + created_at: number; 1003 1016 /** 1004 - * The Unix timestamp (in seconds) for when the batch expired. 1017 + * The Unix timestamp (in seconds) for when the batch started processing. 1005 1018 */ 1006 - expired_at?: number; 1019 + in_progress_at?: number; 1007 1020 /** 1008 1021 * The Unix timestamp (in seconds) for when the batch will expire. 1009 1022 */ 1010 1023 expires_at?: number; 1011 1024 /** 1012 - * The Unix timestamp (in seconds) for when the batch failed. 1013 - */ 1014 - failed_at?: number; 1015 - /** 1016 1025 * The Unix timestamp (in seconds) for when the batch started finalizing. 1017 1026 */ 1018 1027 finalizing_at?: number; 1019 - id: string; 1020 1028 /** 1021 - * The Unix timestamp (in seconds) for when the batch started processing. 1029 + * The Unix timestamp (in seconds) for when the batch was completed. 1022 1030 */ 1023 - in_progress_at?: number; 1031 + completed_at?: number; 1024 1032 /** 1025 - * The ID of the input file for the batch. 1033 + * The Unix timestamp (in seconds) for when the batch failed. 1026 1034 */ 1027 - input_file_id: string; 1028 - metadata?: Metadata; 1035 + failed_at?: number; 1029 1036 /** 1030 - * The object type, which is always `batch`. 1037 + * The Unix timestamp (in seconds) for when the batch expired. 1031 1038 */ 1032 - object: 'batch'; 1039 + expired_at?: number; 1033 1040 /** 1034 - * The ID of the file containing the outputs of successfully executed requests. 1041 + * The Unix timestamp (in seconds) for when the batch started cancelling. 1035 1042 */ 1036 - output_file_id?: string; 1037 - request_counts?: BatchRequestCounts; 1043 + cancelling_at?: number; 1038 1044 /** 1039 - * The current status of the batch. 1045 + * The Unix timestamp (in seconds) for when the batch was cancelled. 1040 1046 */ 1041 - status: 1042 - | 'validating' 1043 - | 'failed' 1044 - | 'in_progress' 1045 - | 'finalizing' 1046 - | 'completed' 1047 - | 'expired' 1048 - | 'cancelling' 1049 - | 'cancelled'; 1047 + cancelled_at?: number; 1048 + request_counts?: BatchRequestCounts; 1049 + metadata?: Metadata; 1050 1050 }; 1051 1051 1052 1052 /** ··· 1087 1087 * The per-line object of the batch output and error files 1088 1088 */ 1089 1089 export type BatchRequestOutput = { 1090 + id?: string; 1090 1091 /** 1091 1092 * A developer-provided per-request id that will be used to match outputs to inputs. 1092 1093 */ 1093 1094 custom_id?: string; 1094 - /** 1095 - * For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure. 1096 - */ 1097 - error?: { 1095 + response?: { 1098 1096 /** 1099 - * A machine-readable error code. 1097 + * The HTTP status code of the response 1100 1098 */ 1101 - code?: string; 1099 + status_code?: number; 1102 1100 /** 1103 - * A human-readable error message. 1101 + * An unique identifier for the OpenAI API request. Please include this request ID when contacting support. 1104 1102 */ 1105 - message?: string; 1106 - }; 1107 - id?: string; 1108 - response?: { 1103 + request_id?: string; 1109 1104 /** 1110 1105 * The JSON body of the response 1111 1106 */ 1112 1107 body?: { 1113 1108 [key: string]: unknown; 1114 1109 }; 1110 + }; 1111 + /** 1112 + * For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure. 1113 + */ 1114 + error?: { 1115 1115 /** 1116 - * An unique identifier for the OpenAI API request. Please include this request ID when contacting support. 1116 + * A machine-readable error code. 1117 1117 */ 1118 - request_id?: string; 1118 + code?: string; 1119 1119 /** 1120 - * The HTTP status code of the response 1120 + * A human-readable error message. 1121 1121 */ 1122 - status_code?: number; 1122 + message?: string; 1123 1123 }; 1124 1124 }; 1125 1125 ··· 1128 1128 */ 1129 1129 export type Certificate = { 1130 1130 /** 1131 - * Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate. 1131 + * The object type. 1132 + * 1133 + * - If creating, updating, or getting a specific certificate, the object type is `certificate`. 1134 + * - If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`. 1135 + * - If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`. 1136 + * 1137 + */ 1138 + object: 1139 + | 'certificate' 1140 + | 'organization.certificate' 1141 + | 'organization.project.certificate'; 1142 + /** 1143 + * The identifier, which can be referenced in API endpoints 1144 + */ 1145 + id: string; 1146 + /** 1147 + * The name of the certificate. 1132 1148 */ 1133 - active?: boolean; 1149 + name: string; 1150 + /** 1151 + * The Unix timestamp (in seconds) of when the certificate was uploaded. 1152 + */ 1153 + created_at: number; 1134 1154 certificate_details: { 1135 1155 /** 1136 - * The content of the certificate in PEM format. 1156 + * The Unix timestamp (in seconds) of when the certificate becomes valid. 1137 1157 */ 1138 - content?: string; 1158 + valid_at?: number; 1139 1159 /** 1140 1160 * The Unix timestamp (in seconds) of when the certificate expires. 1141 1161 */ 1142 1162 expires_at?: number; 1143 1163 /** 1144 - * The Unix timestamp (in seconds) of when the certificate becomes valid. 1164 + * The content of the certificate in PEM format. 1145 1165 */ 1146 - valid_at?: number; 1166 + content?: string; 1147 1167 }; 1148 1168 /** 1149 - * The Unix timestamp (in seconds) of when the certificate was uploaded. 1150 - */ 1151 - created_at: number; 1152 - /** 1153 - * The identifier, which can be referenced in API endpoints 1154 - */ 1155 - id: string; 1156 - /** 1157 - * The name of the certificate. 1169 + * Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate. 1158 1170 */ 1159 - name: string; 1160 - /** 1161 - * The object type. 1162 - * 1163 - * - If creating, updating, or getting a specific certificate, the object type is `certificate`. 1164 - * - If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`. 1165 - * - If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`. 1166 - * 1167 - */ 1168 - object: 1169 - | 'certificate' 1170 - | 'organization.certificate' 1171 - | 'organization.project.certificate'; 1171 + active?: boolean; 1172 1172 }; 1173 1173 1174 1174 /** ··· 1212 1212 * 1213 1213 */ 1214 1214 export type ChatCompletionAllowedToolsChoice = { 1215 - allowed_tools: ChatCompletionAllowedTools; 1216 1215 /** 1217 1216 * Allowed tool configuration type. Always `allowed_tools`. 1218 1217 */ 1219 1218 type: 'allowed_tools'; 1219 + allowed_tools: ChatCompletionAllowedTools; 1220 1220 }; 1221 1221 1222 1222 export type ChatCompletionDeleted = { 1223 1223 /** 1224 - * Whether the chat completion was deleted. 1224 + * The type of object being deleted. 1225 1225 */ 1226 - deleted: boolean; 1226 + object: 'chat.completion.deleted'; 1227 1227 /** 1228 1228 * The ID of the chat completion that was deleted. 1229 1229 */ 1230 1230 id: string; 1231 1231 /** 1232 - * The type of object being deleted. 1232 + * Whether the chat completion was deleted. 1233 1233 */ 1234 - object: 'chat.completion.deleted'; 1234 + deleted: boolean; 1235 1235 }; 1236 1236 1237 1237 /** ··· 1268 1268 */ 1269 1269 export type ChatCompletionList = { 1270 1270 /** 1271 + * The type of this object. It is always set to "list". 1272 + * 1273 + */ 1274 + object: 'list'; 1275 + /** 1271 1276 * An array of chat completion objects. 1272 1277 * 1273 1278 */ ··· 1277 1282 */ 1278 1283 first_id: string; 1279 1284 /** 1280 - * Indicates whether there are more Chat Completions available. 1281 - */ 1282 - has_more: boolean; 1283 - /** 1284 1285 * The identifier of the last chat completion in the data array. 1285 1286 */ 1286 1287 last_id: string; 1287 1288 /** 1288 - * The type of this object. It is always set to "list". 1289 - * 1289 + * Indicates whether there are more Chat Completions available. 1290 1290 */ 1291 - object: 'list'; 1291 + has_more: boolean; 1292 1292 }; 1293 1293 1294 1294 /** ··· 1298 1298 * 1299 1299 */ 1300 1300 export type ChatCompletionMessageCustomToolCall = { 1301 + /** 1302 + * The ID of the tool call. 1303 + */ 1304 + id: string; 1305 + /** 1306 + * The type of the tool. Always `custom`. 1307 + */ 1308 + type: 'custom'; 1301 1309 /** 1302 1310 * The custom tool that the model called. 1303 1311 */ 1304 1312 custom: { 1305 1313 /** 1314 + * The name of the custom tool to call. 1315 + */ 1316 + name: string; 1317 + /** 1306 1318 * The input for the custom tool call generated by the model. 1307 1319 */ 1308 1320 input: string; 1309 - /** 1310 - * The name of the custom tool to call. 1311 - */ 1312 - name: string; 1313 1321 }; 1314 - /** 1315 - * The ID of the tool call. 1316 - */ 1317 - id: string; 1318 - /** 1319 - * The type of the tool. Always `custom`. 1320 - */ 1321 - type: 'custom'; 1322 1322 }; 1323 1323 1324 1324 /** ··· 1328 1328 * 1329 1329 */ 1330 1330 export type ChatCompletionMessageList = { 1331 + /** 1332 + * The type of this object. It is always set to "list". 1333 + * 1334 + */ 1335 + object: 'list'; 1331 1336 /** 1332 1337 * An array of chat completion message objects. 1333 1338 * ··· 1335 1340 data: Array< 1336 1341 ChatCompletionResponseMessage & { 1337 1342 /** 1343 + * The identifier of the chat message. 1344 + */ 1345 + id: string; 1346 + /** 1338 1347 * If a content parts array was provided, this is an array of `text` and `image_url` parts. 1339 1348 * Otherwise, null. 1340 1349 * ··· 1343 1352 | ChatCompletionRequestMessageContentPartText 1344 1353 | ChatCompletionRequestMessageContentPartImage 1345 1354 >; 1346 - /** 1347 - * The identifier of the chat message. 1348 - */ 1349 - id: string; 1350 1355 } 1351 1356 >; 1352 1357 /** ··· 1354 1359 */ 1355 1360 first_id: string; 1356 1361 /** 1357 - * Indicates whether there are more chat messages available. 1358 - */ 1359 - has_more: boolean; 1360 - /** 1361 1362 * The identifier of the last chat message in the data array. 1362 1363 */ 1363 1364 last_id: string; 1364 1365 /** 1365 - * The type of this object. It is always set to "list". 1366 - * 1366 + * Indicates whether there are more chat messages available. 1367 1367 */ 1368 - object: 'list'; 1368 + has_more: boolean; 1369 1369 }; 1370 1370 1371 1371 /** ··· 1376 1376 */ 1377 1377 export type ChatCompletionMessageToolCall = { 1378 1378 /** 1379 - * The function that the model called. 1380 - */ 1381 - function: { 1382 - /** 1383 - * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. 1384 - */ 1385 - arguments: string; 1386 - /** 1387 - * The name of the function to call. 1388 - */ 1389 - name: string; 1390 - }; 1391 - /** 1392 1379 * The ID of the tool call. 1393 1380 */ 1394 1381 id: string; ··· 1396 1383 * The type of the tool. Currently, only `function` is supported. 1397 1384 */ 1398 1385 type: 'function'; 1399 - }; 1400 - 1401 - export type ChatCompletionMessageToolCallChunk = { 1402 - function?: { 1386 + /** 1387 + * The function that the model called. 1388 + */ 1389 + function: { 1403 1390 /** 1404 - * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. 1391 + * The name of the function to call. 1405 1392 */ 1406 - arguments?: string; 1393 + name: string; 1407 1394 /** 1408 - * The name of the function to call. 1395 + * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. 1409 1396 */ 1410 - name?: string; 1397 + arguments: string; 1411 1398 }; 1399 + }; 1400 + 1401 + export type ChatCompletionMessageToolCallChunk = { 1402 + index: number; 1412 1403 /** 1413 1404 * The ID of the tool call. 1414 1405 */ 1415 1406 id?: string; 1416 - index: number; 1417 1407 /** 1418 1408 * The type of the tool. Currently, only `function` is supported. 1419 1409 */ 1420 1410 type?: 'function'; 1411 + function?: { 1412 + /** 1413 + * The name of the function to call. 1414 + */ 1415 + name?: string; 1416 + /** 1417 + * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. 1418 + */ 1419 + arguments?: string; 1420 + }; 1421 1421 }; 1422 1422 1423 1423 /** ··· 1453 1453 * Specifies a tool the model should use. Use to force the model to call a specific function. 1454 1454 */ 1455 1455 export type ChatCompletionNamedToolChoice = { 1456 + /** 1457 + * For function calling, the type is always `function`. 1458 + */ 1459 + type: 'function'; 1456 1460 function: { 1457 1461 /** 1458 1462 * The name of the function to call. 1459 1463 */ 1460 1464 name: string; 1461 1465 }; 1462 - /** 1463 - * For function calling, the type is always `function`. 1464 - */ 1465 - type: 'function'; 1466 1466 }; 1467 1467 1468 1468 /** ··· 1471 1471 * Specifies a tool the model should use. Use to force the model to call a specific custom tool. 1472 1472 */ 1473 1473 export type ChatCompletionNamedToolChoiceCustom = { 1474 + /** 1475 + * For custom tool calling, the type is always `custom`. 1476 + */ 1477 + type: 'custom'; 1474 1478 custom: { 1475 1479 /** 1476 1480 * The name of the custom tool to call. 1477 1481 */ 1478 1482 name: string; 1479 1483 }; 1480 - /** 1481 - * For custom tool calling, the type is always `custom`. 1482 - */ 1483 - type: 'custom'; 1484 1484 }; 1485 1485 1486 1486 /** ··· 1491 1491 */ 1492 1492 export type ChatCompletionRequestAssistantMessage = { 1493 1493 /** 1494 + * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. 1495 + * 1496 + */ 1497 + content?: string | Array<ChatCompletionRequestAssistantMessageContentPart>; 1498 + /** 1499 + * The refusal message by the assistant. 1500 + */ 1501 + refusal?: string; 1502 + /** 1503 + * The role of the messages author, in this case `assistant`. 1504 + */ 1505 + role: 'assistant'; 1506 + /** 1507 + * An optional name for the participant. Provides the model information to differentiate between participants of the same role. 1508 + */ 1509 + name?: string; 1510 + /** 1494 1511 * Data about a previous audio response from the model. 1495 1512 * [Learn more](https://platform.openai.com/docs/guides/audio). 1496 1513 * ··· 1502 1519 */ 1503 1520 id: string; 1504 1521 }; 1505 - /** 1506 - * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. 1507 - * 1508 - */ 1509 - content?: string | Array<ChatCompletionRequestAssistantMessageContentPart>; 1522 + tool_calls?: ChatCompletionMessageToolCalls; 1510 1523 /** 1511 1524 * Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. 1512 1525 * ··· 1522 1535 */ 1523 1536 name: string; 1524 1537 }; 1525 - /** 1526 - * An optional name for the participant. Provides the model information to differentiate between participants of the same role. 1527 - */ 1528 - name?: string; 1529 - /** 1530 - * The refusal message by the assistant. 1531 - */ 1532 - refusal?: string; 1533 - /** 1534 - * The role of the messages author, in this case `assistant`. 1535 - */ 1536 - role: 'assistant'; 1537 - tool_calls?: ChatCompletionMessageToolCalls; 1538 1538 }; 1539 1539 1540 1540 export type ChatCompletionRequestAssistantMessageContentPart = ··· 1559 1559 */ 1560 1560 content: string | Array<ChatCompletionRequestMessageContentPartText>; 1561 1561 /** 1562 + * The role of the messages author, in this case `developer`. 1563 + */ 1564 + role: 'developer'; 1565 + /** 1562 1566 * An optional name for the participant. Provides the model information to differentiate between participants of the same role. 1563 1567 */ 1564 1568 name?: string; 1565 - /** 1566 - * The role of the messages author, in this case `developer`. 1567 - */ 1568 - role: 'developer'; 1569 1569 }; 1570 1570 1571 1571 /** ··· 1575 1575 */ 1576 1576 export type ChatCompletionRequestFunctionMessage = { 1577 1577 /** 1578 + * The role of the messages author, in this case `function`. 1579 + */ 1580 + role: 'function'; 1581 + /** 1578 1582 * The contents of the function message. 1579 1583 */ 1580 1584 content: string; ··· 1582 1586 * The name of the function to call. 1583 1587 */ 1584 1588 name: string; 1585 - /** 1586 - * The role of the messages author, in this case `function`. 1587 - */ 1588 - role: 'function'; 1589 1589 }; 1590 1590 1591 1591 export type ChatCompletionRequestMessage = ··· 1615 1615 * 1616 1616 */ 1617 1617 export type ChatCompletionRequestMessageContentPartAudio = { 1618 + /** 1619 + * The type of the content part. Always `input_audio`. 1620 + */ 1621 + type: 'input_audio'; 1618 1622 input_audio: { 1619 1623 /** 1620 1624 * Base64 encoded audio data. ··· 1626 1630 */ 1627 1631 format: 'wav' | 'mp3'; 1628 1632 }; 1629 - /** 1630 - * The type of the content part. Always `input_audio`. 1631 - */ 1632 - type: 'input_audio'; 1633 1633 }; 1634 1634 1635 1635 /** ··· 1639 1639 * 1640 1640 */ 1641 1641 export type ChatCompletionRequestMessageContentPartFile = { 1642 + /** 1643 + * The type of the content part. Always `file`. 1644 + */ 1645 + type: 'file'; 1642 1646 file: { 1643 1647 /** 1648 + * The name of the file, used when passing the file to the model as a 1649 + * string. 1650 + * 1651 + */ 1652 + filename?: string; 1653 + /** 1644 1654 * The base64 encoded file data, used when passing the file to the model 1645 1655 * as a string. 1646 1656 * ··· 1651 1661 * 1652 1662 */ 1653 1663 file_id?: string; 1654 - /** 1655 - * The name of the file, used when passing the file to the model as a 1656 - * string. 1657 - * 1658 - */ 1659 - filename?: string; 1660 1664 }; 1661 - /** 1662 - * The type of the content part. Always `file`. 1663 - */ 1664 - type: 'file'; 1665 1665 }; 1666 1666 1667 1667 /** ··· 1671 1671 * 1672 1672 */ 1673 1673 export type ChatCompletionRequestMessageContentPartImage = { 1674 + /** 1675 + * The type of the content part. 1676 + */ 1677 + type: 'image_url'; 1674 1678 image_url: { 1679 + /** 1680 + * Either a URL of the image or the base64 encoded image data. 1681 + */ 1682 + url: string; 1675 1683 /** 1676 1684 * Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). 1677 1685 */ 1678 1686 detail?: 'auto' | 'low' | 'high'; 1679 - /** 1680 - * Either a URL of the image or the base64 encoded image data. 1681 - */ 1682 - url: string; 1683 1687 }; 1684 - /** 1685 - * The type of the content part. 1686 - */ 1687 - type: 'image_url'; 1688 1688 }; 1689 1689 1690 1690 /** ··· 1692 1692 */ 1693 1693 export type ChatCompletionRequestMessageContentPartRefusal = { 1694 1694 /** 1695 - * The refusal message generated by the model. 1696 - */ 1697 - refusal: string; 1698 - /** 1699 1695 * The type of the content part. 1700 1696 */ 1701 1697 type: 'refusal'; 1698 + /** 1699 + * The refusal message generated by the model. 1700 + */ 1701 + refusal: string; 1702 1702 }; 1703 1703 1704 1704 /** ··· 1708 1708 * 1709 1709 */ 1710 1710 export type ChatCompletionRequestMessageContentPartText = { 1711 + /** 1712 + * The type of the content part. 1713 + */ 1714 + type: 'text'; 1711 1715 /** 1712 1716 * The text content. 1713 1717 */ 1714 1718 text: string; 1715 - /** 1716 - * The type of the content part. 1717 - */ 1718 - type: 'text'; 1719 1719 }; 1720 1720 1721 1721 /** ··· 1732 1732 */ 1733 1733 content: string | Array<ChatCompletionRequestSystemMessageContentPart>; 1734 1734 /** 1735 + * The role of the messages author, in this case `system`. 1736 + */ 1737 + role: 'system'; 1738 + /** 1735 1739 * An optional name for the participant. Provides the model information to differentiate between participants of the same role. 1736 1740 */ 1737 1741 name?: string; 1738 - /** 1739 - * The role of the messages author, in this case `system`. 1740 - */ 1741 - role: 'system'; 1742 1742 }; 1743 1743 1744 1744 export type ChatCompletionRequestSystemMessageContentPart = ··· 1749 1749 */ 1750 1750 export type ChatCompletionRequestToolMessage = { 1751 1751 /** 1752 - * The contents of the tool message. 1753 - */ 1754 - content: string | Array<ChatCompletionRequestToolMessageContentPart>; 1755 - /** 1756 1752 * The role of the messages author, in this case `tool`. 1757 1753 */ 1758 1754 role: 'tool'; 1755 + /** 1756 + * The contents of the tool message. 1757 + */ 1758 + content: string | Array<ChatCompletionRequestToolMessageContentPart>; 1759 1759 /** 1760 1760 * Tool call that this message is responding to. 1761 1761 */ ··· 1779 1779 */ 1780 1780 content: string | Array<ChatCompletionRequestUserMessageContentPart>; 1781 1781 /** 1782 - * An optional name for the participant. Provides the model information to differentiate between participants of the same role. 1782 + * The role of the messages author, in this case `user`. 1783 1783 */ 1784 - name?: string; 1784 + role: 'user'; 1785 1785 /** 1786 - * The role of the messages author, in this case `user`. 1786 + * An optional name for the participant. Provides the model information to differentiate between participants of the same role. 1787 1787 */ 1788 - role: 'user'; 1788 + name?: string; 1789 1789 }; 1790 1790 1791 1791 export type ChatCompletionRequestUserMessageContentPart = ··· 1807 1807 */ 1808 1808 export type ChatCompletionResponseMessage = { 1809 1809 /** 1810 + * The contents of the message. 1811 + */ 1812 + content: string; 1813 + /** 1814 + * The refusal message generated by the model. 1815 + */ 1816 + refusal: string; 1817 + tool_calls?: ChatCompletionMessageToolCalls; 1818 + /** 1810 1819 * Annotations for the message, when applicable, as when using the 1811 1820 * [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). 1812 1821 * ··· 1829 1838 */ 1830 1839 start_index: number; 1831 1840 /** 1841 + * The URL of the web resource. 1842 + */ 1843 + url: string; 1844 + /** 1832 1845 * The title of the web resource. 1833 1846 */ 1834 1847 title: string; 1835 - /** 1836 - * The URL of the web resource. 1837 - */ 1838 - url: string; 1839 1848 }; 1840 1849 }>; 1841 1850 /** 1851 + * The role of the author of this message. 1852 + */ 1853 + role: 'assistant'; 1854 + /** 1855 + * Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. 1856 + * 1857 + * @deprecated 1858 + */ 1859 + function_call?: { 1860 + /** 1861 + * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. 1862 + */ 1863 + arguments: string; 1864 + /** 1865 + * The name of the function to call. 1866 + */ 1867 + name: string; 1868 + }; 1869 + /** 1842 1870 * If the audio output modality is requested, this object contains data 1843 1871 * about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). 1844 1872 * 1845 1873 */ 1846 1874 audio?: { 1847 1875 /** 1848 - * Base64 encoded audio bytes generated by the model, in the format 1849 - * specified in the request. 1850 - * 1876 + * Unique identifier for this audio response. 1851 1877 */ 1852 - data: string; 1878 + id: string; 1853 1879 /** 1854 1880 * The Unix timestamp (in seconds) for when this audio response will 1855 1881 * no longer be accessible on the server for use in multi-turn ··· 1858 1884 */ 1859 1885 expires_at: number; 1860 1886 /** 1861 - * Unique identifier for this audio response. 1887 + * Base64 encoded audio bytes generated by the model, in the format 1888 + * specified in the request. 1889 + * 1862 1890 */ 1863 - id: string; 1891 + data: string; 1864 1892 /** 1865 1893 * Transcript of the audio generated by the model. 1866 1894 */ 1867 1895 transcript: string; 1868 1896 }; 1869 - /** 1870 - * The contents of the message. 1871 - */ 1872 - content: string; 1873 - /** 1874 - * Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. 1875 - * 1876 - * @deprecated 1877 - */ 1878 - function_call?: { 1879 - /** 1880 - * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. 1881 - */ 1882 - arguments: string; 1883 - /** 1884 - * The name of the function to call. 1885 - */ 1886 - name: string; 1887 - }; 1888 - /** 1889 - * The refusal message generated by the model. 1890 - */ 1891 - refusal: string; 1892 - /** 1893 - * The role of the author of this message. 1894 - */ 1895 - role: 'assistant'; 1896 - tool_calls?: ChatCompletionMessageToolCalls; 1897 1897 }; 1898 1898 1899 1899 /** 1900 1900 * The role of the author of a message 1901 1901 */ 1902 1902 export const ChatCompletionRole = { 1903 - ASSISTANT: 'assistant', 1904 1903 DEVELOPER: 'developer', 1905 - FUNCTION: 'function', 1906 1904 SYSTEM: 'system', 1907 - TOOL: 'tool', 1908 1905 USER: 'user', 1906 + ASSISTANT: 'assistant', 1907 + TOOL: 'tool', 1908 + FUNCTION: 'function', 1909 1909 } as const; 1910 1910 1911 1911 /** ··· 1920 1920 */ 1921 1921 export type ChatCompletionStreamOptions = { 1922 1922 /** 1923 - * When true, stream obfuscation will be enabled. Stream obfuscation adds 1924 - * random characters to an `obfuscation` field on streaming delta events to 1925 - * normalize payload sizes as a mitigation to certain side-channel attacks. 1926 - * These obfuscation fields are included by default, but add a small amount 1927 - * of overhead to the data stream. You can set `include_obfuscation` to 1928 - * false to optimize for bandwidth if you trust the network links between 1929 - * your application and the OpenAI API. 1930 - * 1931 - */ 1932 - include_obfuscation?: boolean; 1933 - /** 1934 1923 * If set, an additional chunk will be streamed before the `data: [DONE]` 1935 1924 * message. The `usage` field on this chunk shows the token usage statistics 1936 1925 * for the entire request, and the `choices` field will always be an empty ··· 1942 1931 * 1943 1932 */ 1944 1933 include_usage?: boolean; 1934 + /** 1935 + * When true, stream obfuscation will be enabled. Stream obfuscation adds 1936 + * random characters to an `obfuscation` field on streaming delta events to 1937 + * normalize payload sizes as a mitigation to certain side-channel attacks. 1938 + * These obfuscation fields are included by default, but add a small amount 1939 + * of overhead to the data stream. You can set `include_obfuscation` to 1940 + * false to optimize for bandwidth if you trust the network links between 1941 + * your application and the OpenAI API. 1942 + * 1943 + */ 1944 + include_obfuscation?: boolean; 1945 1945 }; 1946 1946 1947 1947 /** ··· 1967 1967 */ 1968 1968 name?: string; 1969 1969 }; 1970 + tool_calls?: Array<ChatCompletionMessageToolCallChunk>; 1971 + /** 1972 + * The role of the author of this message. 1973 + */ 1974 + role?: 'developer' | 'system' | 'user' | 'assistant' | 'tool'; 1970 1975 /** 1971 1976 * The refusal message generated by the model. 1972 1977 */ 1973 1978 refusal?: string; 1974 - /** 1975 - * The role of the author of this message. 1976 - */ 1977 - role?: 'developer' | 'system' | 'user' | 'assistant' | 'tool'; 1978 - tool_calls?: Array<ChatCompletionMessageToolCallChunk>; 1979 1979 }; 1980 1980 1981 1981 export type ChatCompletionTokenLogprob = { 1982 1982 /** 1983 - * A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. 1983 + * The token. 1984 1984 */ 1985 - bytes: Array<number>; 1985 + token: string; 1986 1986 /** 1987 1987 * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. 1988 1988 */ 1989 1989 logprob: number; 1990 1990 /** 1991 - * The token. 1991 + * A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. 1992 1992 */ 1993 - token: string; 1993 + bytes: Array<number>; 1994 1994 /** 1995 1995 * List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. 1996 1996 */ 1997 1997 top_logprobs: Array<{ 1998 1998 /** 1999 - * A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. 1999 + * The token. 2000 2000 */ 2001 - bytes: Array<number>; 2001 + token: string; 2002 2002 /** 2003 2003 * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. 2004 2004 */ 2005 2005 logprob: number; 2006 2006 /** 2007 - * The token. 2007 + * A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. 2008 2008 */ 2009 - token: string; 2009 + bytes: Array<number>; 2010 2010 }>; 2011 2011 }; 2012 2012 ··· 2017 2017 * 2018 2018 */ 2019 2019 export type ChatCompletionTool = { 2020 - function: FunctionObject; 2021 2020 /** 2022 2021 * The type of the tool. Currently, only `function` is supported. 2023 2022 */ 2024 2023 type: 'function'; 2024 + function: FunctionObject; 2025 2025 }; 2026 2026 2027 2027 /** ··· 2061 2061 */ 2062 2062 export type Click = { 2063 2063 /** 2064 - * Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. 2064 + * Specifies the event type. For a click action, this property is 2065 + * always set to `click`. 2065 2066 * 2066 2067 */ 2067 - button: 'left' | 'right' | 'wheel' | 'back' | 'forward'; 2068 + type: 'click'; 2068 2069 /** 2069 - * Specifies the event type. For a click action, this property is 2070 - * always set to `click`. 2070 + * Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. 2071 2071 * 2072 2072 */ 2073 - type: 'click'; 2073 + button: 'left' | 'right' | 'wheel' | 'back' | 'forward'; 2074 2074 /** 2075 2075 * The x-coordinate where the click occurred. 2076 2076 * ··· 2090 2090 * 2091 2091 */ 2092 2092 export type CodeInterpreterFileOutput = { 2093 + /** 2094 + * The type of the code interpreter file output. Always `files`. 2095 + * 2096 + */ 2097 + type: 'files'; 2093 2098 files: Array<{ 2094 2099 /** 2095 - * The ID of the file. 2100 + * The MIME type of the file. 2096 2101 * 2097 2102 */ 2098 - file_id: string; 2103 + mime_type: string; 2099 2104 /** 2100 - * The MIME type of the file. 2105 + * The ID of the file. 2101 2106 * 2102 2107 */ 2103 - mime_type: string; 2108 + file_id: string; 2104 2109 }>; 2105 - /** 2106 - * The type of the code interpreter file output. Always `files`. 2107 - * 2108 - */ 2109 - type: 'files'; 2110 2110 }; 2111 2111 2112 2112 /** ··· 2134 2134 */ 2135 2135 export type CodeInterpreterOutputLogs = { 2136 2136 /** 2137 - * The logs output from the code interpreter. 2138 - */ 2139 - logs: string; 2140 - /** 2141 2137 * The type of the output. Always 'logs'. 2142 2138 */ 2143 2139 type: 'logs'; 2140 + /** 2141 + * The logs output from the code interpreter. 2142 + */ 2143 + logs: string; 2144 2144 }; 2145 2145 2146 2146 /** ··· 2151 2151 */ 2152 2152 export type CodeInterpreterTextOutput = { 2153 2153 /** 2154 - * The logs of the code interpreter tool call. 2154 + * The type of the code interpreter text output. Always `logs`. 2155 2155 * 2156 2156 */ 2157 - logs: string; 2157 + type: 'logs'; 2158 2158 /** 2159 - * The type of the code interpreter text output. Always `logs`. 2159 + * The logs of the code interpreter tool call. 2160 2160 * 2161 2161 */ 2162 - type: 'logs'; 2162 + logs: string; 2163 2163 }; 2164 2164 2165 2165 /** ··· 2170 2170 */ 2171 2171 export type CodeInterpreterTool = { 2172 2172 /** 2173 - * The code interpreter container. Can be a container ID or an object that 2174 - * specifies uploaded file IDs to make available to your code. 2173 + * The type of the code interpreter tool. Always `code_interpreter`. 2175 2174 * 2176 2175 */ 2177 - container: string | CodeInterpreterToolAuto; 2176 + type: 'code_interpreter'; 2178 2177 /** 2179 - * The type of the code interpreter tool. Always `code_interpreter`. 2178 + * The code interpreter container. Can be a container ID or an object that 2179 + * specifies uploaded file IDs to make available to your code. 2180 2180 * 2181 2181 */ 2182 - type: 'code_interpreter'; 2182 + container: string | CodeInterpreterToolAuto; 2183 2183 }; 2184 2184 2185 2185 /** ··· 2191 2191 */ 2192 2192 export type CodeInterpreterToolAuto = { 2193 2193 /** 2194 + * Always `auto`. 2195 + */ 2196 + type: 'auto'; 2197 + /** 2194 2198 * An optional list of uploaded files to make available to your code. 2195 2199 * 2196 2200 */ 2197 2201 file_ids?: Array<string>; 2198 - /** 2199 - * Always `auto`. 2200 - */ 2201 - type: 'auto'; 2202 2202 }; 2203 2203 2204 2204 /** ··· 2209 2209 */ 2210 2210 export type CodeInterpreterToolCall = { 2211 2211 /** 2212 - * The code to run, or null if not available. 2212 + * The type of the code interpreter tool call. Always `code_interpreter_call`. 2213 + * 2214 + */ 2215 + type: 'code_interpreter_call'; 2216 + /** 2217 + * The unique ID of the code interpreter tool call. 2213 2218 * 2214 2219 */ 2215 - code: string; 2220 + id: string; 2221 + /** 2222 + * The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. 2223 + * 2224 + */ 2225 + status: 2226 + | 'in_progress' 2227 + | 'completed' 2228 + | 'incomplete' 2229 + | 'interpreting' 2230 + | 'failed'; 2216 2231 /** 2217 2232 * The ID of the container used to run the code. 2218 2233 * 2219 2234 */ 2220 2235 container_id: string; 2221 2236 /** 2222 - * The unique ID of the code interpreter tool call. 2237 + * The code to run, or null if not available. 2223 2238 * 2224 2239 */ 2225 - id: string; 2240 + code: string; 2226 2241 /** 2227 2242 * The outputs generated by the code interpreter, such as logs or images. 2228 2243 * Can be null if no outputs are available. ··· 2236 2251 type?: 'CodeInterpreterOutputImage'; 2237 2252 } & CodeInterpreterOutputImage) 2238 2253 >; 2239 - /** 2240 - * The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. 2241 - * 2242 - */ 2243 - status: 2244 - | 'in_progress' 2245 - | 'completed' 2246 - | 'incomplete' 2247 - | 'interpreting' 2248 - | 'failed'; 2249 - /** 2250 - * The type of the code interpreter tool call. Always `code_interpreter_call`. 2251 - * 2252 - */ 2253 - type: 'code_interpreter_call'; 2254 2254 }; 2255 2255 2256 2256 /** ··· 2261 2261 */ 2262 2262 export type ComparisonFilter = { 2263 2263 /** 2264 - * The key to compare against the value. 2265 - */ 2266 - key: string; 2267 - /** 2268 2264 * Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. 2269 2265 * - `eq`: equals 2270 2266 * - `ne`: not equal ··· 2275 2271 * 2276 2272 */ 2277 2273 type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte'; 2274 + /** 2275 + * The key to compare against the value. 2276 + */ 2277 + key: string; 2278 2278 /** 2279 2279 * The value to compare against the attribute key; supports string, number, or boolean types. 2280 2280 */ ··· 2283 2283 2284 2284 export type CompleteUploadRequest = { 2285 2285 /** 2286 - * The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. 2286 + * The ordered list of Part IDs. 2287 2287 * 2288 2288 */ 2289 - md5?: string; 2289 + part_ids: Array<string>; 2290 2290 /** 2291 - * The ordered list of Part IDs. 2291 + * The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. 2292 2292 * 2293 2293 */ 2294 - part_ids: Array<string>; 2294 + md5?: string; 2295 2295 }; 2296 2296 2297 2297 /** ··· 2302 2302 * Number of tokens in the generated completion. 2303 2303 */ 2304 2304 completion_tokens: number; 2305 + /** 2306 + * Number of tokens in the prompt. 2307 + */ 2308 + prompt_tokens: number; 2309 + /** 2310 + * Total number of tokens used in the request (prompt + completion). 2311 + */ 2312 + total_tokens: number; 2305 2313 /** 2306 2314 * Breakdown of tokens used in a completion. 2307 2315 */ ··· 2330 2338 */ 2331 2339 rejected_prediction_tokens?: number; 2332 2340 }; 2333 - /** 2334 - * Number of tokens in the prompt. 2335 - */ 2336 - prompt_tokens: number; 2337 2341 /** 2338 2342 * Breakdown of tokens used in the prompt. 2339 2343 */ ··· 2347 2351 */ 2348 2352 cached_tokens?: number; 2349 2353 }; 2350 - /** 2351 - * Total number of tokens used in the request (prompt + completion). 2352 - */ 2353 - total_tokens: number; 2354 2354 }; 2355 2355 2356 2356 /** ··· 2360 2360 */ 2361 2361 export type CompoundFilter = { 2362 2362 /** 2363 - * Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. 2364 - */ 2365 - filters: Array<ComparisonFilter | unknown>; 2366 - /** 2367 2363 * Type of operation: `and` or `or`. 2368 2364 */ 2369 2365 type: 'and' | 'or'; 2366 + /** 2367 + * Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. 2368 + */ 2369 + filters: Array<ComparisonFilter | unknown>; 2370 2370 }; 2371 2371 2372 2372 export type ComputerAction = ··· 2404 2404 */ 2405 2405 export type ComputerScreenshotImage = { 2406 2406 /** 2407 - * The identifier of an uploaded file that contains the screenshot. 2407 + * Specifies the event type. For a computer screenshot, this property is 2408 + * always set to `computer_screenshot`. 2409 + * 2408 2410 */ 2409 - file_id?: string; 2411 + type: 'computer_screenshot'; 2410 2412 /** 2411 2413 * The URL of the screenshot image. 2412 2414 */ 2413 2415 image_url?: string; 2414 2416 /** 2415 - * Specifies the event type. For a computer screenshot, this property is 2416 - * always set to `computer_screenshot`. 2417 - * 2417 + * The identifier of an uploaded file that contains the screenshot. 2418 2418 */ 2419 - type: 'computer_screenshot'; 2419 + file_id?: string; 2420 2420 }; 2421 2421 2422 2422 /** ··· 2427 2427 * 2428 2428 */ 2429 2429 export type ComputerToolCall = { 2430 - action: ComputerAction; 2431 2430 /** 2432 - * An identifier used when responding to the tool call with output. 2433 - * 2431 + * The type of the computer call. Always `computer_call`. 2434 2432 */ 2435 - call_id: string; 2433 + type: 'computer_call'; 2436 2434 /** 2437 2435 * The unique ID of the computer call. 2438 2436 */ 2439 2437 id: string; 2440 2438 /** 2439 + * An identifier used when responding to the tool call with output. 2440 + * 2441 + */ 2442 + call_id: string; 2443 + action: ComputerAction; 2444 + /** 2441 2445 * The pending safety checks for the computer call. 2442 2446 * 2443 2447 */ ··· 2448 2452 * 2449 2453 */ 2450 2454 status: 'in_progress' | 'completed' | 'incomplete'; 2451 - /** 2452 - * The type of the computer call. Always `computer_call`. 2453 - */ 2454 - type: 'computer_call'; 2455 2455 }; 2456 2456 2457 2457 /** ··· 2462 2462 */ 2463 2463 export type ComputerToolCallOutput = { 2464 2464 /** 2465 - * The safety checks reported by the API that have been acknowledged by the 2466 - * developer. 2465 + * The type of the computer tool call output. Always `computer_call_output`. 2466 + * 2467 + */ 2468 + type: 'computer_call_output'; 2469 + /** 2470 + * The ID of the computer tool call output. 2467 2471 * 2468 2472 */ 2469 - acknowledged_safety_checks?: Array<ComputerToolCallSafetyCheck>; 2473 + id?: string; 2470 2474 /** 2471 2475 * The ID of the computer tool call that produced the output. 2472 2476 * 2473 2477 */ 2474 2478 call_id: string; 2475 2479 /** 2476 - * The ID of the computer tool call output. 2480 + * The safety checks reported by the API that have been acknowledged by the 2481 + * developer. 2477 2482 * 2478 2483 */ 2479 - id?: string; 2484 + acknowledged_safety_checks?: Array<ComputerToolCallSafetyCheck>; 2480 2485 output: ComputerScreenshotImage; 2481 2486 /** 2482 2487 * The status of the message input. One of `in_progress`, `completed`, or ··· 2484 2489 * 2485 2490 */ 2486 2491 status?: 'in_progress' | 'completed' | 'incomplete'; 2487 - /** 2488 - * The type of the computer tool call output. Always `computer_call_output`. 2489 - * 2490 - */ 2491 - type: 'computer_call_output'; 2492 2492 }; 2493 2493 2494 2494 export type ComputerToolCallOutputResource = ComputerToolCallOutput & { ··· 2505 2505 */ 2506 2506 export type ComputerToolCallSafetyCheck = { 2507 2507 /** 2508 - * The type of the pending safety check. 2509 - */ 2510 - code: string; 2511 - /** 2512 2508 * The ID of the pending safety check. 2513 2509 */ 2514 2510 id: string; 2511 + /** 2512 + * The type of the pending safety check. 2513 + */ 2514 + code: string; 2515 2515 /** 2516 2516 * Details about the pending safety check. 2517 2517 */ ··· 2520 2520 2521 2521 export type ContainerFileListResource = { 2522 2522 /** 2523 + * The type of object returned, must be 'list'. 2524 + */ 2525 + object: 'list'; 2526 + /** 2523 2527 * A list of container files. 2524 2528 */ 2525 2529 data: Array<ContainerFileResource>; ··· 2528 2532 */ 2529 2533 first_id: string; 2530 2534 /** 2531 - * Whether there are more files available. 2532 - */ 2533 - has_more: boolean; 2534 - /** 2535 2535 * The ID of the last file in the list. 2536 2536 */ 2537 2537 last_id: string; 2538 2538 /** 2539 - * The type of object returned, must be 'list'. 2539 + * Whether there are more files available. 2540 2540 */ 2541 - object: 'list'; 2541 + has_more: boolean; 2542 2542 }; 2543 2543 2544 2544 /** ··· 2546 2546 */ 2547 2547 export type ContainerFileResource = { 2548 2548 /** 2549 - * Size of the file in bytes. 2549 + * Unique identifier for the file. 2550 + */ 2551 + id: string; 2552 + /** 2553 + * The type of this object (`container.file`). 2550 2554 */ 2551 - bytes: number; 2555 + object: 'container.file'; 2552 2556 /** 2553 2557 * The container this file belongs to. 2554 2558 */ ··· 2558 2562 */ 2559 2563 created_at: number; 2560 2564 /** 2561 - * Unique identifier for the file. 2565 + * Size of the file in bytes. 2562 2566 */ 2563 - id: string; 2564 - /** 2565 - * The type of this object (`container.file`). 2566 - */ 2567 - object: 'container.file'; 2567 + bytes: number; 2568 2568 /** 2569 2569 * Path of the file in the container. 2570 2570 */ ··· 2577 2577 2578 2578 export type ContainerListResource = { 2579 2579 /** 2580 + * The type of object returned, must be 'list'. 2581 + */ 2582 + object: 'list'; 2583 + /** 2580 2584 * A list of containers. 2581 2585 */ 2582 2586 data: Array<ContainerResource>; ··· 2584 2588 * The ID of the first container in the list. 2585 2589 */ 2586 2590 first_id: string; 2587 - /** 2588 - * Whether there are more containers available. 2589 - */ 2590 - has_more: boolean; 2591 2591 /** 2592 2592 * The ID of the last container in the list. 2593 2593 */ 2594 2594 last_id: string; 2595 2595 /** 2596 - * The type of object returned, must be 'list'. 2596 + * Whether there are more containers available. 2597 2597 */ 2598 - object: 'list'; 2598 + has_more: boolean; 2599 2599 }; 2600 2600 2601 2601 /** ··· 2603 2603 */ 2604 2604 export type ContainerResource = { 2605 2605 /** 2606 + * Unique identifier for the container. 2607 + */ 2608 + id: string; 2609 + /** 2610 + * The type of this object. 2611 + */ 2612 + object: string; 2613 + /** 2614 + * Name of the container. 2615 + */ 2616 + name: string; 2617 + /** 2606 2618 * Unix timestamp (in seconds) when the container was created. 2607 2619 */ 2608 2620 created_at: number; 2621 + /** 2622 + * Status of the container (e.g., active, deleted). 2623 + */ 2624 + status: string; 2609 2625 /** 2610 2626 * The container will expire after this time period. 2611 2627 * The anchor is the reference point for the expiration. ··· 2622 2638 */ 2623 2639 minutes?: number; 2624 2640 }; 2625 - /** 2626 - * Unique identifier for the container. 2627 - */ 2628 - id: string; 2629 - /** 2630 - * Name of the container. 2631 - */ 2632 - name: string; 2633 - /** 2634 - * The type of this object. 2635 - */ 2636 - object: string; 2637 - /** 2638 - * Status of the container (e.g., active, deleted). 2639 - */ 2640 - status: string; 2641 2641 }; 2642 2642 2643 2643 /** ··· 2669 2669 * The aggregated costs details of the specific time bucket. 2670 2670 */ 2671 2671 export type CostsResult = { 2672 + object: 'organization.costs.result'; 2672 2673 /** 2673 2674 * The monetary value in its associated currency. 2674 2675 */ 2675 2676 amount?: { 2677 + /** 2678 + * The numeric value of the cost. 2679 + */ 2680 + value?: number; 2676 2681 /** 2677 2682 * Lowercase ISO-4217 currency e.g. "usd" 2678 2683 */ 2679 2684 currency?: string; 2680 - /** 2681 - * The numeric value of the cost. 2682 - */ 2683 - value?: number; 2684 2685 }; 2685 2686 /** 2686 2687 * When `group_by=line_item`, this field provides the line item of the grouped costs result. 2687 2688 */ 2688 2689 line_item?: string; 2689 - object: 'organization.costs.result'; 2690 2690 /** 2691 2691 * When `group_by=project_id`, this field provides the project ID of the grouped costs result. 2692 2692 */ ··· 2695 2695 2696 2696 export type CreateAssistantRequest = { 2697 2697 /** 2698 - * The description of the assistant. The maximum length is 512 characters. 2698 + * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. 2699 2699 * 2700 2700 */ 2701 - description?: string; 2701 + model: string | AssistantSupportedModels; 2702 2702 /** 2703 - * The system instructions that the assistant uses. The maximum length is 256,000 characters. 2703 + * The name of the assistant. The maximum length is 256 characters. 2704 2704 * 2705 2705 */ 2706 - instructions?: string; 2707 - metadata?: Metadata; 2706 + name?: string; 2708 2707 /** 2709 - * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. 2708 + * The description of the assistant. The maximum length is 512 characters. 2710 2709 * 2711 2710 */ 2712 - model: string | AssistantSupportedModels; 2711 + description?: string; 2713 2712 /** 2714 - * The name of the assistant. The maximum length is 256 characters. 2713 + * The system instructions that the assistant uses. The maximum length is 256,000 characters. 2715 2714 * 2716 2715 */ 2717 - name?: string; 2716 + instructions?: string; 2718 2717 reasoning_effort?: ReasoningEffort; 2719 - response_format?: AssistantsApiResponseFormatOption; 2720 2718 /** 2721 - * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 2719 + * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. 2722 2720 * 2723 2721 */ 2724 - temperature?: number; 2722 + tools?: Array<AssistantTool>; 2725 2723 /** 2726 2724 * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. 2727 2725 * ··· 2746 2744 */ 2747 2745 vector_stores?: Array<{ 2748 2746 /** 2747 + * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. 2748 + * 2749 + */ 2750 + file_ids?: Array<string>; 2751 + /** 2749 2752 * The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. 2750 2753 */ 2751 2754 chunking_strategy?: ··· 2756 2759 type: 'auto'; 2757 2760 } 2758 2761 | { 2762 + /** 2763 + * Always `static`. 2764 + */ 2765 + type: 'static'; 2759 2766 static: { 2760 2767 /** 2768 + * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. 2769 + */ 2770 + max_chunk_size_tokens: number; 2771 + /** 2761 2772 * The number of tokens that overlap between chunks. The default value is `400`. 2762 2773 * 2763 2774 * Note that the overlap must not exceed half of `max_chunk_size_tokens`. 2764 2775 * 2765 2776 */ 2766 2777 chunk_overlap_tokens: number; 2767 - /** 2768 - * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. 2769 - */ 2770 - max_chunk_size_tokens: number; 2771 2778 }; 2772 - /** 2773 - * Always `static`. 2774 - */ 2775 - type: 'static'; 2776 2779 }; 2777 - /** 2778 - * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. 2779 - * 2780 - */ 2781 - file_ids?: Array<string>; 2782 2780 metadata?: Metadata; 2783 2781 }>; 2784 2782 }; 2785 2783 }; 2784 + metadata?: Metadata; 2786 2785 /** 2787 - * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. 2786 + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 2788 2787 * 2789 2788 */ 2790 - tools?: Array<AssistantTool>; 2789 + temperature?: number; 2791 2790 /** 2792 2791 * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. 2793 2792 * ··· 2795 2794 * 2796 2795 */ 2797 2796 top_p?: number; 2797 + response_format?: AssistantsApiResponseFormatOption; 2798 2798 }; 2799 2799 2800 2800 export type CreateChatCompletionRequest = CreateModelResponseProperties & { 2801 2801 /** 2802 - * Parameters for audio output. Required when audio output is requested with 2803 - * `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). 2802 + * A list of messages comprising the conversation so far. Depending on the 2803 + * [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are 2804 + * supported, like [text](https://platform.openai.com/docs/guides/text-generation), 2805 + * [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio). 2804 2806 * 2805 2807 */ 2806 - audio?: { 2807 - /** 2808 - * Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, 2809 - * `opus`, or `pcm16`. 2810 - * 2811 - */ 2812 - format: 'wav' | 'aac' | 'mp3' | 'flac' | 'opus' | 'pcm16'; 2813 - /** 2814 - * The voice the model uses to respond. Supported voices are 2815 - * `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`. 2816 - * 2817 - */ 2818 - voice: VoiceIdsShared; 2819 - }; 2808 + messages: Array<ChatCompletionRequestMessage>; 2809 + /** 2810 + * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI 2811 + * offers a wide range of models with different capabilities, performance 2812 + * characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) 2813 + * to browse and compare available models. 2814 + * 2815 + */ 2816 + model: ModelIdsShared; 2817 + modalities?: ResponseModalities; 2818 + verbosity?: Verbosity; 2819 + reasoning_effort?: ReasoningEffort; 2820 + /** 2821 + * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). 2822 + * 2823 + */ 2824 + max_completion_tokens?: number; 2820 2825 /** 2821 2826 * Number between -2.0 and 2.0. Positive values penalize new tokens based on 2822 2827 * their existing frequency in the text so far, decreasing the model's ··· 2825 2830 */ 2826 2831 frequency_penalty?: number; 2827 2832 /** 2828 - * Deprecated in favor of `tool_choice`. 2833 + * Number between -2.0 and 2.0. Positive values penalize new tokens based on 2834 + * whether they appear in the text so far, increasing the model's likelihood 2835 + * to talk about new topics. 2836 + * 2837 + */ 2838 + presence_penalty?: number; 2839 + /** 2840 + * Web search 2829 2841 * 2830 - * Controls which (if any) function is called by the model. 2842 + * This tool searches the web for relevant results to use in a response. 2843 + * Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). 2831 2844 * 2832 - * `none` means the model will not call a function and instead generates a 2833 - * message. 2845 + */ 2846 + web_search_options?: { 2847 + /** 2848 + * Approximate location parameters for the search. 2849 + * 2850 + */ 2851 + user_location?: { 2852 + /** 2853 + * The type of location approximation. Always `approximate`. 2854 + * 2855 + */ 2856 + type: 'approximate'; 2857 + approximate: WebSearchLocation; 2858 + }; 2859 + search_context_size?: WebSearchContextSize; 2860 + }; 2861 + /** 2862 + * An integer between 0 and 20 specifying the number of most likely tokens to 2863 + * return at each token position, each with an associated log probability. 2864 + * `logprobs` must be set to `true` if this parameter is used. 2834 2865 * 2835 - * `auto` means the model can pick between generating a message or calling a 2836 - * function. 2866 + */ 2867 + top_logprobs?: number; 2868 + /** 2869 + * An object specifying the format that the model must output. 2837 2870 * 2838 - * Specifying a particular function via `{"name": "my_function"}` forces the 2839 - * model to call that function. 2871 + * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables 2872 + * Structured Outputs which ensures the model will match your supplied JSON 2873 + * schema. Learn more in the [Structured Outputs 2874 + * guide](https://platform.openai.com/docs/guides/structured-outputs). 2840 2875 * 2841 - * `none` is the default when no functions are present. `auto` is the default 2842 - * if functions are present. 2876 + * Setting to `{ "type": "json_object" }` enables the older JSON mode, which 2877 + * ensures the message the model generates is valid JSON. Using `json_schema` 2878 + * is preferred for models that support it. 2843 2879 * 2880 + */ 2881 + response_format?: 2882 + | ResponseFormatText 2883 + | ResponseFormatJsonSchema 2884 + | ResponseFormatJsonObject; 2885 + /** 2886 + * Parameters for audio output. Required when audio output is requested with 2887 + * `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). 2844 2888 * 2845 - * @deprecated 2846 2889 */ 2847 - function_call?: 'none' | 'auto' | ChatCompletionFunctionCallOption; 2890 + audio?: { 2891 + /** 2892 + * The voice the model uses to respond. Supported voices are 2893 + * `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`. 2894 + * 2895 + */ 2896 + voice: VoiceIdsShared; 2897 + /** 2898 + * Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, 2899 + * `opus`, or `pcm16`. 2900 + * 2901 + */ 2902 + format: 'wav' | 'aac' | 'mp3' | 'flac' | 'opus' | 'pcm16'; 2903 + }; 2848 2904 /** 2849 - * Deprecated in favor of `tools`. 2905 + * Whether or not to store the output of this chat completion request for 2906 + * use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or 2907 + * [evals](https://platform.openai.com/docs/guides/evals) products. 2850 2908 * 2851 - * A list of functions the model may generate JSON inputs for. 2909 + * Supports text and image inputs. Note: image inputs over 8MB will be dropped. 2852 2910 * 2911 + */ 2912 + store?: boolean; 2913 + /** 2914 + * If set to true, the model response data will be streamed to the client 2915 + * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). 2916 + * See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) 2917 + * for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) 2918 + * guide for more information on how to handle the streaming events. 2853 2919 * 2854 - * @deprecated 2855 2920 */ 2856 - functions?: Array<ChatCompletionFunctions>; 2921 + stream?: boolean; 2922 + stop?: StopConfiguration; 2857 2923 /** 2858 2924 * Modify the likelihood of specified tokens appearing in the completion. 2859 2925 * ··· 2876 2942 */ 2877 2943 logprobs?: boolean; 2878 2944 /** 2879 - * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). 2880 - * 2881 - */ 2882 - max_completion_tokens?: number; 2883 - /** 2884 2945 * The maximum number of [tokens](/tokenizer) that can be generated in the 2885 2946 * chat completion. This value can be used to control 2886 2947 * [costs](https://openai.com/api/pricing/) for text generated via API. ··· 2893 2954 */ 2894 2955 max_tokens?: number; 2895 2956 /** 2896 - * A list of messages comprising the conversation so far. Depending on the 2897 - * [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are 2898 - * supported, like [text](https://platform.openai.com/docs/guides/text-generation), 2899 - * [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio). 2900 - * 2901 - */ 2902 - messages: Array<ChatCompletionRequestMessage>; 2903 - modalities?: ResponseModalities; 2904 - /** 2905 - * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI 2906 - * offers a wide range of models with different capabilities, performance 2907 - * characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) 2908 - * to browse and compare available models. 2909 - * 2910 - */ 2911 - model: ModelIdsShared; 2912 - /** 2913 2957 * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. 2914 2958 */ 2915 2959 n?: number; 2916 - parallel_tool_calls?: ParallelToolCalls; 2917 2960 /** 2918 2961 * Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs), 2919 2962 * which can greatly improve response times when large parts of the model ··· 2925 2968 type?: 'PredictionContent'; 2926 2969 } & PredictionContent; 2927 2970 /** 2928 - * Number between -2.0 and 2.0. Positive values penalize new tokens based on 2929 - * whether they appear in the text so far, increasing the model's likelihood 2930 - * to talk about new topics. 2931 - * 2932 - */ 2933 - presence_penalty?: number; 2934 - reasoning_effort?: ReasoningEffort; 2935 - /** 2936 - * An object specifying the format that the model must output. 2937 - * 2938 - * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables 2939 - * Structured Outputs which ensures the model will match your supplied JSON 2940 - * schema. Learn more in the [Structured Outputs 2941 - * guide](https://platform.openai.com/docs/guides/structured-outputs). 2942 - * 2943 - * Setting to `{ "type": "json_object" }` enables the older JSON mode, which 2944 - * ensures the message the model generates is valid JSON. Using `json_schema` 2945 - * is preferred for models that support it. 2946 - * 2947 - */ 2948 - response_format?: 2949 - | ResponseFormatText 2950 - | ResponseFormatJsonSchema 2951 - | ResponseFormatJsonObject; 2952 - /** 2953 2971 * This feature is in Beta. 2954 2972 * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. 2955 2973 * Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. ··· 2958 2976 * @deprecated 2959 2977 */ 2960 2978 seed?: number; 2961 - stop?: StopConfiguration; 2962 - /** 2963 - * Whether or not to store the output of this chat completion request for 2964 - * use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or 2965 - * [evals](https://platform.openai.com/docs/guides/evals) products. 2966 - * 2967 - * Supports text and image inputs. Note: image inputs over 8MB will be dropped. 2968 - * 2969 - */ 2970 - store?: boolean; 2971 - /** 2972 - * If set to true, the model response data will be streamed to the client 2973 - * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). 2974 - * See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) 2975 - * for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) 2976 - * guide for more information on how to handle the streaming events. 2977 - * 2978 - */ 2979 - stream?: boolean; 2980 2979 stream_options?: ChatCompletionStreamOptions; 2981 - tool_choice?: ChatCompletionToolChoiceOption; 2982 2980 /** 2983 2981 * A list of tools the model may call. You can provide either 2984 2982 * [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or ··· 2993 2991 type?: 'CustomToolChatCompletions'; 2994 2992 } & CustomToolChatCompletions) 2995 2993 >; 2994 + tool_choice?: ChatCompletionToolChoiceOption; 2995 + parallel_tool_calls?: ParallelToolCalls; 2996 2996 /** 2997 - * An integer between 0 and 20 specifying the number of most likely tokens to 2998 - * return at each token position, each with an associated log probability. 2999 - * `logprobs` must be set to `true` if this parameter is used. 2997 + * Deprecated in favor of `tool_choice`. 2998 + * 2999 + * Controls which (if any) function is called by the model. 3000 + * 3001 + * `none` means the model will not call a function and instead generates a 3002 + * message. 3003 + * 3004 + * `auto` means the model can pick between generating a message or calling a 3005 + * function. 3006 + * 3007 + * Specifying a particular function via `{"name": "my_function"}` forces the 3008 + * model to call that function. 3009 + * 3010 + * `none` is the default when no functions are present. `auto` is the default 3011 + * if functions are present. 3012 + * 3000 3013 * 3014 + * @deprecated 3001 3015 */ 3002 - top_logprobs?: number; 3003 - verbosity?: Verbosity; 3016 + function_call?: 'none' | 'auto' | ChatCompletionFunctionCallOption; 3004 3017 /** 3005 - * Web search 3018 + * Deprecated in favor of `tools`. 3006 3019 * 3007 - * This tool searches the web for relevant results to use in a response. 3008 - * Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). 3020 + * A list of functions the model may generate JSON inputs for. 3021 + * 3009 3022 * 3023 + * @deprecated 3010 3024 */ 3011 - web_search_options?: { 3012 - search_context_size?: WebSearchContextSize; 3013 - /** 3014 - * Approximate location parameters for the search. 3015 - * 3016 - */ 3017 - user_location?: { 3018 - approximate: WebSearchLocation; 3019 - /** 3020 - * The type of location approximation. Always `approximate`. 3021 - * 3022 - */ 3023 - type: 'approximate'; 3024 - }; 3025 - }; 3025 + functions?: Array<ChatCompletionFunctions>; 3026 3026 }; 3027 3027 3028 3028 /** 3029 3029 * Represents a chat completion response returned by model, based on the provided input. 3030 3030 */ 3031 3031 export type CreateChatCompletionResponse = { 3032 + /** 3033 + * A unique identifier for the chat completion. 3034 + */ 3035 + id: string; 3032 3036 /** 3033 3037 * A list of chat completion choices. Can be more than one if `n` is greater than 1. 3034 3038 */ ··· 3050 3054 * The index of the choice in the list of choices. 3051 3055 */ 3052 3056 index: number; 3057 + message: ChatCompletionResponseMessage; 3053 3058 /** 3054 3059 * Log probability information for the choice. 3055 3060 */ ··· 3063 3068 */ 3064 3069 refusal: Array<ChatCompletionTokenLogprob>; 3065 3070 }; 3066 - message: ChatCompletionResponseMessage; 3067 3071 }>; 3068 3072 /** 3069 3073 * The Unix timestamp (in seconds) of when the chat completion was created. 3070 3074 */ 3071 3075 created: number; 3072 - /** 3073 - * A unique identifier for the chat completion. 3074 - */ 3075 - id: string; 3076 3076 /** 3077 3077 * The model used for the chat completion. 3078 3078 */ 3079 3079 model: string; 3080 - /** 3081 - * The object type, which is always `chat.completion`. 3082 - */ 3083 - object: 'chat.completion'; 3084 3080 service_tier?: ServiceTier; 3085 3081 /** 3086 3082 * This fingerprint represents the backend configuration that the model runs with. ··· 3091 3087 * @deprecated 3092 3088 */ 3093 3089 system_fingerprint?: string; 3090 + /** 3091 + * The object type, which is always `chat.completion`. 3092 + */ 3093 + object: 'chat.completion'; 3094 3094 usage?: CompletionUsage; 3095 3095 }; 3096 3096 ··· 3102 3102 */ 3103 3103 export type CreateChatCompletionStreamResponse = { 3104 3104 /** 3105 + * A unique identifier for the chat completion. Each chunk has the same ID. 3106 + */ 3107 + id: string; 3108 + /** 3105 3109 * A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the 3106 3110 * last chunk if you set `stream_options: {"include_usage": true}`. 3107 3111 * ··· 3109 3113 choices: Array<{ 3110 3114 delta: ChatCompletionStreamResponseDelta; 3111 3115 /** 3116 + * Log probability information for the choice. 3117 + */ 3118 + logprobs?: { 3119 + /** 3120 + * A list of message content tokens with log probability information. 3121 + */ 3122 + content: Array<ChatCompletionTokenLogprob>; 3123 + /** 3124 + * A list of message refusal tokens with log probability information. 3125 + */ 3126 + refusal: Array<ChatCompletionTokenLogprob>; 3127 + }; 3128 + /** 3112 3129 * The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, 3113 3130 * `length` if the maximum number of tokens specified in the request was reached, 3114 3131 * `content_filter` if content was omitted due to a flag from our content filters, ··· 3125 3142 * The index of the choice in the list of choices. 3126 3143 */ 3127 3144 index: number; 3128 - /** 3129 - * Log probability information for the choice. 3130 - */ 3131 - logprobs?: { 3132 - /** 3133 - * A list of message content tokens with log probability information. 3134 - */ 3135 - content: Array<ChatCompletionTokenLogprob>; 3136 - /** 3137 - * A list of message refusal tokens with log probability information. 3138 - */ 3139 - refusal: Array<ChatCompletionTokenLogprob>; 3140 - }; 3141 3145 }>; 3142 3146 /** 3143 3147 * The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp. 3144 3148 */ 3145 3149 created: number; 3146 3150 /** 3147 - * A unique identifier for the chat completion. Each chunk has the same ID. 3148 - */ 3149 - id: string; 3150 - /** 3151 3151 * The model to generate the completion. 3152 3152 */ 3153 3153 model: string; 3154 - /** 3155 - * The object type, which is always `chat.completion.chunk`. 3156 - */ 3157 - object: 'chat.completion.chunk'; 3158 3154 service_tier?: ServiceTier; 3159 3155 /** 3160 3156 * This fingerprint represents the backend configuration that the model runs with. ··· 3165 3161 */ 3166 3162 system_fingerprint?: string; 3167 3163 /** 3164 + * The object type, which is always `chat.completion.chunk`. 3165 + */ 3166 + object: 'chat.completion.chunk'; 3167 + /** 3168 3168 * An optional field that will only be present when you set 3169 3169 * `stream_options: {"include_usage": true}` in your request. When present, it 3170 3170 * contains a null value **except for the last chunk** which contains the ··· 3180 3180 3181 3181 export type CreateCompletionRequest = { 3182 3182 /** 3183 + * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. 3184 + * 3185 + */ 3186 + model: string | 'gpt-3.5-turbo-instruct' | 'davinci-002' | 'babbage-002'; 3187 + /** 3188 + * The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. 3189 + * 3190 + * Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. 3191 + * 3192 + */ 3193 + prompt: string | Array<string> | Array<number> | Array<Array<number>>; 3194 + /** 3183 3195 * Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed. 3184 3196 * 3185 3197 * When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`. ··· 3226 3238 */ 3227 3239 max_tokens?: number; 3228 3240 /** 3229 - * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. 3230 - * 3231 - */ 3232 - model: string | 'gpt-3.5-turbo-instruct' | 'davinci-002' | 'babbage-002'; 3233 - /** 3234 3241 * How many completions to generate for each prompt. 3235 3242 * 3236 3243 * **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. ··· 3244 3251 * 3245 3252 */ 3246 3253 presence_penalty?: number; 3247 - /** 3248 - * The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. 3249 - * 3250 - * Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. 3251 - * 3252 - */ 3253 - prompt: string | Array<string> | Array<number> | Array<Array<number>>; 3254 3254 /** 3255 3255 * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. 3256 3256 * ··· 3299 3299 */ 3300 3300 export type CreateCompletionResponse = { 3301 3301 /** 3302 + * A unique identifier for the completion. 3303 + */ 3304 + id: string; 3305 + /** 3302 3306 * The list of completion choices the model generated for the input prompt. 3303 3307 */ 3304 3308 choices: Array<{ ··· 3325 3329 */ 3326 3330 created: number; 3327 3331 /** 3328 - * A unique identifier for the completion. 3329 - */ 3330 - id: string; 3331 - /** 3332 3332 * The model used for completion. 3333 3333 */ 3334 3334 model: string; 3335 3335 /** 3336 - * The object type, which is always "text_completion" 3337 - */ 3338 - object: 'text_completion'; 3339 - /** 3340 3336 * This fingerprint represents the backend configuration that the model runs with. 3341 3337 * 3342 3338 * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. 3343 3339 * 3344 3340 */ 3345 3341 system_fingerprint?: string; 3342 + /** 3343 + * The object type, which is always "text_completion" 3344 + */ 3345 + object: 'text_completion'; 3346 3346 usage?: CompletionUsage; 3347 3347 }; 3348 3348 3349 3349 export type CreateContainerBody = { 3350 3350 /** 3351 + * Name of the container to create. 3352 + */ 3353 + name: string; 3354 + /** 3355 + * IDs of files to copy to the container. 3356 + */ 3357 + file_ids?: Array<string>; 3358 + /** 3351 3359 * Container expiration time in seconds relative to the 'anchor' time. 3352 3360 */ 3353 3361 expires_after?: { ··· 3357 3365 anchor: 'last_active_at'; 3358 3366 minutes: number; 3359 3367 }; 3360 - /** 3361 - * IDs of files to copy to the container. 3362 - */ 3363 - file_ids?: Array<string>; 3364 - /** 3365 - * Name of the container to create. 3366 - */ 3367 - name: string; 3368 3368 }; 3369 3369 3370 3370 export type CreateContainerFileBody = { 3371 3371 /** 3372 + * Name of the file to create. 3373 + */ 3374 + file_id?: string; 3375 + /** 3372 3376 * The File object (not file name) to be uploaded. 3373 3377 * 3374 3378 */ 3375 3379 file?: Blob | File; 3376 - /** 3377 - * Name of the file to create. 3378 - */ 3379 - file_id?: string; 3380 3380 }; 3381 3381 3382 3382 export type CreateEmbeddingRequest = { 3383 3383 /** 3384 - * The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. 3385 - * 3386 - */ 3387 - dimensions?: number; 3388 - /** 3389 - * The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/). 3390 - */ 3391 - encoding_format?: 'float' | 'base64'; 3392 - /** 3393 3384 * Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. 3394 3385 * 3395 3386 */ ··· 3403 3394 | 'text-embedding-ada-002' 3404 3395 | 'text-embedding-3-small' 3405 3396 | 'text-embedding-3-large'; 3397 + /** 3398 + * The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/). 3399 + */ 3400 + encoding_format?: 'float' | 'base64'; 3401 + /** 3402 + * The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. 3403 + * 3404 + */ 3405 + dimensions?: number; 3406 3406 /** 3407 3407 * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). 3408 3408 * ··· 3446 3446 */ 3447 3447 export type CreateEvalCompletionsRunDataSource = { 3448 3448 /** 3449 + * The type of run data source. Always `completions`. 3450 + */ 3451 + type: 'completions'; 3452 + /** 3449 3453 * Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. 3450 3454 */ 3451 3455 input_messages?: 3452 3456 | { 3453 3457 /** 3458 + * The type of input messages. Always `template`. 3459 + */ 3460 + type: 'template'; 3461 + /** 3454 3462 * A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. 3455 3463 */ 3456 3464 template: Array< ··· 3461 3469 type?: 'EvalItem'; 3462 3470 } & EvalItem) 3463 3471 >; 3464 - /** 3465 - * The type of input messages. Always `template`. 3466 - */ 3467 - type: 'template'; 3468 3472 } 3469 3473 | { 3470 - /** 3471 - * A reference to a variable in the `item` namespace. Ie, "item.input_trajectory" 3472 - */ 3473 - item_reference: string; 3474 3474 /** 3475 3475 * The type of input messages. Always `item_reference`. 3476 3476 */ 3477 3477 type: 'item_reference'; 3478 + /** 3479 + * A reference to a variable in the `item` namespace. Ie, "item.input_trajectory" 3480 + */ 3481 + item_reference: string; 3478 3482 }; 3479 - /** 3480 - * The name of the model to use for generating completions (e.g. "o3-mini"). 3481 - */ 3482 - model?: string; 3483 3483 sampling_params?: { 3484 3484 /** 3485 + * A higher temperature increases randomness in the outputs. 3486 + */ 3487 + temperature?: number; 3488 + /** 3485 3489 * The maximum number of tokens in the generated output. 3486 3490 */ 3487 3491 max_completion_tokens?: number; 3492 + /** 3493 + * An alternative to temperature for nucleus sampling; 1.0 includes all tokens. 3494 + */ 3495 + top_p?: number; 3496 + /** 3497 + * A seed value to initialize the randomness, during sampling. 3498 + */ 3499 + seed?: number; 3488 3500 /** 3489 3501 * An object specifying the format that the model must output. 3490 3502 * ··· 3503 3515 | ResponseFormatJsonSchema 3504 3516 | ResponseFormatJsonObject; 3505 3517 /** 3506 - * A seed value to initialize the randomness, during sampling. 3507 - */ 3508 - seed?: number; 3509 - /** 3510 - * A higher temperature increases randomness in the outputs. 3511 - */ 3512 - temperature?: number; 3513 - /** 3514 3518 * A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. 3515 3519 * 3516 3520 */ 3517 3521 tools?: Array<ChatCompletionTool>; 3518 - /** 3519 - * An alternative to temperature for nucleus sampling; 1.0 includes all tokens. 3520 - */ 3521 - top_p?: number; 3522 3522 }; 3523 + /** 3524 + * The name of the model to use for generating completions (e.g. "o3-mini"). 3525 + */ 3526 + model?: string; 3523 3527 /** 3524 3528 * Determines what populates the `item` namespace in this run's data source. 3525 3529 */ ··· 3533 3537 | ({ 3534 3538 type?: 'EvalStoredCompletionsSource'; 3535 3539 } & EvalStoredCompletionsSource); 3536 - /** 3537 - * The type of run data source. Always `completions`. 3538 - */ 3539 - type: 'completions'; 3540 3540 }; 3541 3541 3542 3542 /** ··· 3550 3550 */ 3551 3551 export type CreateEvalCustomDataSourceConfig = { 3552 3552 /** 3553 - * Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source) 3553 + * The type of data source. Always `custom`. 3554 3554 */ 3555 - include_sample_schema?: boolean; 3555 + type: 'custom'; 3556 3556 /** 3557 3557 * The json schema for each row in the data source. 3558 3558 */ ··· 3560 3560 [key: string]: unknown; 3561 3561 }; 3562 3562 /** 3563 - * The type of data source. Always `custom`. 3563 + * Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source) 3564 3564 */ 3565 - type: 'custom'; 3565 + include_sample_schema?: boolean; 3566 3566 }; 3567 3567 3568 3568 /** ··· 3573 3573 export type CreateEvalItem = 3574 3574 | { 3575 3575 /** 3576 - * The content of the message. 3577 - */ 3578 - content: string; 3579 - /** 3580 3576 * The role of the message (e.g. "system", "assistant", "user"). 3581 3577 */ 3582 3578 role: string; 3579 + /** 3580 + * The content of the message. 3581 + */ 3582 + content: string; 3583 3583 } 3584 3584 | EvalItem; 3585 3585 ··· 3591 3591 */ 3592 3592 export type CreateEvalJsonlRunDataSource = { 3593 3593 /** 3594 + * The type of data source. Always `jsonl`. 3595 + */ 3596 + type: 'jsonl'; 3597 + /** 3594 3598 * Determines what populates the `item` namespace in the data source. 3595 3599 */ 3596 3600 source: ··· 3600 3604 | ({ 3601 3605 type?: 'EvalJsonlFileIdSource'; 3602 3606 } & EvalJsonlFileIdSource); 3603 - /** 3604 - * The type of data source. Always `jsonl`. 3605 - */ 3606 - type: 'jsonl'; 3607 3607 }; 3608 3608 3609 3609 /** ··· 3615 3615 */ 3616 3616 export type CreateEvalLabelModelGrader = { 3617 3617 /** 3618 - * A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. 3618 + * The object type, which is always `label_model`. 3619 3619 */ 3620 - input: Array<CreateEvalItem>; 3620 + type: 'label_model'; 3621 3621 /** 3622 - * The labels to classify to each item in the evaluation. 3622 + * The name of the grader. 3623 3623 */ 3624 - labels: Array<string>; 3624 + name: string; 3625 3625 /** 3626 3626 * The model to use for the evaluation. Must support structured outputs. 3627 3627 */ 3628 3628 model: string; 3629 3629 /** 3630 - * The name of the grader. 3630 + * A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. 3631 3631 */ 3632 - name: string; 3632 + input: Array<CreateEvalItem>; 3633 3633 /** 3634 - * The labels that indicate a passing result. Must be a subset of labels. 3634 + * The labels to classify to each item in the evaluation. 3635 3635 */ 3636 - passing_labels: Array<string>; 3636 + labels: Array<string>; 3637 3637 /** 3638 - * The object type, which is always `label_model`. 3638 + * The labels that indicate a passing result. Must be a subset of labels. 3639 3639 */ 3640 - type: 'label_model'; 3640 + passing_labels: Array<string>; 3641 3641 }; 3642 3642 3643 3643 /** ··· 3649 3649 */ 3650 3650 export type CreateEvalLogsDataSourceConfig = { 3651 3651 /** 3652 + * The type of data source. Always `logs`. 3653 + */ 3654 + type: 'logs'; 3655 + /** 3652 3656 * Metadata filters for the logs data source. 3653 3657 */ 3654 3658 metadata?: { 3655 3659 [key: string]: unknown; 3656 3660 }; 3657 - /** 3658 - * The type of data source. Always `logs`. 3659 - */ 3660 - type: 'logs'; 3661 3661 }; 3662 3662 3663 3663 /** ··· 3665 3665 */ 3666 3666 export type CreateEvalRequest = { 3667 3667 /** 3668 + * The name of the evaluation. 3669 + */ 3670 + name?: string; 3671 + metadata?: Metadata; 3672 + /** 3668 3673 * The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. 3669 3674 */ 3670 3675 data_source_config: ··· 3677 3682 | ({ 3678 3683 type?: 'CreateEvalStoredCompletionsDataSourceConfig'; 3679 3684 } & CreateEvalStoredCompletionsDataSourceConfig); 3680 - metadata?: Metadata; 3681 - /** 3682 - * The name of the evaluation. 3683 - */ 3684 - name?: string; 3685 3685 /** 3686 3686 * A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`). 3687 3687 */ ··· 3712 3712 */ 3713 3713 export type CreateEvalResponsesRunDataSource = { 3714 3714 /** 3715 + * The type of run data source. Always `responses`. 3716 + */ 3717 + type: 'responses'; 3718 + /** 3715 3719 * Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. 3716 3720 */ 3717 3721 input_messages?: 3718 3722 | { 3719 3723 /** 3724 + * The type of input messages. Always `template`. 3725 + */ 3726 + type: 'template'; 3727 + /** 3720 3728 * A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. 3721 3729 */ 3722 3730 template: Array< 3723 3731 | { 3724 3732 /** 3725 - * The content of the message. 3726 - */ 3727 - content: string; 3728 - /** 3729 3733 * The role of the message (e.g. "system", "assistant", "user"). 3730 3734 */ 3731 3735 role: string; 3736 + /** 3737 + * The content of the message. 3738 + */ 3739 + content: string; 3732 3740 } 3733 3741 | EvalItem 3734 3742 >; 3743 + } 3744 + | { 3735 3745 /** 3736 - * The type of input messages. Always `template`. 3746 + * The type of input messages. Always `item_reference`. 3737 3747 */ 3738 - type: 'template'; 3739 - } 3740 - | { 3748 + type: 'item_reference'; 3741 3749 /** 3742 3750 * A reference to a variable in the `item` namespace. Ie, "item.name" 3743 3751 */ 3744 3752 item_reference: string; 3745 - /** 3746 - * The type of input messages. Always `item_reference`. 3747 - */ 3748 - type: 'item_reference'; 3749 3753 }; 3750 - /** 3751 - * The name of the model to use for generating completions (e.g. "o3-mini"). 3752 - */ 3753 - model?: string; 3754 3754 sampling_params?: { 3755 3755 /** 3756 + * A higher temperature increases randomness in the outputs. 3757 + */ 3758 + temperature?: number; 3759 + /** 3756 3760 * The maximum number of tokens in the generated output. 3757 3761 */ 3758 3762 max_completion_tokens?: number; 3759 3763 /** 3764 + * An alternative to temperature for nucleus sampling; 1.0 includes all tokens. 3765 + */ 3766 + top_p?: number; 3767 + /** 3760 3768 * A seed value to initialize the randomness, during sampling. 3761 3769 */ 3762 3770 seed?: number; 3763 3771 /** 3764 - * A higher temperature increases randomness in the outputs. 3765 - */ 3766 - temperature?: number; 3767 - /** 3768 - * Configuration options for a text response from the model. Can be plain 3769 - * text or structured JSON data. Learn more: 3770 - * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) 3771 - * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) 3772 - * 3773 - */ 3774 - text?: { 3775 - format?: TextResponseFormatConfiguration; 3776 - }; 3777 - /** 3778 3772 * An array of tools the model may call while generating a response. You 3779 3773 * can specify which tool to use by setting the `tool_choice` parameter. 3780 3774 * ··· 3791 3785 */ 3792 3786 tools?: Array<Tool>; 3793 3787 /** 3794 - * An alternative to temperature for nucleus sampling; 1.0 includes all tokens. 3788 + * Configuration options for a text response from the model. Can be plain 3789 + * text or structured JSON data. Learn more: 3790 + * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) 3791 + * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) 3792 + * 3795 3793 */ 3796 - top_p?: number; 3794 + text?: { 3795 + format?: TextResponseFormatConfiguration; 3796 + }; 3797 3797 }; 3798 + /** 3799 + * The name of the model to use for generating completions (e.g. "o3-mini"). 3800 + */ 3801 + model?: string; 3798 3802 /** 3799 3803 * Determines what populates the `item` namespace in this run's data source. 3800 3804 */ ··· 3808 3812 | ({ 3809 3813 type?: 'EvalResponsesSource'; 3810 3814 } & EvalResponsesSource); 3811 - /** 3812 - * The type of run data source. Always `responses`. 3813 - */ 3814 - type: 'responses'; 3815 3815 }; 3816 3816 3817 3817 /** ··· 3819 3819 */ 3820 3820 export type CreateEvalRunRequest = { 3821 3821 /** 3822 + * The name of the run. 3823 + */ 3824 + name?: string; 3825 + metadata?: Metadata; 3826 + /** 3822 3827 * Details about the run's data source. 3823 3828 */ 3824 3829 data_source: 3825 3830 | CreateEvalJsonlRunDataSource 3826 3831 | CreateEvalCompletionsRunDataSource 3827 3832 | CreateEvalResponsesRunDataSource; 3828 - metadata?: Metadata; 3829 - /** 3830 - * The name of the run. 3831 - */ 3832 - name?: string; 3833 3833 }; 3834 3834 3835 3835 /** ··· 3842 3842 */ 3843 3843 export type CreateEvalStoredCompletionsDataSourceConfig = { 3844 3844 /** 3845 + * The type of data source. Always `stored_completions`. 3846 + */ 3847 + type: 'stored_completions'; 3848 + /** 3845 3849 * Metadata filters for the stored completions data source. 3846 3850 */ 3847 3851 metadata?: { 3848 3852 [key: string]: unknown; 3849 3853 }; 3850 - /** 3851 - * The type of data source. Always `stored_completions`. 3852 - */ 3853 - type: 'stored_completions'; 3854 3854 }; 3855 3855 3856 3856 export type CreateFileRequest = { 3857 - expires_after?: FileExpirationAfter; 3858 3857 /** 3859 3858 * The File object (not file name) to be uploaded. 3860 3859 * 3861 3860 */ 3862 3861 file: Blob | File; 3863 3862 purpose: FilePurpose; 3863 + expires_after?: FileExpirationAfter; 3864 3864 }; 3865 3865 3866 3866 export type CreateFineTuningCheckpointPermissionRequest = { ··· 3872 3872 3873 3873 export type CreateFineTuningJobRequest = { 3874 3874 /** 3875 + * The name of the model to fine-tune. You can select one of the 3876 + * [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). 3877 + * 3878 + */ 3879 + model: 3880 + | string 3881 + | 'babbage-002' 3882 + | 'davinci-002' 3883 + | 'gpt-3.5-turbo' 3884 + | 'gpt-4o-mini'; 3885 + /** 3886 + * The ID of an uploaded file that contains training data. 3887 + * 3888 + * See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file. 3889 + * 3890 + * Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. 3891 + * 3892 + * The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format. 3893 + * 3894 + * See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details. 3895 + * 3896 + */ 3897 + training_file: string; 3898 + /** 3875 3899 * The hyperparameters used for the fine-tuning job. 3876 3900 * This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter. 3877 3901 * ··· 3899 3923 n_epochs?: 'auto' | number; 3900 3924 }; 3901 3925 /** 3926 + * A string of up to 64 characters that will be added to your fine-tuned model name. 3927 + * 3928 + * For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. 3929 + * 3930 + */ 3931 + suffix?: string; 3932 + /** 3933 + * The ID of an uploaded file that contains validation data. 3934 + * 3935 + * If you provide this file, the data is used to generate validation 3936 + * metrics periodically during fine-tuning. These metrics can be viewed in 3937 + * the fine-tuning results file. 3938 + * The same data should not be present in both train and validation files. 3939 + * 3940 + * Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`. 3941 + * 3942 + * See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details. 3943 + * 3944 + */ 3945 + validation_file?: string; 3946 + /** 3902 3947 * A list of integrations to enable for your fine-tuning job. 3903 3948 */ 3904 3949 integrations?: Array<{ ··· 3915 3960 */ 3916 3961 wandb: { 3917 3962 /** 3918 - * The entity to use for the run. This allows you to set the team or username of the WandB user that you would 3919 - * like associated with the run. If not set, the default entity for the registered WandB API key is used. 3963 + * The name of the project that the new run will be created under. 3920 3964 * 3921 3965 */ 3922 - entity?: string; 3966 + project: string; 3923 3967 /** 3924 3968 * A display name to set for the run. If not set, we will use the Job ID as the name. 3925 3969 * 3926 3970 */ 3927 3971 name?: string; 3928 3972 /** 3929 - * The name of the project that the new run will be created under. 3973 + * The entity to use for the run. This allows you to set the team or username of the WandB user that you would 3974 + * like associated with the run. If not set, the default entity for the registered WandB API key is used. 3930 3975 * 3931 3976 */ 3932 - project: string; 3977 + entity?: string; 3933 3978 /** 3934 3979 * A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some 3935 3980 * default tags are generated by OpenAI: "openai/finetune", "openai/{base-model}", "openai/{ftjob-abcdef}". ··· 3938 3983 tags?: Array<string>; 3939 3984 }; 3940 3985 }>; 3941 - metadata?: Metadata; 3942 - method?: FineTuneMethod; 3943 - /** 3944 - * The name of the model to fine-tune. You can select one of the 3945 - * [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). 3946 - * 3947 - */ 3948 - model: 3949 - | string 3950 - | 'babbage-002' 3951 - | 'davinci-002' 3952 - | 'gpt-3.5-turbo' 3953 - | 'gpt-4o-mini'; 3954 3986 /** 3955 3987 * The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. 3956 3988 * If a seed is not specified, one will be generated for you. 3957 3989 * 3958 3990 */ 3959 3991 seed?: number; 3992 + method?: FineTuneMethod; 3993 + metadata?: Metadata; 3994 + }; 3995 + 3996 + export type CreateImageEditRequest = { 3960 3997 /** 3961 - * A string of up to 64 characters that will be added to your fine-tuned model name. 3998 + * The image(s) to edit. Must be a supported image file or an array of images. 3962 3999 * 3963 - * For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. 4000 + * For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less 4001 + * than 50MB. You can provide up to 16 images. 4002 + * 4003 + * For `dall-e-2`, you can only provide one image, and it should be a square 4004 + * `png` file less than 4MB. 3964 4005 * 3965 4006 */ 3966 - suffix?: string; 4007 + image: Blob | File | Array<Blob | File>; 3967 4008 /** 3968 - * The ID of an uploaded file that contains training data. 3969 - * 3970 - * See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file. 3971 - * 3972 - * Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. 3973 - * 3974 - * The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format. 3975 - * 3976 - * See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details. 3977 - * 4009 + * A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for `gpt-image-1`. 3978 4010 */ 3979 - training_file: string; 4011 + prompt: string; 3980 4012 /** 3981 - * The ID of an uploaded file that contains validation data. 3982 - * 3983 - * If you provide this file, the data is used to generate validation 3984 - * metrics periodically during fine-tuning. These metrics can be viewed in 3985 - * the fine-tuning results file. 3986 - * The same data should not be present in both train and validation files. 3987 - * 3988 - * Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`. 3989 - * 3990 - * See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details. 3991 - * 4013 + * An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. 3992 4014 */ 3993 - validation_file?: string; 3994 - }; 3995 - 3996 - export type CreateImageEditRequest = { 4015 + mask?: Blob | File; 3997 4016 /** 3998 4017 * Allows to set transparency for the background of the generated image(s). 3999 4018 * This parameter is only supported for `gpt-image-1`. Must be one of ··· 4006 4025 */ 4007 4026 background?: 'transparent' | 'opaque' | 'auto'; 4008 4027 /** 4009 - * The image(s) to edit. Must be a supported image file or an array of images. 4010 - * 4011 - * For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less 4012 - * than 50MB. You can provide up to 16 images. 4013 - * 4014 - * For `dall-e-2`, you can only provide one image, and it should be a square 4015 - * `png` file less than 4MB. 4016 - * 4017 - */ 4018 - image: Blob | File | Array<Blob | File>; 4019 - input_fidelity?: ImageInputFidelity; 4020 - /** 4021 - * An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. 4022 - */ 4023 - mask?: Blob | File; 4024 - /** 4025 4028 * The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. 4026 4029 */ 4027 4030 model?: string | 'dall-e-2' | 'gpt-image-1'; ··· 4030 4033 */ 4031 4034 n?: number; 4032 4035 /** 4033 - * The compression level (0-100%) for the generated images. This parameter 4034 - * is only supported for `gpt-image-1` with the `webp` or `jpeg` output 4035 - * formats, and defaults to 100. 4036 - * 4036 + * The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. 4037 4037 */ 4038 - output_compression?: number; 4038 + size?: 4039 + | '256x256' 4040 + | '512x512' 4041 + | '1024x1024' 4042 + | '1536x1024' 4043 + | '1024x1536' 4044 + | 'auto'; 4045 + /** 4046 + * The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images. 4047 + */ 4048 + response_format?: 'url' | 'b64_json'; 4039 4049 /** 4040 4050 * The format in which the generated images are returned. This parameter is 4041 4051 * only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. ··· 4043 4053 * 4044 4054 */ 4045 4055 output_format?: 'png' | 'jpeg' | 'webp'; 4046 - partial_images?: PartialImages; 4047 4056 /** 4048 - * A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for `gpt-image-1`. 4057 + * The compression level (0-100%) for the generated images. This parameter 4058 + * is only supported for `gpt-image-1` with the `webp` or `jpeg` output 4059 + * formats, and defaults to 100. 4060 + * 4049 4061 */ 4050 - prompt: string; 4062 + output_compression?: number; 4051 4063 /** 4052 - * The quality of the image that will be generated. `high`, `medium` and `low` are only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`. 4064 + * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). 4053 4065 * 4054 4066 */ 4055 - quality?: 'standard' | 'low' | 'medium' | 'high' | 'auto'; 4056 - /** 4057 - * The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images. 4058 - */ 4059 - response_format?: 'url' | 'b64_json'; 4060 - /** 4061 - * The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. 4062 - */ 4063 - size?: 4064 - | '256x256' 4065 - | '512x512' 4066 - | '1024x1024' 4067 - | '1536x1024' 4068 - | '1024x1536' 4069 - | 'auto'; 4067 + user?: string; 4068 + input_fidelity?: ImageInputFidelity; 4070 4069 /** 4071 4070 * Edit the image in streaming mode. Defaults to `false`. See the 4072 4071 * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information. 4073 4072 * 4074 4073 */ 4075 4074 stream?: boolean; 4075 + partial_images?: PartialImages; 4076 4076 /** 4077 - * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). 4077 + * The quality of the image that will be generated. `high`, `medium` and `low` are only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`. 4078 4078 * 4079 4079 */ 4080 - user?: string; 4080 + quality?: 'standard' | 'low' | 'medium' | 'high' | 'auto'; 4081 4081 }; 4082 4082 4083 4083 export type CreateImageRequest = { 4084 4084 /** 4085 - * Allows to set transparency for the background of the generated image(s). 4086 - * This parameter is only supported for `gpt-image-1`. Must be one of 4087 - * `transparent`, `opaque` or `auto` (default value). When `auto` is used, the 4088 - * model will automatically determine the best background for the image. 4089 - * 4090 - * If `transparent`, the output format needs to support transparency, so it 4091 - * should be set to either `png` (default value) or `webp`. 4092 - * 4085 + * A text description of the desired image(s). The maximum length is 32000 characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. 4093 4086 */ 4094 - background?: 'transparent' | 'opaque' | 'auto'; 4087 + prompt: string; 4095 4088 /** 4096 4089 * The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. 4097 4090 */ 4098 4091 model?: string | 'dall-e-2' | 'dall-e-3' | 'gpt-image-1'; 4099 - /** 4100 - * Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` for less restrictive filtering or `auto` (default value). 4101 - */ 4102 - moderation?: 'low' | 'auto'; 4103 4092 /** 4104 4093 * The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. 4105 4094 */ 4106 4095 n?: number; 4107 4096 /** 4108 - * The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100. 4109 - */ 4110 - output_compression?: number; 4111 - /** 4112 - * The format in which the generated images are returned. This parameter is only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. 4113 - */ 4114 - output_format?: 'png' | 'jpeg' | 'webp'; 4115 - partial_images?: PartialImages; 4116 - /** 4117 - * A text description of the desired image(s). The maximum length is 32000 characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. 4118 - */ 4119 - prompt: string; 4120 - /** 4121 4097 * The quality of the image that will be generated. 4122 4098 * 4123 4099 * - `auto` (default value) will automatically select the best quality for the given model. ··· 4132 4108 */ 4133 4109 response_format?: 'url' | 'b64_json'; 4134 4110 /** 4111 + * The format in which the generated images are returned. This parameter is only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. 4112 + */ 4113 + output_format?: 'png' | 'jpeg' | 'webp'; 4114 + /** 4115 + * The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100. 4116 + */ 4117 + output_compression?: number; 4118 + /** 4119 + * Generate the image in streaming mode. Defaults to `false`. See the 4120 + * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information. 4121 + * This parameter is only supported for `gpt-image-1`. 4122 + * 4123 + */ 4124 + stream?: boolean; 4125 + partial_images?: PartialImages; 4126 + /** 4135 4127 * The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`. 4136 4128 */ 4137 4129 size?: ··· 4144 4136 | '1792x1024' 4145 4137 | '1024x1792'; 4146 4138 /** 4147 - * Generate the image in streaming mode. Defaults to `false`. See the 4148 - * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information. 4149 - * This parameter is only supported for `gpt-image-1`. 4139 + * Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` for less restrictive filtering or `auto` (default value). 4140 + */ 4141 + moderation?: 'low' | 'auto'; 4142 + /** 4143 + * Allows to set transparency for the background of the generated image(s). 4144 + * This parameter is only supported for `gpt-image-1`. Must be one of 4145 + * `transparent`, `opaque` or `auto` (default value). When `auto` is used, the 4146 + * model will automatically determine the best background for the image. 4147 + * 4148 + * If `transparent`, the output format needs to support transparency, so it 4149 + * should be set to either `png` (default value) or `webp`. 4150 4150 * 4151 4151 */ 4152 - stream?: boolean; 4152 + background?: 'transparent' | 'opaque' | 'auto'; 4153 4153 /** 4154 4154 * The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. 4155 4155 */ ··· 4191 4191 4192 4192 export type CreateMessageRequest = { 4193 4193 /** 4194 + * The role of the entity that is creating the message. Allowed values include: 4195 + * - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages. 4196 + * - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. 4197 + * 4198 + */ 4199 + role: 'user' | 'assistant'; 4200 + content: 4201 + | string 4202 + | Array< 4203 + | ({ 4204 + type?: 'MessageContentImageFileObject'; 4205 + } & MessageContentImageFileObject) 4206 + | ({ 4207 + type?: 'MessageContentImageUrlObject'; 4208 + } & MessageContentImageUrlObject) 4209 + | ({ 4210 + type?: 'MessageRequestContentTextObject'; 4211 + } & MessageRequestContentTextObject) 4212 + >; 4213 + /** 4194 4214 * A list of files attached to the message, and the tools they should be added to. 4195 4215 */ 4196 4216 attachments?: Array<{ ··· 4210 4230 } & AssistantToolsFileSearchTypeOnly) 4211 4231 >; 4212 4232 }>; 4213 - content: 4214 - | string 4215 - | Array< 4216 - | ({ 4217 - type?: 'MessageContentImageFileObject'; 4218 - } & MessageContentImageFileObject) 4219 - | ({ 4220 - type?: 'MessageContentImageUrlObject'; 4221 - } & MessageContentImageUrlObject) 4222 - | ({ 4223 - type?: 'MessageRequestContentTextObject'; 4224 - } & MessageRequestContentTextObject) 4225 - >; 4226 4233 metadata?: Metadata; 4227 - /** 4228 - * The role of the entity that is creating the message. Allowed values include: 4229 - * - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages. 4230 - * - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. 4231 - * 4232 - */ 4233 - role: 'user' | 'assistant'; 4234 4234 }; 4235 4235 4236 4236 export type CreateModelResponseProperties = ModelResponseProperties & { ··· 4290 4290 */ 4291 4291 results: Array<{ 4292 4292 /** 4293 + * Whether any of the below categories are flagged. 4294 + */ 4295 + flagged: boolean; 4296 + /** 4293 4297 * A list of the categories, and whether they are flagged or not. 4294 4298 */ 4295 4299 categories: { 4296 4300 /** 4301 + * Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment. 4302 + */ 4303 + hate: boolean; 4304 + /** 4305 + * Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. 4306 + */ 4307 + 'hate/threatening': boolean; 4308 + /** 4297 4309 * Content that expresses, incites, or promotes harassing language towards any target. 4298 4310 */ 4299 4311 harassment: boolean; ··· 4302 4314 */ 4303 4315 'harassment/threatening': boolean; 4304 4316 /** 4305 - * Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment. 4306 - */ 4307 - hate: boolean; 4308 - /** 4309 - * Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. 4310 - */ 4311 - 'hate/threatening': boolean; 4312 - /** 4313 4317 * Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, "how to shoplift" would fit this category. 4314 4318 */ 4315 4319 illicit: boolean; ··· 4322 4326 */ 4323 4327 'self-harm': boolean; 4324 4328 /** 4325 - * Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. 4326 - */ 4327 - 'self-harm/instructions': boolean; 4328 - /** 4329 4329 * Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders. 4330 4330 */ 4331 4331 'self-harm/intent': boolean; 4332 + /** 4333 + * Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. 4334 + */ 4335 + 'self-harm/instructions': boolean; 4332 4336 /** 4333 4337 * Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness). 4334 4338 */ ··· 4347 4351 'violence/graphic': boolean; 4348 4352 }; 4349 4353 /** 4350 - * A list of the categories along with the input type(s) that the score applies to. 4354 + * A list of the categories along with their scores as predicted by model. 4351 4355 */ 4352 - category_applied_input_types: { 4356 + category_scores: { 4353 4357 /** 4354 - * The applied input type(s) for the category 'harassment'. 4358 + * The score for the category 'hate'. 4355 4359 */ 4356 - harassment: Array<'text'>; 4360 + hate: number; 4357 4361 /** 4358 - * The applied input type(s) for the category 'harassment/threatening'. 4362 + * The score for the category 'hate/threatening'. 4359 4363 */ 4360 - 'harassment/threatening': Array<'text'>; 4364 + 'hate/threatening': number; 4361 4365 /** 4362 - * The applied input type(s) for the category 'hate'. 4366 + * The score for the category 'harassment'. 4363 4367 */ 4364 - hate: Array<'text'>; 4368 + harassment: number; 4365 4369 /** 4366 - * The applied input type(s) for the category 'hate/threatening'. 4370 + * The score for the category 'harassment/threatening'. 4367 4371 */ 4368 - 'hate/threatening': Array<'text'>; 4372 + 'harassment/threatening': number; 4369 4373 /** 4370 - * The applied input type(s) for the category 'illicit'. 4374 + * The score for the category 'illicit'. 4371 4375 */ 4372 - illicit: Array<'text'>; 4376 + illicit: number; 4373 4377 /** 4374 - * The applied input type(s) for the category 'illicit/violent'. 4378 + * The score for the category 'illicit/violent'. 4375 4379 */ 4376 - 'illicit/violent': Array<'text'>; 4380 + 'illicit/violent': number; 4377 4381 /** 4378 - * The applied input type(s) for the category 'self-harm'. 4382 + * The score for the category 'self-harm'. 4379 4383 */ 4380 - 'self-harm': Array<'text' | 'image'>; 4384 + 'self-harm': number; 4381 4385 /** 4382 - * The applied input type(s) for the category 'self-harm/instructions'. 4386 + * The score for the category 'self-harm/intent'. 4383 4387 */ 4384 - 'self-harm/instructions': Array<'text' | 'image'>; 4388 + 'self-harm/intent': number; 4385 4389 /** 4386 - * The applied input type(s) for the category 'self-harm/intent'. 4390 + * The score for the category 'self-harm/instructions'. 4387 4391 */ 4388 - 'self-harm/intent': Array<'text' | 'image'>; 4392 + 'self-harm/instructions': number; 4389 4393 /** 4390 - * The applied input type(s) for the category 'sexual'. 4394 + * The score for the category 'sexual'. 4391 4395 */ 4392 - sexual: Array<'text' | 'image'>; 4396 + sexual: number; 4393 4397 /** 4394 - * The applied input type(s) for the category 'sexual/minors'. 4398 + * The score for the category 'sexual/minors'. 4395 4399 */ 4396 - 'sexual/minors': Array<'text'>; 4400 + 'sexual/minors': number; 4397 4401 /** 4398 - * The applied input type(s) for the category 'violence'. 4402 + * The score for the category 'violence'. 4399 4403 */ 4400 - violence: Array<'text' | 'image'>; 4404 + violence: number; 4401 4405 /** 4402 - * The applied input type(s) for the category 'violence/graphic'. 4406 + * The score for the category 'violence/graphic'. 4403 4407 */ 4404 - 'violence/graphic': Array<'text' | 'image'>; 4408 + 'violence/graphic': number; 4405 4409 }; 4406 4410 /** 4407 - * A list of the categories along with their scores as predicted by model. 4411 + * A list of the categories along with the input type(s) that the score applies to. 4408 4412 */ 4409 - category_scores: { 4413 + category_applied_input_types: { 4410 4414 /** 4411 - * The score for the category 'harassment'. 4415 + * The applied input type(s) for the category 'hate'. 4412 4416 */ 4413 - harassment: number; 4417 + hate: Array<'text'>; 4414 4418 /** 4415 - * The score for the category 'harassment/threatening'. 4419 + * The applied input type(s) for the category 'hate/threatening'. 4416 4420 */ 4417 - 'harassment/threatening': number; 4421 + 'hate/threatening': Array<'text'>; 4418 4422 /** 4419 - * The score for the category 'hate'. 4423 + * The applied input type(s) for the category 'harassment'. 4420 4424 */ 4421 - hate: number; 4425 + harassment: Array<'text'>; 4422 4426 /** 4423 - * The score for the category 'hate/threatening'. 4427 + * The applied input type(s) for the category 'harassment/threatening'. 4424 4428 */ 4425 - 'hate/threatening': number; 4429 + 'harassment/threatening': Array<'text'>; 4426 4430 /** 4427 - * The score for the category 'illicit'. 4431 + * The applied input type(s) for the category 'illicit'. 4428 4432 */ 4429 - illicit: number; 4433 + illicit: Array<'text'>; 4430 4434 /** 4431 - * The score for the category 'illicit/violent'. 4435 + * The applied input type(s) for the category 'illicit/violent'. 4432 4436 */ 4433 - 'illicit/violent': number; 4437 + 'illicit/violent': Array<'text'>; 4434 4438 /** 4435 - * The score for the category 'self-harm'. 4439 + * The applied input type(s) for the category 'self-harm'. 4436 4440 */ 4437 - 'self-harm': number; 4441 + 'self-harm': Array<'text' | 'image'>; 4438 4442 /** 4439 - * The score for the category 'self-harm/instructions'. 4443 + * The applied input type(s) for the category 'self-harm/intent'. 4440 4444 */ 4441 - 'self-harm/instructions': number; 4445 + 'self-harm/intent': Array<'text' | 'image'>; 4442 4446 /** 4443 - * The score for the category 'self-harm/intent'. 4447 + * The applied input type(s) for the category 'self-harm/instructions'. 4444 4448 */ 4445 - 'self-harm/intent': number; 4449 + 'self-harm/instructions': Array<'text' | 'image'>; 4446 4450 /** 4447 - * The score for the category 'sexual'. 4451 + * The applied input type(s) for the category 'sexual'. 4448 4452 */ 4449 - sexual: number; 4453 + sexual: Array<'text' | 'image'>; 4450 4454 /** 4451 - * The score for the category 'sexual/minors'. 4455 + * The applied input type(s) for the category 'sexual/minors'. 4452 4456 */ 4453 - 'sexual/minors': number; 4457 + 'sexual/minors': Array<'text'>; 4454 4458 /** 4455 - * The score for the category 'violence'. 4459 + * The applied input type(s) for the category 'violence'. 4456 4460 */ 4457 - violence: number; 4461 + violence: Array<'text' | 'image'>; 4458 4462 /** 4459 - * The score for the category 'violence/graphic'. 4463 + * The applied input type(s) for the category 'violence/graphic'. 4460 4464 */ 4461 - 'violence/graphic': number; 4465 + 'violence/graphic': Array<'text' | 'image'>; 4462 4466 }; 4463 - /** 4464 - * Whether any of the below categories are flagged. 4465 - */ 4466 - flagged: boolean; 4467 4467 }>; 4468 4468 }; 4469 4469 4470 4470 export type CreateResponse = CreateModelResponseProperties & 4471 4471 ResponseProperties & { 4472 + /** 4473 + * Text, image, or file inputs to the model, used to generate a response. 4474 + * 4475 + * Learn more: 4476 + * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) 4477 + * - [Image inputs](https://platform.openai.com/docs/guides/images) 4478 + * - [File inputs](https://platform.openai.com/docs/guides/pdf-files) 4479 + * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) 4480 + * - [Function calling](https://platform.openai.com/docs/guides/function-calling) 4481 + * 4482 + */ 4483 + input?: string | Array<InputItem>; 4472 4484 /** 4473 4485 * Specify additional output data to include in the model response. Currently 4474 4486 * supported values are: ··· 4488 4500 */ 4489 4501 include?: Array<Includable>; 4490 4502 /** 4491 - * Text, image, or file inputs to the model, used to generate a response. 4503 + * Whether to allow the model to run tool calls in parallel. 4492 4504 * 4493 - * Learn more: 4494 - * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) 4495 - * - [Image inputs](https://platform.openai.com/docs/guides/images) 4496 - * - [File inputs](https://platform.openai.com/docs/guides/pdf-files) 4497 - * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) 4498 - * - [Function calling](https://platform.openai.com/docs/guides/function-calling) 4505 + */ 4506 + parallel_tool_calls?: boolean; 4507 + /** 4508 + * Whether to store the generated model response for later retrieval via 4509 + * API. 4499 4510 * 4500 4511 */ 4501 - input?: string | Array<InputItem>; 4512 + store?: boolean; 4502 4513 /** 4503 4514 * A system (or developer) message inserted into the model's context. 4504 4515 * ··· 4509 4520 */ 4510 4521 instructions?: string; 4511 4522 /** 4512 - * Whether to allow the model to run tool calls in parallel. 4513 - * 4514 - */ 4515 - parallel_tool_calls?: boolean; 4516 - /** 4517 - * Whether to store the generated model response for later retrieval via 4518 - * API. 4519 - * 4520 - */ 4521 - store?: boolean; 4522 - /** 4523 4523 * If set to true, the model response data will be streamed to the client 4524 4524 * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). 4525 4525 * See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) ··· 4532 4532 4533 4533 export type CreateRunRequest = { 4534 4534 /** 4535 + * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. 4536 + */ 4537 + assistant_id: string; 4538 + /** 4539 + * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. 4540 + */ 4541 + model?: string | AssistantSupportedModels; 4542 + reasoning_effort?: ReasoningEffort; 4543 + /** 4544 + * Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. 4545 + */ 4546 + instructions?: string; 4547 + /** 4535 4548 * Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. 4536 4549 */ 4537 4550 additional_instructions?: string; ··· 4540 4553 */ 4541 4554 additional_messages?: Array<CreateMessageRequest>; 4542 4555 /** 4543 - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. 4544 - */ 4545 - assistant_id: string; 4546 - /** 4547 - * Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. 4556 + * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. 4548 4557 */ 4549 - instructions?: string; 4558 + tools?: Array<AssistantTool>; 4559 + metadata?: Metadata; 4550 4560 /** 4551 - * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 4561 + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 4552 4562 * 4553 4563 */ 4554 - max_completion_tokens?: number; 4564 + temperature?: number; 4555 4565 /** 4556 - * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 4566 + * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. 4567 + * 4568 + * We generally recommend altering this or temperature but not both. 4557 4569 * 4558 4570 */ 4559 - max_prompt_tokens?: number; 4560 - metadata?: Metadata; 4561 - /** 4562 - * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. 4563 - */ 4564 - model?: string | AssistantSupportedModels; 4565 - parallel_tool_calls?: ParallelToolCalls; 4566 - reasoning_effort?: ReasoningEffort; 4567 - response_format?: AssistantsApiResponseFormatOption; 4571 + top_p?: number; 4568 4572 /** 4569 4573 * If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. 4570 4574 * 4571 4575 */ 4572 4576 stream?: boolean; 4573 4577 /** 4574 - * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 4578 + * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 4575 4579 * 4576 4580 */ 4577 - temperature?: number; 4578 - tool_choice?: AssistantsApiToolChoiceOption & unknown; 4579 - /** 4580 - * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. 4581 - */ 4582 - tools?: Array<AssistantTool>; 4581 + max_prompt_tokens?: number; 4583 4582 /** 4584 - * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. 4585 - * 4586 - * We generally recommend altering this or temperature but not both. 4583 + * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 4587 4584 * 4588 4585 */ 4589 - top_p?: number; 4586 + max_completion_tokens?: number; 4590 4587 truncation_strategy?: TruncationObject & unknown; 4588 + tool_choice?: AssistantsApiToolChoiceOption & unknown; 4589 + parallel_tool_calls?: ParallelToolCalls; 4590 + response_format?: AssistantsApiResponseFormatOption; 4591 4591 }; 4592 4592 4593 4593 export type CreateSpeechRequest = { 4594 4594 /** 4595 + * One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`. 4596 + * 4597 + */ 4598 + model: string | 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts'; 4599 + /** 4595 4600 * The text to generate audio for. The maximum length is 4096 characters. 4596 4601 */ 4597 4602 input: string; ··· 4600 4605 */ 4601 4606 instructions?: string; 4602 4607 /** 4603 - * One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`. 4604 - * 4608 + * The voice to use when generating the audio. Supported voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`. Previews of the voices are available in the [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). 4605 4609 */ 4606 - model: string | 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts'; 4610 + voice: VoiceIdsShared; 4607 4611 /** 4608 4612 * The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. 4609 4613 */ ··· 4616 4620 * The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`. 4617 4621 */ 4618 4622 stream_format?: 'sse' | 'audio'; 4619 - /** 4620 - * The voice to use when generating the audio. Supported voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`. Previews of the voices are available in the [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). 4621 - */ 4622 - voice: VoiceIdsShared; 4623 4623 }; 4624 4624 4625 4625 export type CreateSpeechResponseStreamEvent = ··· 4635 4635 * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. 4636 4636 */ 4637 4637 assistant_id: string; 4638 - /** 4639 - * Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. 4640 - */ 4641 - instructions?: string; 4642 - /** 4643 - * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 4644 - * 4645 - */ 4646 - max_completion_tokens?: number; 4647 - /** 4648 - * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 4649 - * 4650 - */ 4651 - max_prompt_tokens?: number; 4652 - metadata?: Metadata; 4638 + thread?: CreateThreadRequest; 4653 4639 /** 4654 4640 * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. 4655 4641 */ ··· 4693 4679 | 'gpt-3.5-turbo-1106' 4694 4680 | 'gpt-3.5-turbo-0125' 4695 4681 | 'gpt-3.5-turbo-16k-0613'; 4696 - parallel_tool_calls?: ParallelToolCalls; 4697 - response_format?: AssistantsApiResponseFormatOption; 4698 4682 /** 4699 - * If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. 4700 - * 4683 + * Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. 4701 4684 */ 4702 - stream?: boolean; 4685 + instructions?: string; 4703 4686 /** 4704 - * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 4705 - * 4687 + * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. 4706 4688 */ 4707 - temperature?: number; 4708 - thread?: CreateThreadRequest; 4709 - tool_choice?: AssistantsApiToolChoiceOption & unknown; 4689 + tools?: Array<AssistantTool>; 4710 4690 /** 4711 4691 * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. 4712 4692 * ··· 4727 4707 vector_store_ids?: Array<string>; 4728 4708 }; 4729 4709 }; 4710 + metadata?: Metadata; 4730 4711 /** 4731 - * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. 4712 + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 4713 + * 4732 4714 */ 4733 - tools?: Array<AssistantTool>; 4715 + temperature?: number; 4734 4716 /** 4735 4717 * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. 4736 4718 * ··· 4738 4720 * 4739 4721 */ 4740 4722 top_p?: number; 4723 + /** 4724 + * If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. 4725 + * 4726 + */ 4727 + stream?: boolean; 4728 + /** 4729 + * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 4730 + * 4731 + */ 4732 + max_prompt_tokens?: number; 4733 + /** 4734 + * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 4735 + * 4736 + */ 4737 + max_completion_tokens?: number; 4741 4738 truncation_strategy?: TruncationObject & unknown; 4739 + tool_choice?: AssistantsApiToolChoiceOption & unknown; 4740 + parallel_tool_calls?: ParallelToolCalls; 4741 + response_format?: AssistantsApiResponseFormatOption; 4742 4742 }; 4743 4743 4744 4744 /** ··· 4751 4751 * A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. 4752 4752 */ 4753 4753 messages?: Array<CreateMessageRequest>; 4754 - metadata?: Metadata; 4755 4754 /** 4756 4755 * A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. 4757 4756 * ··· 4776 4775 */ 4777 4776 vector_stores?: Array<{ 4778 4777 /** 4778 + * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. 4779 + * 4780 + */ 4781 + file_ids?: Array<string>; 4782 + /** 4779 4783 * The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. 4780 4784 */ 4781 4785 chunking_strategy?: ··· 4786 4790 type: 'auto'; 4787 4791 } 4788 4792 | { 4793 + /** 4794 + * Always `static`. 4795 + */ 4796 + type: 'static'; 4789 4797 static: { 4790 4798 /** 4799 + * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. 4800 + */ 4801 + max_chunk_size_tokens: number; 4802 + /** 4791 4803 * The number of tokens that overlap between chunks. The default value is `400`. 4792 4804 * 4793 4805 * Note that the overlap must not exceed half of `max_chunk_size_tokens`. 4794 4806 * 4795 4807 */ 4796 4808 chunk_overlap_tokens: number; 4797 - /** 4798 - * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. 4799 - */ 4800 - max_chunk_size_tokens: number; 4801 4809 }; 4802 - /** 4803 - * Always `static`. 4804 - */ 4805 - type: 'static'; 4806 4810 }; 4807 - /** 4808 - * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. 4809 - * 4810 - */ 4811 - file_ids?: Array<string>; 4812 4811 metadata?: Metadata; 4813 4812 }>; 4814 4813 }; 4815 4814 }; 4815 + metadata?: Metadata; 4816 4816 }; 4817 4817 4818 4818 export type CreateTranscriptionRequest = { 4819 - chunking_strategy?: TranscriptionChunkingStrategy; 4820 4819 /** 4821 4820 * The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. 4822 4821 * 4823 4822 */ 4824 4823 file: Blob | File; 4825 4824 /** 4826 - * Additional information to include in the transcription response. 4827 - * `logprobs` will return the log probabilities of the tokens in the 4828 - * response to understand the model's confidence in the transcription. 4829 - * `logprobs` only works with response_format set to `json` and only with 4830 - * the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`. 4825 + * ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model). 4831 4826 * 4832 4827 */ 4833 - include?: Array<TranscriptionInclude>; 4828 + model: string | 'whisper-1' | 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe'; 4834 4829 /** 4835 4830 * The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency. 4836 4831 * 4837 4832 */ 4838 4833 language?: string; 4839 4834 /** 4840 - * ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model). 4841 - * 4842 - */ 4843 - model: string | 'whisper-1' | 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe'; 4844 - /** 4845 4835 * An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language. 4846 4836 * 4847 4837 */ 4848 4838 prompt?: string; 4849 4839 response_format?: AudioResponseFormat; 4850 4840 /** 4841 + * The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit. 4842 + * 4843 + */ 4844 + temperature?: number; 4845 + /** 4851 4846 * If set to true, the model response data will be streamed to the client 4852 4847 * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). 4853 4848 * See the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) ··· 4857 4852 * 4858 4853 */ 4859 4854 stream?: boolean; 4855 + chunking_strategy?: TranscriptionChunkingStrategy; 4860 4856 /** 4861 - * The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit. 4857 + * The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency. 4862 4858 * 4863 4859 */ 4864 - temperature?: number; 4860 + timestamp_granularities?: Array<'word' | 'segment'>; 4865 4861 /** 4866 - * The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency. 4862 + * Additional information to include in the transcription response. 4863 + * `logprobs` will return the log probabilities of the tokens in the 4864 + * response to understand the model's confidence in the transcription. 4865 + * `logprobs` only works with response_format set to `json` and only with 4866 + * the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`. 4867 4867 * 4868 4868 */ 4869 - timestamp_granularities?: Array<'word' | 'segment'>; 4869 + include?: Array<TranscriptionInclude>; 4870 4870 }; 4871 4871 4872 4872 /** ··· 4874 4874 */ 4875 4875 export type CreateTranscriptionResponseJson = { 4876 4876 /** 4877 + * The transcribed text. 4878 + */ 4879 + text: string; 4880 + /** 4877 4881 * The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array. 4878 4882 * 4879 4883 */ 4880 4884 logprobs?: Array<{ 4881 4885 /** 4882 - * The bytes of the token. 4886 + * The token in the transcription. 4883 4887 */ 4884 - bytes?: Array<number>; 4888 + token?: string; 4885 4889 /** 4886 4890 * The log probability of the token. 4887 4891 */ 4888 4892 logprob?: number; 4889 4893 /** 4890 - * The token in the transcription. 4894 + * The bytes of the token. 4891 4895 */ 4892 - token?: string; 4896 + bytes?: Array<number>; 4893 4897 }>; 4894 4898 /** 4895 - * The transcribed text. 4896 - */ 4897 - text: string; 4898 - /** 4899 4899 * Token usage statistics for the request. 4900 4900 */ 4901 4901 usage?: ··· 4920 4920 */ 4921 4921 export type CreateTranscriptionResponseVerboseJson = { 4922 4922 /** 4923 - * The duration of the input audio. 4924 - */ 4925 - duration: number; 4926 - /** 4927 4923 * The language of the input audio. 4928 4924 */ 4929 4925 language: string; 4930 4926 /** 4931 - * Segments of the transcribed text and their corresponding details. 4927 + * The duration of the input audio. 4932 4928 */ 4933 - segments?: Array<TranscriptionSegment>; 4929 + duration: number; 4934 4930 /** 4935 4931 * The transcribed text. 4936 4932 */ 4937 4933 text: string; 4938 - usage?: TranscriptTextUsageDuration; 4939 4934 /** 4940 4935 * Extracted words and their corresponding timestamps. 4941 4936 */ 4942 4937 words?: Array<TranscriptionWord>; 4938 + /** 4939 + * Segments of the transcribed text and their corresponding details. 4940 + */ 4941 + segments?: Array<TranscriptionSegment>; 4942 + usage?: TranscriptTextUsageDuration; 4943 4943 }; 4944 4944 4945 4945 export type CreateTranslationRequest = { ··· 4976 4976 4977 4977 export type CreateTranslationResponseVerboseJson = { 4978 4978 /** 4979 - * The duration of the input audio. 4980 - */ 4981 - duration: number; 4982 - /** 4983 4979 * The language of the output translation (always `english`). 4984 4980 */ 4985 4981 language: string; 4986 4982 /** 4987 - * Segments of the translated text and their corresponding details. 4983 + * The duration of the input audio. 4988 4984 */ 4989 - segments?: Array<TranscriptionSegment>; 4985 + duration: number; 4990 4986 /** 4991 4987 * The translated text. 4992 4988 */ 4993 4989 text: string; 4990 + /** 4991 + * Segments of the translated text and their corresponding details. 4992 + */ 4993 + segments?: Array<TranscriptionSegment>; 4994 4994 }; 4995 4995 4996 4996 export type CreateUploadRequest = { 4997 4997 /** 4998 - * The number of bytes in the file you are uploading. 4998 + * The name of the file to upload. 4999 + * 5000 + */ 5001 + filename: string; 5002 + /** 5003 + * The intended purpose of the uploaded file. 5004 + * 5005 + * See the [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). 4999 5006 * 5000 5007 */ 5001 - bytes: number; 5002 - expires_after?: FileExpirationAfter; 5008 + purpose: 'assistants' | 'batch' | 'fine-tune' | 'vision'; 5003 5009 /** 5004 - * The name of the file to upload. 5010 + * The number of bytes in the file you are uploading. 5005 5011 * 5006 5012 */ 5007 - filename: string; 5013 + bytes: number; 5008 5014 /** 5009 5015 * The MIME type of the file. 5010 5016 * ··· 5012 5018 * 5013 5019 */ 5014 5020 mime_type: string; 5015 - /** 5016 - * The intended purpose of the uploaded file. 5017 - * 5018 - * See the [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). 5019 - * 5020 - */ 5021 - purpose: 'assistants' | 'batch' | 'fine-tune' | 'vision'; 5021 + expires_after?: FileExpirationAfter; 5022 5022 }; 5023 5023 5024 5024 export type CreateVectorStoreFileBatchRequest = { 5025 - attributes?: VectorStoreFileAttributes; 5026 - chunking_strategy?: ChunkingStrategyRequestParam; 5027 5025 /** 5028 5026 * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. 5029 5027 */ 5030 5028 file_ids: Array<string>; 5029 + chunking_strategy?: ChunkingStrategyRequestParam; 5030 + attributes?: VectorStoreFileAttributes; 5031 5031 }; 5032 5032 5033 5033 export type CreateVectorStoreFileRequest = { 5034 - attributes?: VectorStoreFileAttributes; 5035 - chunking_strategy?: ChunkingStrategyRequestParam; 5036 5034 /** 5037 5035 * A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. 5038 5036 */ 5039 5037 file_id: string; 5038 + chunking_strategy?: ChunkingStrategyRequestParam; 5039 + attributes?: VectorStoreFileAttributes; 5040 5040 }; 5041 5041 5042 5042 export type CreateVectorStoreRequest = { 5043 - chunking_strategy?: ChunkingStrategyRequestParam; 5044 - expires_after?: VectorStoreExpirationAfter; 5045 5043 /** 5046 5044 * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. 5047 5045 */ 5048 5046 file_ids?: Array<string>; 5049 - metadata?: Metadata; 5050 5047 /** 5051 5048 * The name of the vector store. 5052 5049 */ 5053 5050 name?: string; 5051 + expires_after?: VectorStoreExpirationAfter; 5052 + chunking_strategy?: ChunkingStrategyRequestParam; 5053 + metadata?: Metadata; 5054 5054 }; 5055 5055 5056 5056 /** ··· 5062 5062 */ 5063 5063 export type CustomTool = { 5064 5064 /** 5065 + * The type of the custom tool. Always `custom`. 5066 + */ 5067 + type: 'custom'; 5068 + /** 5069 + * The name of the custom tool, used to identify it in tool calls. 5070 + */ 5071 + name: string; 5072 + /** 5065 5073 * Optional description of the custom tool, used to provide more context. 5066 5074 * 5067 5075 */ ··· 5079 5087 } 5080 5088 | { 5081 5089 /** 5090 + * Grammar format. Always `grammar`. 5091 + */ 5092 + type: 'grammar'; 5093 + /** 5082 5094 * The grammar definition. 5083 5095 */ 5084 5096 definition: string; ··· 5086 5098 * The syntax of the grammar definition. One of `lark` or `regex`. 5087 5099 */ 5088 5100 syntax: 'lark' | 'regex'; 5089 - /** 5090 - * Grammar format. Always `grammar`. 5091 - */ 5092 - type: 'grammar'; 5093 5101 }; 5094 - /** 5095 - * The name of the custom tool, used to identify it in tool calls. 5096 - */ 5097 - name: string; 5098 - /** 5099 - * The type of the custom tool. Always `custom`. 5100 - */ 5101 - type: 'custom'; 5102 5102 }; 5103 5103 5104 5104 /** ··· 5109 5109 */ 5110 5110 export type CustomToolCall = { 5111 5111 /** 5112 - * An identifier used to map this custom tool call to a tool call output. 5112 + * The type of the custom tool call. Always `custom_tool_call`. 5113 5113 * 5114 5114 */ 5115 - call_id: string; 5115 + type: 'custom_tool_call'; 5116 5116 /** 5117 5117 * The unique ID of the custom tool call in the OpenAI platform. 5118 5118 * 5119 5119 */ 5120 5120 id?: string; 5121 5121 /** 5122 - * The input for the custom tool call generated by the model. 5122 + * An identifier used to map this custom tool call to a tool call output. 5123 5123 * 5124 5124 */ 5125 - input: string; 5125 + call_id: string; 5126 5126 /** 5127 5127 * The name of the custom tool being called. 5128 5128 * 5129 5129 */ 5130 5130 name: string; 5131 5131 /** 5132 - * The type of the custom tool call. Always `custom_tool_call`. 5132 + * The input for the custom tool call generated by the model. 5133 5133 * 5134 5134 */ 5135 - type: 'custom_tool_call'; 5135 + input: string; 5136 5136 }; 5137 5137 5138 5138 /** ··· 5143 5143 */ 5144 5144 export type CustomToolCallOutput = { 5145 5145 /** 5146 - * The call ID, used to map this custom tool call output to a custom tool call. 5146 + * The type of the custom tool call output. Always `custom_tool_call_output`. 5147 5147 * 5148 5148 */ 5149 - call_id: string; 5149 + type: 'custom_tool_call_output'; 5150 5150 /** 5151 5151 * The unique ID of the custom tool call output in the OpenAI platform. 5152 5152 * 5153 5153 */ 5154 5154 id?: string; 5155 5155 /** 5156 - * The output from the custom tool call generated by your code. 5156 + * The call ID, used to map this custom tool call output to a custom tool call. 5157 5157 * 5158 5158 */ 5159 - output: string; 5159 + call_id: string; 5160 5160 /** 5161 - * The type of the custom tool call output. Always `custom_tool_call_output`. 5161 + * The output from the custom tool call generated by your code. 5162 5162 * 5163 5163 */ 5164 - type: 'custom_tool_call_output'; 5164 + output: string; 5165 5165 }; 5166 5166 5167 5167 /** ··· 5172 5172 */ 5173 5173 export type CustomToolChatCompletions = { 5174 5174 /** 5175 + * The type of the custom tool. Always `custom`. 5176 + */ 5177 + type: 'custom'; 5178 + /** 5175 5179 * Custom tool properties 5176 5180 * 5177 5181 * Properties of the custom tool. 5178 5182 * 5179 5183 */ 5180 5184 custom: { 5185 + /** 5186 + * The name of the custom tool, used to identify it in tool calls. 5187 + */ 5188 + name: string; 5181 5189 /** 5182 5190 * Optional description of the custom tool, used to provide more context. 5183 5191 * ··· 5196 5204 } 5197 5205 | { 5198 5206 /** 5207 + * Grammar format. Always `grammar`. 5208 + */ 5209 + type: 'grammar'; 5210 + /** 5199 5211 * Grammar format 5200 5212 * 5201 5213 * Your chosen grammar. ··· 5210 5222 */ 5211 5223 syntax: 'lark' | 'regex'; 5212 5224 }; 5213 - /** 5214 - * Grammar format. Always `grammar`. 5215 - */ 5216 - type: 'grammar'; 5217 5225 }; 5218 - /** 5219 - * The name of the custom tool, used to identify it in tool calls. 5220 - */ 5221 - name: string; 5222 5226 }; 5223 - /** 5224 - * The type of the custom tool. Always `custom`. 5225 - */ 5226 - type: 'custom'; 5227 5227 }; 5228 5228 5229 5229 export type DeleteAssistantResponse = { 5230 - deleted: boolean; 5231 5230 id: string; 5231 + deleted: boolean; 5232 5232 object: 'assistant.deleted'; 5233 5233 }; 5234 5234 5235 5235 export type DeleteCertificateResponse = { 5236 5236 /** 5237 + * The object type, must be `certificate.deleted`. 5238 + */ 5239 + object: 'certificate.deleted'; 5240 + /** 5237 5241 * The ID of the certificate that was deleted. 5238 5242 */ 5239 5243 id: string; 5240 - /** 5241 - * The object type, must be `certificate.deleted`. 5242 - */ 5243 - object: 'certificate.deleted'; 5244 5244 }; 5245 5245 5246 5246 export type DeleteFileResponse = { 5247 - deleted: boolean; 5248 5247 id: string; 5249 5248 object: 'file'; 5249 + deleted: boolean; 5250 5250 }; 5251 5251 5252 5252 export type DeleteFineTuningCheckpointPermissionResponse = { 5253 5253 /** 5254 - * Whether the fine-tuned model checkpoint permission was successfully deleted. 5255 - */ 5256 - deleted: boolean; 5257 - /** 5258 5254 * The ID of the fine-tuned model checkpoint permission that was deleted. 5259 5255 */ 5260 5256 id: string; ··· 5262 5258 * The object type, which is always "checkpoint.permission". 5263 5259 */ 5264 5260 object: 'checkpoint.permission'; 5261 + /** 5262 + * Whether the fine-tuned model checkpoint permission was successfully deleted. 5263 + */ 5264 + deleted: boolean; 5265 5265 }; 5266 5266 5267 5267 export type DeleteMessageResponse = { 5268 + id: string; 5268 5269 deleted: boolean; 5269 - id: string; 5270 5270 object: 'thread.message.deleted'; 5271 5271 }; 5272 5272 5273 5273 export type DeleteModelResponse = { 5274 - deleted: boolean; 5275 5274 id: string; 5275 + deleted: boolean; 5276 5276 object: string; 5277 5277 }; 5278 5278 5279 5279 export type DeleteThreadResponse = { 5280 - deleted: boolean; 5281 5280 id: string; 5281 + deleted: boolean; 5282 5282 object: 'thread.deleted'; 5283 5283 }; 5284 5284 5285 5285 export type DeleteVectorStoreFileResponse = { 5286 - deleted: boolean; 5287 5286 id: string; 5287 + deleted: boolean; 5288 5288 object: 'vector_store.file.deleted'; 5289 5289 }; 5290 5290 5291 5291 export type DeleteVectorStoreResponse = { 5292 - deleted: boolean; 5293 5292 id: string; 5293 + deleted: boolean; 5294 5294 object: 'vector_store.deleted'; 5295 5295 }; 5296 5296 ··· 5298 5298 * Occurs when a stream ends. 5299 5299 */ 5300 5300 export type DoneEvent = { 5301 - data: '[DONE]'; 5302 5301 event: 'done'; 5302 + data: '[DONE]'; 5303 5303 }; 5304 5304 5305 5305 /** ··· 5334 5334 * 5335 5335 */ 5336 5336 export type Drag = { 5337 + /** 5338 + * Specifies the event type. For a drag action, this property is 5339 + * always set to `drag`. 5340 + * 5341 + */ 5342 + type: 'drag'; 5337 5343 /** 5338 5344 * An array of coordinates representing the path of the drag action. Coordinates will appear as an array 5339 5345 * of objects, eg ··· 5346 5352 * 5347 5353 */ 5348 5354 path: Array<Coordinate>; 5349 - /** 5350 - * Specifies the event type. For a drag action, this property is 5351 - * always set to `drag`. 5352 - * 5353 - */ 5354 - type: 'drag'; 5355 5355 }; 5356 5356 5357 5357 /** ··· 5366 5366 */ 5367 5367 export type EasyInputMessage = { 5368 5368 /** 5369 - * Text, image, or audio input to the model, used to generate a response. 5370 - * Can also contain previous assistant responses. 5371 - * 5372 - */ 5373 - content: string | InputMessageContentList; 5374 - /** 5375 5369 * The role of the message input. One of `user`, `assistant`, `system`, or 5376 5370 * `developer`. 5377 5371 * 5378 5372 */ 5379 5373 role: 'user' | 'assistant' | 'system' | 'developer'; 5380 5374 /** 5375 + * Text, image, or audio input to the model, used to generate a response. 5376 + * Can also contain previous assistant responses. 5377 + * 5378 + */ 5379 + content: string | InputMessageContentList; 5380 + /** 5381 5381 * The type of the message input. Always `message`. 5382 5382 * 5383 5383 */ ··· 5390 5390 */ 5391 5391 export type Embedding = { 5392 5392 /** 5393 + * The index of the embedding in the list of embeddings. 5394 + */ 5395 + index: number; 5396 + /** 5393 5397 * The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings). 5394 5398 * 5395 5399 */ 5396 5400 embedding: Array<number>; 5397 - /** 5398 - * The index of the embedding in the list of embeddings. 5399 - */ 5400 - index: number; 5401 5401 /** 5402 5402 * The object type, which is always "embedding". 5403 5403 */ ··· 5415 5415 * Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. 5416 5416 */ 5417 5417 export type ErrorEvent = { 5418 - data: _Error; 5419 5418 event: 'error'; 5419 + data: _Error; 5420 5420 }; 5421 5421 5422 5422 export type ErrorResponse = { ··· 5436 5436 */ 5437 5437 export type Eval = { 5438 5438 /** 5439 - * The Unix timestamp (in seconds) for when the eval was created. 5439 + * The object type. 5440 + */ 5441 + object: 'eval'; 5442 + /** 5443 + * Unique identifier for the evaluation. 5444 + */ 5445 + id: string; 5446 + /** 5447 + * The name of the evaluation. 5440 5448 */ 5441 - created_at: number; 5449 + name: string; 5442 5450 /** 5443 5451 * Configuration of data sources used in runs of the evaluation. 5444 5452 */ ··· 5453 5461 type?: 'EvalStoredCompletionsDataSourceConfig'; 5454 5462 } & EvalStoredCompletionsDataSourceConfig); 5455 5463 /** 5456 - * Unique identifier for the evaluation. 5457 - */ 5458 - id: string; 5459 - metadata: Metadata; 5460 - /** 5461 - * The name of the evaluation. 5462 - */ 5463 - name: string; 5464 - /** 5465 - * The object type. 5466 - */ 5467 - object: 'eval'; 5468 - /** 5469 5464 * A list of testing criteria. 5470 5465 */ 5471 5466 testing_criteria: Array< ··· 5475 5470 | EvalGraderPython 5476 5471 | EvalGraderScoreModel 5477 5472 >; 5473 + /** 5474 + * The Unix timestamp (in seconds) for when the eval was created. 5475 + */ 5476 + created_at: number; 5477 + metadata: Metadata; 5478 5478 }; 5479 5479 5480 5480 /** ··· 5504 5504 * 5505 5505 */ 5506 5506 export type EvalCustomDataSourceConfig = { 5507 + /** 5508 + * The type of data source. Always `custom`. 5509 + */ 5510 + type: 'custom'; 5507 5511 /** 5508 5512 * The json schema for the run data source items. 5509 5513 * Learn how to build JSON schemas [here](https://json-schema.org/). ··· 5512 5516 schema: { 5513 5517 [key: string]: unknown; 5514 5518 }; 5515 - /** 5516 - * The type of data source. Always `custom`. 5517 - */ 5518 - type: 'custom'; 5519 5519 }; 5520 5520 5521 5521 /** ··· 5569 5569 * 5570 5570 */ 5571 5571 export type EvalItem = { 5572 + /** 5573 + * The role of the message input. One of `user`, `assistant`, `system`, or 5574 + * `developer`. 5575 + * 5576 + */ 5577 + role: 'user' | 'assistant' | 'system' | 'developer'; 5572 5578 /** 5573 5579 * Inputs to the model - can contain template strings. 5574 5580 * ··· 5578 5584 | InputTextContent 5579 5585 | { 5580 5586 /** 5581 - * The text output from the model. 5587 + * The type of the output text. Always `output_text`. 5582 5588 * 5583 5589 */ 5584 - text: string; 5590 + type: 'output_text'; 5585 5591 /** 5586 - * The type of the output text. Always `output_text`. 5592 + * The text output from the model. 5587 5593 * 5588 5594 */ 5589 - type: 'output_text'; 5595 + text: string; 5590 5596 } 5591 5597 | { 5592 5598 /** 5593 - * The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`. 5599 + * The type of the image input. Always `input_image`. 5594 5600 * 5595 5601 */ 5596 - detail?: string; 5602 + type: 'input_image'; 5597 5603 /** 5598 5604 * The URL of the image input. 5599 5605 * 5600 5606 */ 5601 5607 image_url: string; 5602 5608 /** 5603 - * The type of the image input. Always `input_image`. 5609 + * The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`. 5604 5610 * 5605 5611 */ 5606 - type: 'input_image'; 5612 + detail?: string; 5607 5613 } 5608 5614 | Array<unknown>; 5609 5615 /** 5610 - * The role of the message input. One of `user`, `assistant`, `system`, or 5611 - * `developer`. 5612 - * 5613 - */ 5614 - role: 'user' | 'assistant' | 'system' | 'developer'; 5615 - /** 5616 5616 * The type of the message input. Always `message`. 5617 5617 * 5618 5618 */ ··· 5624 5624 */ 5625 5625 export type EvalJsonlFileContentSource = { 5626 5626 /** 5627 + * The type of jsonl source. Always `file_content`. 5628 + */ 5629 + type: 'file_content'; 5630 + /** 5627 5631 * The content of the jsonl file. 5628 5632 */ 5629 5633 content: Array<{ ··· 5634 5638 [key: string]: unknown; 5635 5639 }; 5636 5640 }>; 5637 - /** 5638 - * The type of jsonl source. Always `file_content`. 5639 - */ 5640 - type: 'file_content'; 5641 5641 }; 5642 5642 5643 5643 /** ··· 5645 5645 */ 5646 5646 export type EvalJsonlFileIdSource = { 5647 5647 /** 5648 + * The type of jsonl source. Always `file_id`. 5649 + */ 5650 + type: 'file_id'; 5651 + /** 5648 5652 * The identifier of the file. 5649 5653 */ 5650 5654 id: string; 5651 - /** 5652 - * The type of jsonl source. Always `file_id`. 5653 - */ 5654 - type: 'file_id'; 5655 5655 }; 5656 5656 5657 5657 /** ··· 5662 5662 */ 5663 5663 export type EvalList = { 5664 5664 /** 5665 + * The type of this object. It is always set to "list". 5666 + * 5667 + */ 5668 + object: 'list'; 5669 + /** 5665 5670 * An array of eval objects. 5666 5671 * 5667 5672 */ ··· 5670 5675 * The identifier of the first eval in the data array. 5671 5676 */ 5672 5677 first_id: string; 5673 - /** 5674 - * Indicates whether there are more evals available. 5675 - */ 5676 - has_more: boolean; 5677 5678 /** 5678 5679 * The identifier of the last eval in the data array. 5679 5680 */ 5680 5681 last_id: string; 5681 5682 /** 5682 - * The type of this object. It is always set to "list". 5683 - * 5683 + * Indicates whether there are more evals available. 5684 5684 */ 5685 - object: 'list'; 5685 + has_more: boolean; 5686 5686 }; 5687 5687 5688 5688 /** ··· 5695 5695 * 5696 5696 */ 5697 5697 export type EvalLogsDataSourceConfig = { 5698 + /** 5699 + * The type of data source. Always `logs`. 5700 + */ 5701 + type: 'logs'; 5698 5702 metadata?: Metadata; 5699 5703 /** 5700 5704 * The json schema for the run data source items. ··· 5704 5708 schema: { 5705 5709 [key: string]: unknown; 5706 5710 }; 5707 - /** 5708 - * The type of data source. Always `logs`. 5709 - */ 5710 - type: 'logs'; 5711 5711 }; 5712 5712 5713 5713 /** ··· 5718 5718 */ 5719 5719 export type EvalResponsesSource = { 5720 5720 /** 5721 - * Only include items created after this timestamp (inclusive). This is a query parameter used to select responses. 5721 + * The type of run data source. Always `responses`. 5722 + */ 5723 + type: 'responses'; 5724 + /** 5725 + * Metadata filter for the responses. This is a query parameter used to select responses. 5722 5726 */ 5723 - created_after?: number; 5727 + metadata?: { 5728 + [key: string]: unknown; 5729 + }; 5724 5730 /** 5725 - * Only include items created before this timestamp (inclusive). This is a query parameter used to select responses. 5731 + * The name of the model to find responses for. This is a query parameter used to select responses. 5726 5732 */ 5727 - created_before?: number; 5733 + model?: string; 5728 5734 /** 5729 5735 * Optional string to search the 'instructions' field. This is a query parameter used to select responses. 5730 5736 */ 5731 5737 instructions_search?: string; 5732 5738 /** 5733 - * Metadata filter for the responses. This is a query parameter used to select responses. 5739 + * Only include items created after this timestamp (inclusive). This is a query parameter used to select responses. 5734 5740 */ 5735 - metadata?: { 5736 - [key: string]: unknown; 5737 - }; 5741 + created_after?: number; 5738 5742 /** 5739 - * The name of the model to find responses for. This is a query parameter used to select responses. 5743 + * Only include items created before this timestamp (inclusive). This is a query parameter used to select responses. 5740 5744 */ 5741 - model?: string; 5745 + created_before?: number; 5742 5746 /** 5743 5747 * Optional reasoning effort parameter. This is a query parameter used to select responses. 5744 5748 */ ··· 5747 5751 * Sampling temperature. This is a query parameter used to select responses. 5748 5752 */ 5749 5753 temperature?: number; 5750 - /** 5751 - * List of tool names. This is a query parameter used to select responses. 5752 - */ 5753 - tools?: Array<string>; 5754 5754 /** 5755 5755 * Nucleus sampling parameter. This is a query parameter used to select responses. 5756 5756 */ 5757 5757 top_p?: number; 5758 5758 /** 5759 - * The type of run data source. Always `responses`. 5760 - */ 5761 - type: 'responses'; 5762 - /** 5763 5759 * List of user identifiers. This is a query parameter used to select responses. 5764 5760 */ 5765 5761 users?: Array<string>; 5762 + /** 5763 + * List of tool names. This is a query parameter used to select responses. 5764 + */ 5765 + tools?: Array<string>; 5766 5766 }; 5767 5767 5768 5768 /** ··· 5773 5773 */ 5774 5774 export type EvalRun = { 5775 5775 /** 5776 - * Unix timestamp (in seconds) when the evaluation run was created. 5776 + * The type of the object. Always "eval.run". 5777 5777 */ 5778 - created_at: number; 5778 + object: 'eval.run'; 5779 5779 /** 5780 - * Information about the run's data source. 5780 + * Unique identifier for the evaluation run. 5781 5781 */ 5782 - data_source: 5783 - | ({ 5784 - type?: 'CreateEvalJsonlRunDataSource'; 5785 - } & CreateEvalJsonlRunDataSource) 5786 - | ({ 5787 - type?: 'CreateEvalCompletionsRunDataSource'; 5788 - } & CreateEvalCompletionsRunDataSource) 5789 - | ({ 5790 - type?: 'CreateEvalResponsesRunDataSource'; 5791 - } & CreateEvalResponsesRunDataSource); 5792 - error: EvalApiError; 5782 + id: string; 5793 5783 /** 5794 5784 * The identifier of the associated evaluation. 5795 5785 */ 5796 5786 eval_id: string; 5797 5787 /** 5798 - * Unique identifier for the evaluation run. 5788 + * The status of the evaluation run. 5799 5789 */ 5800 - id: string; 5801 - metadata: Metadata; 5790 + status: string; 5802 5791 /** 5803 5792 * The model that is evaluated, if applicable. 5804 5793 */ ··· 5808 5797 */ 5809 5798 name: string; 5810 5799 /** 5811 - * The type of the object. Always "eval.run". 5800 + * Unix timestamp (in seconds) when the evaluation run was created. 5801 + */ 5802 + created_at: number; 5803 + /** 5804 + * The URL to the rendered evaluation run report on the UI dashboard. 5812 5805 */ 5813 - object: 'eval.run'; 5806 + report_url: string; 5814 5807 /** 5815 - * Usage statistics for each model during the evaluation run. 5808 + * Counters summarizing the outcomes of the evaluation run. 5816 5809 */ 5817 - per_model_usage: Array<{ 5810 + result_counts: { 5818 5811 /** 5819 - * The number of tokens retrieved from cache. 5812 + * Total number of executed output items. 5820 5813 */ 5821 - cached_tokens: number; 5814 + total: number; 5822 5815 /** 5823 - * The number of completion tokens generated. 5816 + * Number of output items that resulted in an error. 5824 5817 */ 5825 - completion_tokens: number; 5818 + errored: number; 5826 5819 /** 5827 - * The number of invocations. 5820 + * Number of output items that failed to pass the evaluation. 5821 + */ 5822 + failed: number; 5823 + /** 5824 + * Number of output items that passed the evaluation. 5828 5825 */ 5829 - invocation_count: number; 5826 + passed: number; 5827 + }; 5828 + /** 5829 + * Usage statistics for each model during the evaluation run. 5830 + */ 5831 + per_model_usage: Array<{ 5830 5832 /** 5831 5833 * The name of the model. 5832 5834 */ 5833 5835 model_name: string; 5834 5836 /** 5837 + * The number of invocations. 5838 + */ 5839 + invocation_count: number; 5840 + /** 5835 5841 * The number of prompt tokens used. 5836 5842 */ 5837 5843 prompt_tokens: number; 5844 + /** 5845 + * The number of completion tokens generated. 5846 + */ 5847 + completion_tokens: number; 5838 5848 /** 5839 5849 * The total number of tokens used. 5840 5850 */ 5841 5851 total_tokens: number; 5852 + /** 5853 + * The number of tokens retrieved from cache. 5854 + */ 5855 + cached_tokens: number; 5842 5856 }>; 5843 5857 /** 5844 5858 * Results per testing criteria applied during the evaluation run. 5845 5859 */ 5846 5860 per_testing_criteria_results: Array<{ 5847 5861 /** 5848 - * Number of tests failed for this criteria. 5849 - */ 5850 - failed: number; 5851 - /** 5852 - * Number of tests passed for this criteria. 5853 - */ 5854 - passed: number; 5855 - /** 5856 5862 * A description of the testing criteria. 5857 5863 */ 5858 5864 testing_criteria: string; 5859 - }>; 5860 - /** 5861 - * The URL to the rendered evaluation run report on the UI dashboard. 5862 - */ 5863 - report_url: string; 5864 - /** 5865 - * Counters summarizing the outcomes of the evaluation run. 5866 - */ 5867 - result_counts: { 5868 - /** 5869 - * Number of output items that resulted in an error. 5870 - */ 5871 - errored: number; 5872 5865 /** 5873 - * Number of output items that failed to pass the evaluation. 5874 - */ 5875 - failed: number; 5876 - /** 5877 - * Number of output items that passed the evaluation. 5866 + * Number of tests passed for this criteria. 5878 5867 */ 5879 5868 passed: number; 5880 5869 /** 5881 - * Total number of executed output items. 5870 + * Number of tests failed for this criteria. 5882 5871 */ 5883 - total: number; 5884 - }; 5872 + failed: number; 5873 + }>; 5885 5874 /** 5886 - * The status of the evaluation run. 5875 + * Information about the run's data source. 5887 5876 */ 5888 - status: string; 5877 + data_source: 5878 + | ({ 5879 + type?: 'CreateEvalJsonlRunDataSource'; 5880 + } & CreateEvalJsonlRunDataSource) 5881 + | ({ 5882 + type?: 'CreateEvalCompletionsRunDataSource'; 5883 + } & CreateEvalCompletionsRunDataSource) 5884 + | ({ 5885 + type?: 'CreateEvalResponsesRunDataSource'; 5886 + } & CreateEvalResponsesRunDataSource); 5887 + metadata: Metadata; 5888 + error: EvalApiError; 5889 5889 }; 5890 5890 5891 5891 /** ··· 5896 5896 */ 5897 5897 export type EvalRunList = { 5898 5898 /** 5899 + * The type of this object. It is always set to "list". 5900 + * 5901 + */ 5902 + object: 'list'; 5903 + /** 5899 5904 * An array of eval run objects. 5900 5905 * 5901 5906 */ ··· 5904 5909 * The identifier of the first eval run in the data array. 5905 5910 */ 5906 5911 first_id: string; 5907 - /** 5908 - * Indicates whether there are more evals available. 5909 - */ 5910 - has_more: boolean; 5911 5912 /** 5912 5913 * The identifier of the last eval run in the data array. 5913 5914 */ 5914 5915 last_id: string; 5915 5916 /** 5916 - * The type of this object. It is always set to "list". 5917 - * 5917 + * Indicates whether there are more evals available. 5918 5918 */ 5919 - object: 'list'; 5919 + has_more: boolean; 5920 5920 }; 5921 5921 5922 5922 /** ··· 5927 5927 */ 5928 5928 export type EvalRunOutputItem = { 5929 5929 /** 5930 - * Unix timestamp (in seconds) when the evaluation run was created. 5930 + * The type of the object. Always "eval.run.output_item". 5931 5931 */ 5932 - created_at: number; 5932 + object: 'eval.run.output_item'; 5933 5933 /** 5934 - * Details of the input data source item. 5934 + * Unique identifier for the evaluation run output item. 5935 5935 */ 5936 - datasource_item: { 5937 - [key: string]: unknown; 5938 - }; 5936 + id: string; 5939 5937 /** 5940 - * The identifier for the data source item. 5938 + * The identifier of the evaluation run associated with this output item. 5941 5939 */ 5942 - datasource_item_id: number; 5940 + run_id: string; 5943 5941 /** 5944 5942 * The identifier of the evaluation group. 5945 5943 */ 5946 5944 eval_id: string; 5947 5945 /** 5948 - * Unique identifier for the evaluation run output item. 5946 + * Unix timestamp (in seconds) when the evaluation run was created. 5947 + */ 5948 + created_at: number; 5949 + /** 5950 + * The status of the evaluation run. 5951 + */ 5952 + status: string; 5953 + /** 5954 + * The identifier for the data source item. 5949 5955 */ 5950 - id: string; 5956 + datasource_item_id: number; 5951 5957 /** 5952 - * The type of the object. Always "eval.run.output_item". 5958 + * Details of the input data source item. 5953 5959 */ 5954 - object: 'eval.run.output_item'; 5960 + datasource_item: { 5961 + [key: string]: unknown; 5962 + }; 5955 5963 /** 5956 5964 * A list of results from the evaluation run. 5957 5965 */ 5958 5966 results: Array<{ 5959 5967 [key: string]: unknown; 5960 5968 }>; 5961 - /** 5962 - * The identifier of the evaluation run associated with this output item. 5963 - */ 5964 - run_id: string; 5965 5969 /** 5966 5970 * A sample containing the input and output of the evaluation run. 5967 5971 */ 5968 5972 sample: { 5969 - error: EvalApiError; 5970 - /** 5971 - * The reason why the sample generation was finished. 5972 - */ 5973 - finish_reason: string; 5974 5973 /** 5975 5974 * An array of input messages. 5976 5975 */ 5977 5976 input: Array<{ 5978 5977 /** 5978 + * The role of the message sender (e.g., system, user, developer). 5979 + */ 5980 + role: string; 5981 + /** 5979 5982 * The content of the message. 5980 5983 */ 5981 5984 content: string; 5982 - /** 5983 - * The role of the message sender (e.g., system, user, developer). 5984 - */ 5985 - role: string; 5986 5985 }>; 5987 5986 /** 5988 - * The maximum number of tokens allowed for completion. 5989 - */ 5990 - max_completion_tokens: number; 5991 - /** 5992 - * The model used for generating the sample. 5993 - */ 5994 - model: string; 5995 - /** 5996 5987 * An array of output messages. 5997 5988 */ 5998 5989 output: Array<{ 5999 5990 /** 5991 + * The role of the message (e.g. "system", "assistant", "user"). 5992 + */ 5993 + role?: string; 5994 + /** 6000 5995 * The content of the message. 6001 5996 */ 6002 5997 content?: string; 6003 - /** 6004 - * The role of the message (e.g. "system", "assistant", "user"). 6005 - */ 6006 - role?: string; 6007 5998 }>; 6008 5999 /** 6009 - * The seed used for generating the sample. 6010 - */ 6011 - seed: number; 6012 - /** 6013 - * The sampling temperature used. 6000 + * The reason why the sample generation was finished. 6014 6001 */ 6015 - temperature: number; 6002 + finish_reason: string; 6016 6003 /** 6017 - * The top_p value used for sampling. 6004 + * The model used for generating the sample. 6018 6005 */ 6019 - top_p: number; 6006 + model: string; 6020 6007 /** 6021 6008 * Token usage details for the sample. 6022 6009 */ 6023 6010 usage: { 6024 6011 /** 6025 - * The number of tokens retrieved from cache. 6012 + * The total number of tokens used. 6026 6013 */ 6027 - cached_tokens: number; 6014 + total_tokens: number; 6028 6015 /** 6029 6016 * The number of completion tokens generated. 6030 6017 */ ··· 6034 6021 */ 6035 6022 prompt_tokens: number; 6036 6023 /** 6037 - * The total number of tokens used. 6024 + * The number of tokens retrieved from cache. 6038 6025 */ 6039 - total_tokens: number; 6026 + cached_tokens: number; 6040 6027 }; 6028 + error: EvalApiError; 6029 + /** 6030 + * The sampling temperature used. 6031 + */ 6032 + temperature: number; 6033 + /** 6034 + * The maximum number of tokens allowed for completion. 6035 + */ 6036 + max_completion_tokens: number; 6037 + /** 6038 + * The top_p value used for sampling. 6039 + */ 6040 + top_p: number; 6041 + /** 6042 + * The seed used for generating the sample. 6043 + */ 6044 + seed: number; 6041 6045 }; 6042 - /** 6043 - * The status of the evaluation run. 6044 - */ 6045 - status: string; 6046 6046 }; 6047 6047 6048 6048 /** ··· 6053 6053 */ 6054 6054 export type EvalRunOutputItemList = { 6055 6055 /** 6056 + * The type of this object. It is always set to "list". 6057 + * 6058 + */ 6059 + object: 'list'; 6060 + /** 6056 6061 * An array of eval run output item objects. 6057 6062 * 6058 6063 */ ··· 6062 6067 */ 6063 6068 first_id: string; 6064 6069 /** 6065 - * Indicates whether there are more eval run output items available. 6066 - */ 6067 - has_more: boolean; 6068 - /** 6069 6070 * The identifier of the last eval run output item in the data array. 6070 6071 */ 6071 6072 last_id: string; 6072 6073 /** 6073 - * The type of this object. It is always set to "list". 6074 - * 6074 + * Indicates whether there are more eval run output items available. 6075 6075 */ 6076 - object: 'list'; 6076 + has_more: boolean; 6077 6077 }; 6078 6078 6079 6079 /** ··· 6085 6085 * @deprecated 6086 6086 */ 6087 6087 export type EvalStoredCompletionsDataSourceConfig = { 6088 + /** 6089 + * The type of data source. Always `stored_completions`. 6090 + */ 6091 + type: 'stored_completions'; 6088 6092 metadata?: Metadata; 6089 6093 /** 6090 6094 * The json schema for the run data source items. ··· 6094 6098 schema: { 6095 6099 [key: string]: unknown; 6096 6100 }; 6097 - /** 6098 - * The type of data source. Always `stored_completions`. 6099 - */ 6100 - type: 'stored_completions'; 6101 6101 }; 6102 6102 6103 6103 /** ··· 6108 6108 */ 6109 6109 export type EvalStoredCompletionsSource = { 6110 6110 /** 6111 + * The type of source. Always `stored_completions`. 6112 + */ 6113 + type: 'stored_completions'; 6114 + metadata?: Metadata; 6115 + /** 6116 + * An optional model to filter by (e.g., 'gpt-4o'). 6117 + */ 6118 + model?: string; 6119 + /** 6111 6120 * An optional Unix timestamp to filter items created after this time. 6112 6121 */ 6113 6122 created_after?: number; ··· 6119 6128 * An optional maximum number of items to return. 6120 6129 */ 6121 6130 limit?: number; 6122 - metadata?: Metadata; 6123 - /** 6124 - * An optional model to filter by (e.g., 'gpt-4o'). 6125 - */ 6126 - model?: string; 6127 - /** 6128 - * The type of source. Always `stored_completions`. 6129 - */ 6130 - type: 'stored_completions'; 6131 6131 }; 6132 6132 6133 6133 /** ··· 6154 6154 */ 6155 6155 export type FilePath = { 6156 6156 /** 6157 + * The type of the file path. Always `file_path`. 6158 + * 6159 + */ 6160 + type: 'file_path'; 6161 + /** 6157 6162 * The ID of the file. 6158 6163 * 6159 6164 */ ··· 6163 6168 * 6164 6169 */ 6165 6170 index: number; 6166 - /** 6167 - * The type of the file path. Always `file_path`. 6168 - * 6169 - */ 6170 - type: 'file_path'; 6171 6171 }; 6172 6172 6173 6173 /** ··· 6214 6214 */ 6215 6215 id: string; 6216 6216 /** 6217 + * The type of the file search tool call. Always `file_search_call`. 6218 + * 6219 + */ 6220 + type: 'file_search_call'; 6221 + /** 6222 + * The status of the file search tool call. One of `in_progress`, 6223 + * `searching`, `incomplete` or `failed`, 6224 + * 6225 + */ 6226 + status: 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed'; 6227 + /** 6217 6228 * The queries used to search for files. 6218 6229 * 6219 6230 */ ··· 6223 6234 * 6224 6235 */ 6225 6236 results?: Array<{ 6226 - attributes?: VectorStoreFileAttributes; 6227 6237 /** 6228 6238 * The unique ID of the file. 6229 6239 * 6230 6240 */ 6231 6241 file_id?: string; 6232 6242 /** 6243 + * The text that was retrieved from the file. 6244 + * 6245 + */ 6246 + text?: string; 6247 + /** 6233 6248 * The name of the file. 6234 6249 * 6235 6250 */ 6236 6251 filename?: string; 6252 + attributes?: VectorStoreFileAttributes; 6237 6253 /** 6238 6254 * The relevance score of the file - a value between 0 and 1. 6239 6255 * 6240 6256 */ 6241 6257 score?: number; 6242 - /** 6243 - * The text that was retrieved from the file. 6244 - * 6245 - */ 6246 - text?: string; 6247 6258 }>; 6248 - /** 6249 - * The status of the file search tool call. One of `in_progress`, 6250 - * `searching`, `incomplete` or `failed`, 6251 - * 6252 - */ 6253 - status: 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed'; 6254 - /** 6255 - * The type of the file search tool call. Always `file_search_call`. 6256 - * 6257 - */ 6258 - type: 'file_search_call'; 6259 6259 }; 6260 6260 6261 6261 export type FineTuneChatCompletionRequestAssistantMessage = { ··· 6272 6272 * 6273 6273 */ 6274 6274 export type FineTuneChatRequestInput = { 6275 - /** 6276 - * A list of functions the model may generate JSON inputs for. 6277 - * 6278 - * @deprecated 6279 - */ 6280 - functions?: Array<ChatCompletionFunctions>; 6281 6275 messages?: Array< 6282 6276 | ChatCompletionRequestSystemMessage 6283 6277 | ChatCompletionRequestUserMessage ··· 6285 6279 | ChatCompletionRequestToolMessage 6286 6280 | ChatCompletionRequestFunctionMessage 6287 6281 >; 6288 - parallel_tool_calls?: ParallelToolCalls; 6289 6282 /** 6290 6283 * A list of tools the model may generate JSON inputs for. 6291 6284 */ 6292 6285 tools?: Array<ChatCompletionTool>; 6286 + parallel_tool_calls?: ParallelToolCalls; 6287 + /** 6288 + * A list of functions the model may generate JSON inputs for. 6289 + * 6290 + * @deprecated 6291 + */ 6292 + functions?: Array<ChatCompletionFunctions>; 6293 6293 }; 6294 6294 6295 6295 /** ··· 6297 6297 */ 6298 6298 export type FineTuneDpoHyperparameters = { 6299 6299 /** 6300 - * Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance. 6300 + * The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model. 6301 6301 * 6302 6302 */ 6303 - batch_size?: 'auto' | number; 6303 + beta?: 'auto' | number; 6304 6304 /** 6305 - * The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model. 6305 + * Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance. 6306 6306 * 6307 6307 */ 6308 - beta?: 'auto' | number; 6308 + batch_size?: 'auto' | number; 6309 6309 /** 6310 6310 * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. 6311 6311 * ··· 6329 6329 * The method used for fine-tuning. 6330 6330 */ 6331 6331 export type FineTuneMethod = { 6332 - dpo?: FineTuneDpoMethod; 6333 - reinforcement?: FineTuneReinforcementMethod; 6334 - supervised?: FineTuneSupervisedMethod; 6335 6332 /** 6336 6333 * The type of method. Is either `supervised`, `dpo`, or `reinforcement`. 6337 6334 */ 6338 6335 type: 'supervised' | 'dpo' | 'reinforcement'; 6336 + supervised?: FineTuneSupervisedMethod; 6337 + dpo?: FineTuneDpoMethod; 6338 + reinforcement?: FineTuneReinforcementMethod; 6339 6339 }; 6340 6340 6341 6341 /** ··· 6353 6353 | ChatCompletionRequestToolMessage 6354 6354 | ChatCompletionRequestFunctionMessage 6355 6355 >; 6356 - parallel_tool_calls?: ParallelToolCalls; 6357 6356 /** 6358 6357 * A list of tools the model may generate JSON inputs for. 6359 6358 */ 6360 6359 tools?: Array<ChatCompletionTool>; 6360 + parallel_tool_calls?: ParallelToolCalls; 6361 6361 }; 6362 6362 /** 6363 + * The preferred completion message for the output. 6364 + */ 6365 + preferred_output?: Array<ChatCompletionRequestAssistantMessage>; 6366 + /** 6363 6367 * The non-preferred completion message for the output. 6364 6368 */ 6365 6369 non_preferred_output?: Array<ChatCompletionRequestAssistantMessage>; 6366 - /** 6367 - * The preferred completion message for the output. 6368 - */ 6369 - preferred_output?: Array<ChatCompletionRequestAssistantMessage>; 6370 6370 }; 6371 6371 6372 6372 /** ··· 6379 6379 */ 6380 6380 batch_size?: 'auto' | number; 6381 6381 /** 6382 - * Multiplier on amount of compute used for exploring search space during training. 6382 + * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. 6383 6383 * 6384 6384 */ 6385 - compute_multiplier?: 'auto' | number; 6385 + learning_rate_multiplier?: 'auto' | number; 6386 6386 /** 6387 - * The number of training steps between evaluation runs. 6387 + * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. 6388 6388 * 6389 6389 */ 6390 - eval_interval?: 'auto' | number; 6390 + n_epochs?: 'auto' | number; 6391 6391 /** 6392 - * Number of evaluation samples to generate per training step. 6392 + * Level of reasoning effort. 6393 6393 * 6394 6394 */ 6395 - eval_samples?: 'auto' | number; 6395 + reasoning_effort?: 'default' | 'low' | 'medium' | 'high'; 6396 6396 /** 6397 - * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. 6397 + * Multiplier on amount of compute used for exploring search space during training. 6398 6398 * 6399 6399 */ 6400 - learning_rate_multiplier?: 'auto' | number; 6400 + compute_multiplier?: 'auto' | number; 6401 6401 /** 6402 - * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. 6402 + * The number of training steps between evaluation runs. 6403 6403 * 6404 6404 */ 6405 - n_epochs?: 'auto' | number; 6405 + eval_interval?: 'auto' | number; 6406 6406 /** 6407 - * Level of reasoning effort. 6407 + * Number of evaluation samples to generate per training step. 6408 6408 * 6409 6409 */ 6410 - reasoning_effort?: 'default' | 'low' | 'medium' | 'high'; 6410 + eval_samples?: 'auto' | number; 6411 6411 }; 6412 6412 6413 6413 /** ··· 6482 6482 */ 6483 6483 export type FineTuningCheckpointPermission = { 6484 6484 /** 6485 - * The Unix timestamp (in seconds) for when the permission was created. 6486 - */ 6487 - created_at: number; 6488 - /** 6489 6485 * The permission identifier, which can be referenced in the API endpoints. 6490 6486 */ 6491 6487 id: string; 6492 6488 /** 6493 - * The object type, which is always "checkpoint.permission". 6489 + * The Unix timestamp (in seconds) for when the permission was created. 6494 6490 */ 6495 - object: 'checkpoint.permission'; 6491 + created_at: number; 6496 6492 /** 6497 6493 * The project identifier that the permission is for. 6498 6494 */ 6499 6495 project_id: string; 6496 + /** 6497 + * The object type, which is always "checkpoint.permission". 6498 + */ 6499 + object: 'checkpoint.permission'; 6500 6500 }; 6501 6501 6502 6502 /** ··· 6515 6515 */ 6516 6516 wandb: { 6517 6517 /** 6518 - * The entity to use for the run. This allows you to set the team or username of the WandB user that you would 6519 - * like associated with the run. If not set, the default entity for the registered WandB API key is used. 6518 + * The name of the project that the new run will be created under. 6520 6519 * 6521 6520 */ 6522 - entity?: string; 6521 + project: string; 6523 6522 /** 6524 6523 * A display name to set for the run. If not set, we will use the Job ID as the name. 6525 6524 * 6526 6525 */ 6527 6526 name?: string; 6528 6527 /** 6529 - * The name of the project that the new run will be created under. 6528 + * The entity to use for the run. This allows you to set the team or username of the WandB user that you would 6529 + * like associated with the run. If not set, the default entity for the registered WandB API key is used. 6530 6530 * 6531 6531 */ 6532 - project: string; 6532 + entity?: string; 6533 6533 /** 6534 6534 * A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some 6535 6535 * default tags are generated by OpenAI: "openai/finetune", "openai/{base-model}", "openai/{ftjob-abcdef}". ··· 6547 6547 */ 6548 6548 export type FineTuningJob = { 6549 6549 /** 6550 + * The object identifier, which can be referenced in the API endpoints. 6551 + */ 6552 + id: string; 6553 + /** 6550 6554 * The Unix timestamp (in seconds) for when the fine-tuning job was created. 6551 6555 */ 6552 6556 created_at: number; ··· 6568 6572 param: string; 6569 6573 }; 6570 6574 /** 6571 - * The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running. 6572 - */ 6573 - estimated_finish?: number; 6574 - /** 6575 6575 * The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running. 6576 6576 */ 6577 6577 fine_tuned_model: string; ··· 6603 6603 n_epochs?: 'auto' | number; 6604 6604 }; 6605 6605 /** 6606 - * The object identifier, which can be referenced in the API endpoints. 6607 - */ 6608 - id: string; 6609 - /** 6610 - * A list of integrations to enable for this fine-tuning job. 6611 - */ 6612 - integrations?: Array< 6613 - { 6614 - type?: 'FineTuningIntegration'; 6615 - } & FineTuningIntegration 6616 - >; 6617 - metadata?: Metadata; 6618 - method?: FineTuneMethod; 6619 - /** 6620 6606 * The base model that is being fine-tuned. 6621 6607 */ 6622 6608 model: string; ··· 6632 6618 * The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). 6633 6619 */ 6634 6620 result_files: Array<string>; 6635 - /** 6636 - * The seed used for the fine-tuning job. 6637 - */ 6638 - seed: number; 6639 6621 /** 6640 6622 * The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`. 6641 6623 */ ··· 6658 6640 * The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). 6659 6641 */ 6660 6642 validation_file: string; 6643 + /** 6644 + * A list of integrations to enable for this fine-tuning job. 6645 + */ 6646 + integrations?: Array< 6647 + { 6648 + type?: 'FineTuningIntegration'; 6649 + } & FineTuningIntegration 6650 + >; 6651 + /** 6652 + * The seed used for the fine-tuning job. 6653 + */ 6654 + seed: number; 6655 + /** 6656 + * The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running. 6657 + */ 6658 + estimated_finish?: number; 6659 + method?: FineTuneMethod; 6660 + metadata?: Metadata; 6661 6661 }; 6662 6662 6663 6663 /** ··· 6668 6668 */ 6669 6669 export type FineTuningJobCheckpoint = { 6670 6670 /** 6671 + * The checkpoint identifier, which can be referenced in the API endpoints. 6672 + */ 6673 + id: string; 6674 + /** 6671 6675 * The Unix timestamp (in seconds) for when the checkpoint was created. 6672 6676 */ 6673 6677 created_at: number; ··· 6676 6680 */ 6677 6681 fine_tuned_model_checkpoint: string; 6678 6682 /** 6679 - * The name of the fine-tuning job that this checkpoint was created from. 6680 - */ 6681 - fine_tuning_job_id: string; 6682 - /** 6683 - * The checkpoint identifier, which can be referenced in the API endpoints. 6683 + * The step number that the checkpoint was created at. 6684 6684 */ 6685 - id: string; 6685 + step_number: number; 6686 6686 /** 6687 6687 * Metrics at the step number during the fine-tuning job. 6688 6688 */ 6689 6689 metrics: { 6690 - full_valid_loss?: number; 6691 - full_valid_mean_token_accuracy?: number; 6692 6690 step?: number; 6693 6691 train_loss?: number; 6694 6692 train_mean_token_accuracy?: number; 6695 6693 valid_loss?: number; 6696 6694 valid_mean_token_accuracy?: number; 6695 + full_valid_loss?: number; 6696 + full_valid_mean_token_accuracy?: number; 6697 6697 }; 6698 6698 /** 6699 + * The name of the fine-tuning job that this checkpoint was created from. 6700 + */ 6701 + fine_tuning_job_id: string; 6702 + /** 6699 6703 * The object type, which is always "fine_tuning.job.checkpoint". 6700 6704 */ 6701 6705 object: 'fine_tuning.job.checkpoint'; 6702 - /** 6703 - * The step number that the checkpoint was created at. 6704 - */ 6705 - step_number: number; 6706 6706 }; 6707 6707 6708 6708 /** ··· 6710 6710 */ 6711 6711 export type FineTuningJobEvent = { 6712 6712 /** 6713 - * The Unix timestamp (in seconds) for when the fine-tuning job was created. 6713 + * The object type, which is always "fine_tuning.job.event". 6714 6714 */ 6715 - created_at: number; 6715 + object: 'fine_tuning.job.event'; 6716 6716 /** 6717 - * The data associated with the event. 6717 + * The object identifier. 6718 6718 */ 6719 - data?: { 6720 - [key: string]: unknown; 6721 - }; 6719 + id: string; 6722 6720 /** 6723 - * The object identifier. 6721 + * The Unix timestamp (in seconds) for when the fine-tuning job was created. 6724 6722 */ 6725 - id: string; 6723 + created_at: number; 6726 6724 /** 6727 6725 * The log level of the event. 6728 6726 */ ··· 6732 6730 */ 6733 6731 message: string; 6734 6732 /** 6735 - * The object type, which is always "fine_tuning.job.event". 6733 + * The type of event. 6736 6734 */ 6737 - object: 'fine_tuning.job.event'; 6735 + type?: 'message' | 'metrics'; 6738 6736 /** 6739 - * The type of event. 6737 + * The data associated with the event. 6740 6738 */ 6741 - type?: 'message' | 'metrics'; 6739 + data?: { 6740 + [key: string]: unknown; 6741 + }; 6742 6742 }; 6743 6743 6744 6744 export type FunctionObject = { ··· 6775 6775 */ 6776 6776 export type FunctionToolCall = { 6777 6777 /** 6778 - * A JSON string of the arguments to pass to the function. 6778 + * The unique ID of the function tool call. 6779 6779 * 6780 6780 */ 6781 - arguments: string; 6781 + id?: string; 6782 6782 /** 6783 - * The unique ID of the function tool call generated by the model. 6783 + * The type of the function tool call. Always `function_call`. 6784 6784 * 6785 6785 */ 6786 - call_id: string; 6786 + type: 'function_call'; 6787 6787 /** 6788 - * The unique ID of the function tool call. 6788 + * The unique ID of the function tool call generated by the model. 6789 6789 * 6790 6790 */ 6791 - id?: string; 6791 + call_id: string; 6792 6792 /** 6793 6793 * The name of the function to run. 6794 6794 * 6795 6795 */ 6796 6796 name: string; 6797 6797 /** 6798 + * A JSON string of the arguments to pass to the function. 6799 + * 6800 + */ 6801 + arguments: string; 6802 + /** 6798 6803 * The status of the item. One of `in_progress`, `completed`, or 6799 6804 * `incomplete`. Populated when items are returned via API. 6800 6805 * 6801 6806 */ 6802 6807 status?: 'in_progress' | 'completed' | 'incomplete'; 6803 - /** 6804 - * The type of the function tool call. Always `function_call`. 6805 - * 6806 - */ 6807 - type: 'function_call'; 6808 6808 }; 6809 6809 6810 6810 /** ··· 6815 6815 */ 6816 6816 export type FunctionToolCallOutput = { 6817 6817 /** 6818 - * The unique ID of the function tool call generated by the model. 6818 + * The unique ID of the function tool call output. Populated when this item 6819 + * is returned via API. 6820 + * 6821 + */ 6822 + id?: string; 6823 + /** 6824 + * The type of the function tool call output. Always `function_call_output`. 6819 6825 * 6820 6826 */ 6821 - call_id: string; 6827 + type: 'function_call_output'; 6822 6828 /** 6823 - * The unique ID of the function tool call output. Populated when this item 6824 - * is returned via API. 6829 + * The unique ID of the function tool call generated by the model. 6825 6830 * 6826 6831 */ 6827 - id?: string; 6832 + call_id: string; 6828 6833 /** 6829 6834 * A JSON string of the output of the function tool call. 6830 6835 * ··· 6836 6841 * 6837 6842 */ 6838 6843 status?: 'in_progress' | 'completed' | 'incomplete'; 6839 - /** 6840 - * The type of the function tool call output. Always `function_call_output`. 6841 - * 6842 - */ 6843 - type: 'function_call_output'; 6844 6844 }; 6845 6845 6846 6846 export type FunctionToolCallOutputResource = FunctionToolCallOutput & { ··· 6867 6867 * 6868 6868 */ 6869 6869 export type GraderLabelModel = { 6870 - input: Array<EvalItem>; 6870 + /** 6871 + * The object type, which is always `label_model`. 6872 + */ 6873 + type: 'label_model'; 6871 6874 /** 6872 - * The labels to assign to each item in the evaluation. 6875 + * The name of the grader. 6873 6876 */ 6874 - labels: Array<string>; 6877 + name: string; 6875 6878 /** 6876 6879 * The model to use for the evaluation. Must support structured outputs. 6877 6880 */ 6878 6881 model: string; 6882 + input: Array<EvalItem>; 6879 6883 /** 6880 - * The name of the grader. 6884 + * The labels to assign to each item in the evaluation. 6881 6885 */ 6882 - name: string; 6886 + labels: Array<string>; 6883 6887 /** 6884 6888 * The labels that indicate a passing result. Must be a subset of labels. 6885 6889 */ 6886 6890 passing_labels: Array<string>; 6887 - /** 6888 - * The object type, which is always `label_model`. 6889 - */ 6890 - type: 'label_model'; 6891 6891 }; 6892 6892 6893 6893 /** ··· 6897 6897 */ 6898 6898 export type GraderMulti = { 6899 6899 /** 6900 - * A formula to calculate the output based on grader results. 6900 + * The object type, which is always `multi`. 6901 + */ 6902 + type: 'multi'; 6903 + /** 6904 + * The name of the grader. 6901 6905 */ 6902 - calculate_output: string; 6906 + name: string; 6903 6907 graders: 6904 6908 | GraderStringCheck 6905 6909 | GraderTextSimilarity ··· 6907 6911 | GraderScoreModel 6908 6912 | GraderLabelModel; 6909 6913 /** 6910 - * The name of the grader. 6914 + * A formula to calculate the output based on grader results. 6911 6915 */ 6912 - name: string; 6913 - /** 6914 - * The object type, which is always `multi`. 6915 - */ 6916 - type: 'multi'; 6916 + calculate_output: string; 6917 6917 }; 6918 6918 6919 6919 /** ··· 6924 6924 */ 6925 6925 export type GraderPython = { 6926 6926 /** 6927 - * The image tag to use for the python script. 6927 + * The object type, which is always `python`. 6928 6928 */ 6929 - image_tag?: string; 6929 + type: 'python'; 6930 6930 /** 6931 6931 * The name of the grader. 6932 6932 */ ··· 6936 6936 */ 6937 6937 source: string; 6938 6938 /** 6939 - * The object type, which is always `python`. 6939 + * The image tag to use for the python script. 6940 6940 */ 6941 - type: 'python'; 6941 + image_tag?: string; 6942 6942 }; 6943 6943 6944 6944 /** ··· 6949 6949 */ 6950 6950 export type GraderScoreModel = { 6951 6951 /** 6952 - * The input text. This may include template strings. 6952 + * The object type, which is always `score_model`. 6953 6953 */ 6954 - input: Array<EvalItem>; 6955 - /** 6956 - * The model to use for the evaluation. 6957 - */ 6958 - model: string; 6954 + type: 'score_model'; 6959 6955 /** 6960 6956 * The name of the grader. 6961 6957 */ 6962 6958 name: string; 6963 6959 /** 6964 - * The range of the score. Defaults to `[0, 1]`. 6960 + * The model to use for the evaluation. 6965 6961 */ 6966 - range?: Array<number>; 6962 + model: string; 6967 6963 /** 6968 6964 * The sampling parameters for the model. 6969 6965 */ ··· 6971 6967 [key: string]: unknown; 6972 6968 }; 6973 6969 /** 6974 - * The object type, which is always `score_model`. 6970 + * The input text. This may include template strings. 6971 + */ 6972 + input: Array<EvalItem>; 6973 + /** 6974 + * The range of the score. Defaults to `[0, 1]`. 6975 6975 */ 6976 - type: 'score_model'; 6976 + range?: Array<number>; 6977 6977 }; 6978 6978 6979 6979 /** ··· 6984 6984 */ 6985 6985 export type GraderStringCheck = { 6986 6986 /** 6987 - * The input text. This may include template strings. 6987 + * The object type, which is always `string_check`. 6988 6988 */ 6989 - input: string; 6989 + type: 'string_check'; 6990 6990 /** 6991 6991 * The name of the grader. 6992 6992 */ 6993 6993 name: string; 6994 6994 /** 6995 - * The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. 6995 + * The input text. This may include template strings. 6996 6996 */ 6997 - operation: 'eq' | 'ne' | 'like' | 'ilike'; 6997 + input: string; 6998 6998 /** 6999 6999 * The reference text. This may include template strings. 7000 7000 */ 7001 7001 reference: string; 7002 7002 /** 7003 - * The object type, which is always `string_check`. 7003 + * The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. 7004 7004 */ 7005 - type: 'string_check'; 7005 + operation: 'eq' | 'ne' | 'like' | 'ilike'; 7006 7006 }; 7007 7007 7008 7008 /** ··· 7013 7013 */ 7014 7014 export type GraderTextSimilarity = { 7015 7015 /** 7016 + * The type of grader. 7017 + */ 7018 + type: 'text_similarity'; 7019 + /** 7020 + * The name of the grader. 7021 + */ 7022 + name: string; 7023 + /** 7024 + * The text being graded. 7025 + */ 7026 + input: string; 7027 + /** 7028 + * The text being graded against. 7029 + */ 7030 + reference: string; 7031 + /** 7016 7032 * The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, 7017 7033 * `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, 7018 7034 * or `rouge_l`. ··· 7030 7046 | 'rouge_4' 7031 7047 | 'rouge_5' 7032 7048 | 'rouge_l'; 7033 - /** 7034 - * The text being graded. 7035 - */ 7036 - input: string; 7037 - /** 7038 - * The name of the grader. 7039 - */ 7040 - name: string; 7041 - /** 7042 - * The text being graded against. 7043 - */ 7044 - reference: string; 7045 - /** 7046 - * The type of grader. 7047 - */ 7048 - type: 'text_similarity'; 7049 7049 }; 7050 7050 7051 7051 /** ··· 7057 7057 */ 7058 7058 b64_json?: string; 7059 7059 /** 7060 + * When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for `gpt-image-1`. 7061 + */ 7062 + url?: string; 7063 + /** 7060 7064 * For `dall-e-3` only, the revised prompt that was used to generate the image. 7061 7065 */ 7062 7066 revised_prompt?: string; 7063 - /** 7064 - * When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for `gpt-image-1`. 7065 - */ 7066 - url?: string; 7067 7067 }; 7068 7068 7069 7069 /** ··· 7072 7072 */ 7073 7073 export type ImageEditCompletedEvent = { 7074 7074 /** 7075 - * Base64-encoded final edited image data, suitable for rendering as an image. 7075 + * The type of the event. Always `image_edit.completed`. 7076 7076 * 7077 7077 */ 7078 - b64_json: string; 7078 + type: 'image_edit.completed'; 7079 7079 /** 7080 - * The background setting for the edited image. 7080 + * Base64-encoded final edited image data, suitable for rendering as an image. 7081 7081 * 7082 7082 */ 7083 - background: 'transparent' | 'opaque' | 'auto'; 7083 + b64_json: string; 7084 7084 /** 7085 7085 * The Unix timestamp when the event was created. 7086 7086 * 7087 7087 */ 7088 7088 created_at: number; 7089 7089 /** 7090 - * The output format for the edited image. 7090 + * The size of the edited image. 7091 7091 * 7092 7092 */ 7093 - output_format: 'png' | 'webp' | 'jpeg'; 7093 + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7094 7094 /** 7095 7095 * The quality setting for the edited image. 7096 7096 * 7097 7097 */ 7098 7098 quality: 'low' | 'medium' | 'high' | 'auto'; 7099 7099 /** 7100 - * The size of the edited image. 7100 + * The background setting for the edited image. 7101 7101 * 7102 7102 */ 7103 - size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7103 + background: 'transparent' | 'opaque' | 'auto'; 7104 7104 /** 7105 - * The type of the event. Always `image_edit.completed`. 7105 + * The output format for the edited image. 7106 7106 * 7107 7107 */ 7108 - type: 'image_edit.completed'; 7108 + output_format: 'png' | 'webp' | 'jpeg'; 7109 7109 usage: ImagesUsage; 7110 7110 }; 7111 7111 ··· 7115 7115 */ 7116 7116 export type ImageEditPartialImageEvent = { 7117 7117 /** 7118 - * Base64-encoded partial image data, suitable for rendering as an image. 7118 + * The type of the event. Always `image_edit.partial_image`. 7119 7119 * 7120 7120 */ 7121 - b64_json: string; 7121 + type: 'image_edit.partial_image'; 7122 7122 /** 7123 - * The background setting for the requested edited image. 7123 + * Base64-encoded partial image data, suitable for rendering as an image. 7124 7124 * 7125 7125 */ 7126 - background: 'transparent' | 'opaque' | 'auto'; 7126 + b64_json: string; 7127 7127 /** 7128 7128 * The Unix timestamp when the event was created. 7129 7129 * 7130 7130 */ 7131 7131 created_at: number; 7132 7132 /** 7133 - * The output format for the requested edited image. 7133 + * The size of the requested edited image. 7134 7134 * 7135 7135 */ 7136 - output_format: 'png' | 'webp' | 'jpeg'; 7136 + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7137 7137 /** 7138 - * 0-based index for the partial image (streaming). 7138 + * The quality setting for the requested edited image. 7139 7139 * 7140 7140 */ 7141 - partial_image_index: number; 7141 + quality: 'low' | 'medium' | 'high' | 'auto'; 7142 7142 /** 7143 - * The quality setting for the requested edited image. 7143 + * The background setting for the requested edited image. 7144 7144 * 7145 7145 */ 7146 - quality: 'low' | 'medium' | 'high' | 'auto'; 7146 + background: 'transparent' | 'opaque' | 'auto'; 7147 7147 /** 7148 - * The size of the requested edited image. 7148 + * The output format for the requested edited image. 7149 7149 * 7150 7150 */ 7151 - size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7151 + output_format: 'png' | 'webp' | 'jpeg'; 7152 7152 /** 7153 - * The type of the event. Always `image_edit.partial_image`. 7153 + * 0-based index for the partial image (streaming). 7154 7154 * 7155 7155 */ 7156 - type: 'image_edit.partial_image'; 7156 + partial_image_index: number; 7157 7157 }; 7158 7158 7159 7159 export type ImageEditStreamEvent = ··· 7170 7170 */ 7171 7171 export type ImageGenCompletedEvent = { 7172 7172 /** 7173 - * Base64-encoded image data, suitable for rendering as an image. 7173 + * The type of the event. Always `image_generation.completed`. 7174 7174 * 7175 7175 */ 7176 - b64_json: string; 7176 + type: 'image_generation.completed'; 7177 7177 /** 7178 - * The background setting for the generated image. 7178 + * Base64-encoded image data, suitable for rendering as an image. 7179 7179 * 7180 7180 */ 7181 - background: 'transparent' | 'opaque' | 'auto'; 7181 + b64_json: string; 7182 7182 /** 7183 7183 * The Unix timestamp when the event was created. 7184 7184 * 7185 7185 */ 7186 7186 created_at: number; 7187 7187 /** 7188 - * The output format for the generated image. 7188 + * The size of the generated image. 7189 7189 * 7190 7190 */ 7191 - output_format: 'png' | 'webp' | 'jpeg'; 7191 + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7192 7192 /** 7193 7193 * The quality setting for the generated image. 7194 7194 * 7195 7195 */ 7196 7196 quality: 'low' | 'medium' | 'high' | 'auto'; 7197 7197 /** 7198 - * The size of the generated image. 7198 + * The background setting for the generated image. 7199 7199 * 7200 7200 */ 7201 - size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7201 + background: 'transparent' | 'opaque' | 'auto'; 7202 7202 /** 7203 - * The type of the event. Always `image_generation.completed`. 7203 + * The output format for the generated image. 7204 7204 * 7205 7205 */ 7206 - type: 'image_generation.completed'; 7206 + output_format: 'png' | 'webp' | 'jpeg'; 7207 7207 usage: ImagesUsage; 7208 7208 }; 7209 7209 ··· 7213 7213 */ 7214 7214 export type ImageGenPartialImageEvent = { 7215 7215 /** 7216 - * Base64-encoded partial image data, suitable for rendering as an image. 7216 + * The type of the event. Always `image_generation.partial_image`. 7217 7217 * 7218 7218 */ 7219 - b64_json: string; 7219 + type: 'image_generation.partial_image'; 7220 7220 /** 7221 - * The background setting for the requested image. 7221 + * Base64-encoded partial image data, suitable for rendering as an image. 7222 7222 * 7223 7223 */ 7224 - background: 'transparent' | 'opaque' | 'auto'; 7224 + b64_json: string; 7225 7225 /** 7226 7226 * The Unix timestamp when the event was created. 7227 7227 * 7228 7228 */ 7229 7229 created_at: number; 7230 7230 /** 7231 - * The output format for the requested image. 7231 + * The size of the requested image. 7232 7232 * 7233 7233 */ 7234 - output_format: 'png' | 'webp' | 'jpeg'; 7234 + size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7235 7235 /** 7236 - * 0-based index for the partial image (streaming). 7236 + * The quality setting for the requested image. 7237 7237 * 7238 7238 */ 7239 - partial_image_index: number; 7239 + quality: 'low' | 'medium' | 'high' | 'auto'; 7240 7240 /** 7241 - * The quality setting for the requested image. 7241 + * The background setting for the requested image. 7242 7242 * 7243 7243 */ 7244 - quality: 'low' | 'medium' | 'high' | 'auto'; 7244 + background: 'transparent' | 'opaque' | 'auto'; 7245 7245 /** 7246 - * The size of the requested image. 7246 + * The output format for the requested image. 7247 7247 * 7248 7248 */ 7249 - size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7249 + output_format: 'png' | 'webp' | 'jpeg'; 7250 7250 /** 7251 - * The type of the event. Always `image_generation.partial_image`. 7251 + * 0-based index for the partial image (streaming). 7252 7252 * 7253 7253 */ 7254 - type: 'image_generation.partial_image'; 7254 + partial_image_index: number; 7255 7255 }; 7256 7256 7257 7257 export type ImageGenStreamEvent = ··· 7270 7270 */ 7271 7271 export type ImageGenTool = { 7272 7272 /** 7273 - * Background type for the generated image. One of `transparent`, 7274 - * `opaque`, or `auto`. Default: `auto`. 7273 + * The type of the image generation tool. Always `image_generation`. 7275 7274 * 7276 7275 */ 7277 - background?: 'transparent' | 'opaque' | 'auto'; 7278 - input_fidelity?: ImageInputFidelity; 7279 - /** 7280 - * Optional mask for inpainting. Contains `image_url` 7281 - * (string, optional) and `file_id` (string, optional). 7282 - * 7283 - */ 7284 - input_image_mask?: { 7285 - /** 7286 - * File ID for the mask image. 7287 - * 7288 - */ 7289 - file_id?: string; 7290 - /** 7291 - * Base64-encoded mask image. 7292 - * 7293 - */ 7294 - image_url?: string; 7295 - }; 7276 + type: 'image_generation'; 7296 7277 /** 7297 7278 * The image generation model to use. Default: `gpt-image-1`. 7298 7279 * 7299 7280 */ 7300 7281 model?: 'gpt-image-1'; 7301 7282 /** 7302 - * Moderation level for the generated image. Default: `auto`. 7283 + * The quality of the generated image. One of `low`, `medium`, `high`, 7284 + * or `auto`. Default: `auto`. 7303 7285 * 7304 7286 */ 7305 - moderation?: 'auto' | 'low'; 7287 + quality?: 'low' | 'medium' | 'high' | 'auto'; 7306 7288 /** 7307 - * Compression level for the output image. Default: 100. 7289 + * The size of the generated image. One of `1024x1024`, `1024x1536`, 7290 + * `1536x1024`, or `auto`. Default: `auto`. 7308 7291 * 7309 7292 */ 7310 - output_compression?: number; 7293 + size?: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7311 7294 /** 7312 7295 * The output format of the generated image. One of `png`, `webp`, or 7313 7296 * `jpeg`. Default: `png`. ··· 7315 7298 */ 7316 7299 output_format?: 'png' | 'webp' | 'jpeg'; 7317 7300 /** 7318 - * Number of partial images to generate in streaming mode, from 0 (default value) to 3. 7301 + * Compression level for the output image. Default: 100. 7319 7302 * 7320 7303 */ 7321 - partial_images?: number; 7304 + output_compression?: number; 7322 7305 /** 7323 - * The quality of the generated image. One of `low`, `medium`, `high`, 7324 - * or `auto`. Default: `auto`. 7306 + * Moderation level for the generated image. Default: `auto`. 7325 7307 * 7326 7308 */ 7327 - quality?: 'low' | 'medium' | 'high' | 'auto'; 7309 + moderation?: 'auto' | 'low'; 7328 7310 /** 7329 - * The size of the generated image. One of `1024x1024`, `1024x1536`, 7330 - * `1536x1024`, or `auto`. Default: `auto`. 7311 + * Background type for the generated image. One of `transparent`, 7312 + * `opaque`, or `auto`. Default: `auto`. 7313 + * 7314 + */ 7315 + background?: 'transparent' | 'opaque' | 'auto'; 7316 + input_fidelity?: ImageInputFidelity; 7317 + /** 7318 + * Optional mask for inpainting. Contains `image_url` 7319 + * (string, optional) and `file_id` (string, optional). 7331 7320 * 7332 7321 */ 7333 - size?: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; 7322 + input_image_mask?: { 7323 + /** 7324 + * Base64-encoded mask image. 7325 + * 7326 + */ 7327 + image_url?: string; 7328 + /** 7329 + * File ID for the mask image. 7330 + * 7331 + */ 7332 + file_id?: string; 7333 + }; 7334 7334 /** 7335 - * The type of the image generation tool. Always `image_generation`. 7335 + * Number of partial images to generate in streaming mode, from 0 (default value) to 3. 7336 7336 * 7337 7337 */ 7338 - type: 'image_generation'; 7338 + partial_images?: number; 7339 7339 }; 7340 7340 7341 7341 /** ··· 7346 7346 */ 7347 7347 export type ImageGenToolCall = { 7348 7348 /** 7349 - * The unique ID of the image generation call. 7349 + * The type of the image generation call. Always `image_generation_call`. 7350 7350 * 7351 7351 */ 7352 - id: string; 7352 + type: 'image_generation_call'; 7353 7353 /** 7354 - * The generated image encoded in base64. 7354 + * The unique ID of the image generation call. 7355 7355 * 7356 7356 */ 7357 - result: string; 7357 + id: string; 7358 7358 /** 7359 7359 * The status of the image generation call. 7360 7360 * 7361 7361 */ 7362 7362 status: 'in_progress' | 'completed' | 'generating' | 'failed'; 7363 7363 /** 7364 - * The type of the image generation call. Always `image_generation_call`. 7364 + * The generated image encoded in base64. 7365 7365 * 7366 7366 */ 7367 - type: 'image_generation_call'; 7367 + result: string; 7368 7368 }; 7369 7369 7370 7370 /** ··· 7394 7394 */ 7395 7395 export type ImagesResponse = { 7396 7396 /** 7397 - * The background parameter used for the image generation. Either `transparent` or `opaque`. 7398 - */ 7399 - background?: 'transparent' | 'opaque'; 7400 - /** 7401 7397 * The Unix timestamp (in seconds) of when the image was created. 7402 7398 */ 7403 7399 created: number; ··· 7406 7402 */ 7407 7403 data?: Array<Image>; 7408 7404 /** 7405 + * The background parameter used for the image generation. Either `transparent` or `opaque`. 7406 + */ 7407 + background?: 'transparent' | 'opaque'; 7408 + /** 7409 7409 * The output format of the image generation. Either `png`, `webp`, or `jpeg`. 7410 7410 */ 7411 7411 output_format?: 'png' | 'webp' | 'jpeg'; 7412 7412 /** 7413 + * The size of the image generated. Either `1024x1024`, `1024x1536`, or `1536x1024`. 7414 + */ 7415 + size?: '1024x1024' | '1024x1536' | '1536x1024'; 7416 + /** 7413 7417 * The quality of the image generated. Either `low`, `medium`, or `high`. 7414 7418 */ 7415 7419 quality?: 'low' | 'medium' | 'high'; 7416 - /** 7417 - * The size of the image generated. Either `1024x1024`, `1024x1536`, or `1536x1024`. 7418 - */ 7419 - size?: '1024x1024' | '1024x1536' | '1536x1024'; 7420 7420 usage?: ImageGenUsage; 7421 7421 }; 7422 7422 ··· 7425 7425 * 7426 7426 */ 7427 7427 export type ImagesUsage = { 7428 + /** 7429 + * The total number of tokens (images and text) used for the image generation. 7430 + * 7431 + */ 7432 + total_tokens: number; 7428 7433 /** 7429 7434 * The number of tokens (images and text) in the input prompt. 7430 7435 */ 7431 7436 input_tokens: number; 7432 7437 /** 7438 + * The number of image tokens in the output image. 7439 + */ 7440 + output_tokens: number; 7441 + /** 7433 7442 * The input tokens detailed information for the image generation. 7434 7443 */ 7435 7444 input_tokens_details: { 7436 7445 /** 7437 - * The number of image tokens in the input prompt. 7438 - */ 7439 - image_tokens: number; 7440 - /** 7441 7446 * The number of text tokens in the input prompt. 7442 7447 */ 7443 7448 text_tokens: number; 7449 + /** 7450 + * The number of image tokens in the input prompt. 7451 + */ 7452 + image_tokens: number; 7444 7453 }; 7445 - /** 7446 - * The number of image tokens in the output image. 7447 - */ 7448 - output_tokens: number; 7449 - /** 7450 - * The total number of tokens (images and text) used for the image generation. 7451 - * 7452 - */ 7453 - total_tokens: number; 7454 7454 }; 7455 7455 7456 7456 /** ··· 7507 7507 */ 7508 7508 export type InputAudio = { 7509 7509 /** 7510 + * The type of the input item. Always `input_audio`. 7511 + * 7512 + */ 7513 + type: 'input_audio'; 7514 + /** 7510 7515 * Base64-encoded audio data. 7511 7516 * 7512 7517 */ ··· 7517 7522 * 7518 7523 */ 7519 7524 format: 'mp3' | 'wav'; 7520 - /** 7521 - * The type of the input item. Always `input_audio`. 7522 - * 7523 - */ 7524 - type: 'input_audio'; 7525 7525 }; 7526 7526 7527 7527 export type InputContent = ··· 7555 7555 * 7556 7556 */ 7557 7557 export type InputMessage = { 7558 - content: InputMessageContentList; 7558 + /** 7559 + * The type of the message input. Always set to `message`. 7560 + * 7561 + */ 7562 + type?: 'message'; 7559 7563 /** 7560 7564 * The role of the message input. One of `user`, `system`, or `developer`. 7561 7565 * ··· 7567 7571 * 7568 7572 */ 7569 7573 status?: 'in_progress' | 'completed' | 'incomplete'; 7570 - /** 7571 - * The type of the message input. Always set to `message`. 7572 - * 7573 - */ 7574 - type?: 'message'; 7574 + content: InputMessageContentList; 7575 7575 }; 7576 7576 7577 7577 /** ··· 7596 7596 */ 7597 7597 export type Invite = { 7598 7598 /** 7599 - * The Unix timestamp (in seconds) of when the invite was accepted. 7599 + * The object type, which is always `organization.invite` 7600 + */ 7601 + object: 'organization.invite'; 7602 + /** 7603 + * The identifier, which can be referenced in API endpoints 7600 7604 */ 7601 - accepted_at?: number; 7605 + id: string; 7602 7606 /** 7603 7607 * The email address of the individual to whom the invite was sent 7604 7608 */ 7605 7609 email: string; 7606 7610 /** 7607 - * The Unix timestamp (in seconds) of when the invite expires. 7611 + * `owner` or `reader` 7608 7612 */ 7609 - expires_at: number; 7613 + role: 'owner' | 'reader'; 7610 7614 /** 7611 - * The identifier, which can be referenced in API endpoints 7615 + * `accepted`,`expired`, or `pending` 7612 7616 */ 7613 - id: string; 7617 + status: 'accepted' | 'expired' | 'pending'; 7614 7618 /** 7615 7619 * The Unix timestamp (in seconds) of when the invite was sent. 7616 7620 */ 7617 7621 invited_at: number; 7618 7622 /** 7619 - * The object type, which is always `organization.invite` 7623 + * The Unix timestamp (in seconds) of when the invite expires. 7624 + */ 7625 + expires_at: number; 7626 + /** 7627 + * The Unix timestamp (in seconds) of when the invite was accepted. 7620 7628 */ 7621 - object: 'organization.invite'; 7629 + accepted_at?: number; 7622 7630 /** 7623 7631 * The projects that were granted membership upon acceptance of the invite. 7624 7632 */ ··· 7632 7640 */ 7633 7641 role?: 'member' | 'owner'; 7634 7642 }>; 7635 - /** 7636 - * `owner` or `reader` 7637 - */ 7638 - role: 'owner' | 'reader'; 7639 - /** 7640 - * `accepted`,`expired`, or `pending` 7641 - */ 7642 - status: 'accepted' | 'expired' | 'pending'; 7643 7643 }; 7644 7644 7645 7645 export type InviteDeleteResponse = { 7646 - deleted: boolean; 7647 - id: string; 7648 7646 /** 7649 7647 * The object type, which is always `organization.invite.deleted` 7650 7648 */ 7651 7649 object: 'organization.invite.deleted'; 7650 + id: string; 7651 + deleted: boolean; 7652 7652 }; 7653 7653 7654 7654 export type InviteListResponse = { 7655 + /** 7656 + * The object type, which is always `list` 7657 + */ 7658 + object: 'list'; 7655 7659 data: Array<Invite>; 7656 7660 /** 7657 7661 * The first `invite_id` in the retrieved `list` 7658 7662 */ 7659 7663 first_id?: string; 7660 7664 /** 7661 - * The `has_more` property is used for pagination to indicate there are additional results. 7662 - */ 7663 - has_more?: boolean; 7664 - /** 7665 7665 * The last `invite_id` in the retrieved `list` 7666 7666 */ 7667 7667 last_id?: string; 7668 7668 /** 7669 - * The object type, which is always `list` 7669 + * The `has_more` property is used for pagination to indicate there are additional results. 7670 7670 */ 7671 - object: 'list'; 7671 + has_more?: boolean; 7672 7672 }; 7673 7673 7674 7674 export type InviteRequest = { ··· 7676 7676 * Send an email to this address 7677 7677 */ 7678 7678 email: string; 7679 + /** 7680 + * `owner` or `reader` 7681 + */ 7682 + role: 'reader' | 'owner'; 7679 7683 /** 7680 7684 * An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. 7681 7685 */ ··· 7689 7693 */ 7690 7694 role: 'member' | 'owner'; 7691 7695 }>; 7692 - /** 7693 - * `owner` or `reader` 7694 - */ 7695 - role: 'reader' | 'owner'; 7696 7696 }; 7697 7697 7698 7698 /** ··· 7820 7820 */ 7821 7821 export type KeyPress = { 7822 7822 /** 7823 + * Specifies the event type. For a keypress action, this property is 7824 + * always set to `keypress`. 7825 + * 7826 + */ 7827 + type: 'keypress'; 7828 + /** 7823 7829 * The combination of keys the model is requesting to be pressed. This is an 7824 7830 * array of strings, each representing a key. 7825 7831 * 7826 7832 */ 7827 7833 keys: Array<string>; 7828 - /** 7829 - * Specifies the event type. For a keypress action, this property is 7830 - * always set to `keypress`. 7831 - * 7832 - */ 7833 - type: 'keypress'; 7834 7834 }; 7835 7835 7836 7836 export type ListAssistantsResponse = { 7837 + object: string; 7837 7838 data: Array<AssistantObject>; 7838 7839 first_id: string; 7839 - has_more: boolean; 7840 7840 last_id: string; 7841 - object: string; 7841 + has_more: boolean; 7842 7842 }; 7843 7843 7844 7844 export type ListAuditLogsResponse = { 7845 + object: 'list'; 7845 7846 data: Array<AuditLog>; 7846 7847 first_id: string; 7848 + last_id: string; 7847 7849 has_more: boolean; 7848 - last_id: string; 7849 - object: 'list'; 7850 7850 }; 7851 7851 7852 7852 export type ListBatchesResponse = { 7853 7853 data: Array<Batch>; 7854 7854 first_id?: string; 7855 - has_more: boolean; 7856 7855 last_id?: string; 7856 + has_more: boolean; 7857 7857 object: 'list'; 7858 7858 }; 7859 7859 7860 7860 export type ListCertificatesResponse = { 7861 7861 data: Array<Certificate>; 7862 7862 first_id?: string; 7863 + last_id?: string; 7863 7864 has_more: boolean; 7864 - last_id?: string; 7865 7865 object: 'list'; 7866 7866 }; 7867 7867 7868 7868 export type ListFilesResponse = { 7869 + object: string; 7869 7870 data: Array<OpenAiFile>; 7870 7871 first_id: string; 7871 - has_more: boolean; 7872 7872 last_id: string; 7873 - object: string; 7873 + has_more: boolean; 7874 7874 }; 7875 7875 7876 7876 export type ListFineTuningCheckpointPermissionResponse = { 7877 7877 data: Array<FineTuningCheckpointPermission>; 7878 + object: 'list'; 7878 7879 first_id?: string; 7879 - has_more: boolean; 7880 7880 last_id?: string; 7881 - object: 'list'; 7881 + has_more: boolean; 7882 7882 }; 7883 7883 7884 7884 export type ListFineTuningJobCheckpointsResponse = { 7885 7885 data: Array<FineTuningJobCheckpoint>; 7886 + object: 'list'; 7886 7887 first_id?: string; 7887 - has_more: boolean; 7888 7888 last_id?: string; 7889 - object: 'list'; 7889 + has_more: boolean; 7890 7890 }; 7891 7891 7892 7892 export type ListFineTuningJobEventsResponse = { 7893 7893 data: Array<FineTuningJobEvent>; 7894 - has_more: boolean; 7895 7894 object: 'list'; 7895 + has_more: boolean; 7896 7896 }; 7897 7897 7898 7898 export type ListMessagesResponse = { 7899 + object: string; 7899 7900 data: Array<MessageObject>; 7900 7901 first_id: string; 7901 - has_more: boolean; 7902 7902 last_id: string; 7903 - object: string; 7903 + has_more: boolean; 7904 7904 }; 7905 7905 7906 7906 export type ListModelsResponse = { 7907 - data: Array<Model>; 7908 7907 object: 'list'; 7908 + data: Array<Model>; 7909 7909 }; 7910 7910 7911 7911 export type ListPaginatedFineTuningJobsResponse = { ··· 7915 7915 }; 7916 7916 7917 7917 export type ListRunStepsResponse = { 7918 + object: string; 7918 7919 data: Array<RunStepObject>; 7919 7920 first_id: string; 7920 - has_more: boolean; 7921 7921 last_id: string; 7922 - object: string; 7922 + has_more: boolean; 7923 7923 }; 7924 7924 7925 7925 export type ListRunsResponse = { 7926 + object: string; 7926 7927 data: Array<RunObject>; 7927 7928 first_id: string; 7929 + last_id: string; 7928 7930 has_more: boolean; 7929 - last_id: string; 7930 - object: string; 7931 7931 }; 7932 7932 7933 7933 export type ListVectorStoreFilesResponse = { 7934 + object: string; 7934 7935 data: Array<VectorStoreFileObject>; 7935 7936 first_id: string; 7937 + last_id: string; 7936 7938 has_more: boolean; 7937 - last_id: string; 7938 - object: string; 7939 7939 }; 7940 7940 7941 7941 export type ListVectorStoresResponse = { 7942 + object: string; 7942 7943 data: Array<VectorStoreObject>; 7943 7944 first_id: string; 7944 - has_more: boolean; 7945 7945 last_id: string; 7946 - object: string; 7946 + has_more: boolean; 7947 7947 }; 7948 7948 7949 7949 /** ··· 7954 7954 */ 7955 7955 export type LocalShellExecAction = { 7956 7956 /** 7957 - * The command to run. 7957 + * The type of the local shell action. Always `exec`. 7958 7958 * 7959 7959 */ 7960 - command: Array<string>; 7960 + type: 'exec'; 7961 7961 /** 7962 - * Environment variables to set for the command. 7962 + * The command to run. 7963 7963 * 7964 7964 */ 7965 - env: { 7966 - [key: string]: string; 7967 - }; 7965 + command: Array<string>; 7968 7966 /** 7969 7967 * Optional timeout in milliseconds for the command. 7970 7968 * 7971 7969 */ 7972 7970 timeout_ms?: number; 7973 7971 /** 7974 - * The type of the local shell action. Always `exec`. 7972 + * Optional working directory to run the command in. 7975 7973 * 7976 7974 */ 7977 - type: 'exec'; 7975 + working_directory?: string; 7978 7976 /** 7979 - * Optional user to run the command as. 7977 + * Environment variables to set for the command. 7980 7978 * 7981 7979 */ 7982 - user?: string; 7980 + env: { 7981 + [key: string]: string; 7982 + }; 7983 7983 /** 7984 - * Optional working directory to run the command in. 7984 + * Optional user to run the command as. 7985 7985 * 7986 7986 */ 7987 - working_directory?: string; 7987 + user?: string; 7988 7988 }; 7989 7989 7990 7990 /** ··· 8007 8007 * 8008 8008 */ 8009 8009 export type LocalShellToolCall = { 8010 - action: LocalShellExecAction; 8011 8010 /** 8012 - * The unique ID of the local shell tool call generated by the model. 8011 + * The type of the local shell call. Always `local_shell_call`. 8013 8012 * 8014 8013 */ 8015 - call_id: string; 8014 + type: 'local_shell_call'; 8016 8015 /** 8017 8016 * The unique ID of the local shell call. 8018 8017 * 8019 8018 */ 8020 8019 id: string; 8021 8020 /** 8022 - * The status of the local shell call. 8021 + * The unique ID of the local shell tool call generated by the model. 8023 8022 * 8024 8023 */ 8025 - status: 'in_progress' | 'completed' | 'incomplete'; 8024 + call_id: string; 8025 + action: LocalShellExecAction; 8026 8026 /** 8027 - * The type of the local shell call. Always `local_shell_call`. 8027 + * The status of the local shell call. 8028 8028 * 8029 8029 */ 8030 - type: 'local_shell_call'; 8030 + status: 'in_progress' | 'completed' | 'incomplete'; 8031 8031 }; 8032 8032 8033 8033 /** ··· 8037 8037 * 8038 8038 */ 8039 8039 export type LocalShellToolCallOutput = { 8040 + /** 8041 + * The type of the local shell tool call output. Always `local_shell_call_output`. 8042 + * 8043 + */ 8044 + type: 'local_shell_call_output'; 8040 8045 /** 8041 8046 * The unique ID of the local shell tool call generated by the model. 8042 8047 * ··· 8052 8057 * 8053 8058 */ 8054 8059 status?: 'in_progress' | 'completed' | 'incomplete'; 8055 - /** 8056 - * The type of the local shell tool call output. Always `local_shell_call_output`. 8057 - * 8058 - */ 8059 - type: 'local_shell_call_output'; 8060 8060 }; 8061 8061 8062 8062 /** ··· 8065 8065 */ 8066 8066 export type LogProbProperties = { 8067 8067 /** 8068 - * The bytes that were used to generate the log probability. 8068 + * The token that was used to generate the log probability. 8069 8069 * 8070 8070 */ 8071 - bytes: Array<number>; 8071 + token: string; 8072 8072 /** 8073 8073 * The log probability of the token. 8074 8074 * 8075 8075 */ 8076 8076 logprob: number; 8077 8077 /** 8078 - * The token that was used to generate the log probability. 8078 + * The bytes that were used to generate the log probability. 8079 8079 * 8080 8080 */ 8081 - token: string; 8081 + bytes: Array<number>; 8082 8082 }; 8083 8083 8084 8084 /** ··· 8089 8089 */ 8090 8090 export type McpApprovalRequest = { 8091 8091 /** 8092 - * A JSON string of arguments for the tool. 8092 + * The type of the item. Always `mcp_approval_request`. 8093 8093 * 8094 8094 */ 8095 - arguments: string; 8095 + type: 'mcp_approval_request'; 8096 8096 /** 8097 8097 * The unique ID of the approval request. 8098 8098 * 8099 8099 */ 8100 8100 id: string; 8101 8101 /** 8102 - * The name of the tool to run. 8102 + * The label of the MCP server making the request. 8103 8103 * 8104 8104 */ 8105 - name: string; 8105 + server_label: string; 8106 8106 /** 8107 - * The label of the MCP server making the request. 8107 + * The name of the tool to run. 8108 8108 * 8109 8109 */ 8110 - server_label: string; 8110 + name: string; 8111 8111 /** 8112 - * The type of the item. Always `mcp_approval_request`. 8112 + * A JSON string of arguments for the tool. 8113 8113 * 8114 8114 */ 8115 - type: 'mcp_approval_request'; 8115 + arguments: string; 8116 8116 }; 8117 8117 8118 8118 /** ··· 8123 8123 */ 8124 8124 export type McpApprovalResponse = { 8125 8125 /** 8126 + * The type of the item. Always `mcp_approval_response`. 8127 + * 8128 + */ 8129 + type: 'mcp_approval_response'; 8130 + /** 8131 + * The unique ID of the approval response 8132 + * 8133 + */ 8134 + id?: string; 8135 + /** 8126 8136 * The ID of the approval request being answered. 8127 8137 * 8128 8138 */ ··· 8133 8143 */ 8134 8144 approve: boolean; 8135 8145 /** 8136 - * The unique ID of the approval response 8137 - * 8138 - */ 8139 - id?: string; 8140 - /** 8141 8146 * Optional reason for the decision. 8142 8147 * 8143 8148 */ 8144 8149 reason?: string; 8145 - /** 8146 - * The type of the item. Always `mcp_approval_response`. 8147 - * 8148 - */ 8149 - type: 'mcp_approval_response'; 8150 8150 }; 8151 8151 8152 8152 /** ··· 8157 8157 */ 8158 8158 export type McpApprovalResponseResource = { 8159 8159 /** 8160 + * The type of the item. Always `mcp_approval_response`. 8161 + * 8162 + */ 8163 + type: 'mcp_approval_response'; 8164 + /** 8165 + * The unique ID of the approval response 8166 + * 8167 + */ 8168 + id: string; 8169 + /** 8160 8170 * The ID of the approval request being answered. 8161 8171 * 8162 8172 */ ··· 8167 8177 */ 8168 8178 approve: boolean; 8169 8179 /** 8170 - * The unique ID of the approval response 8171 - * 8172 - */ 8173 - id: string; 8174 - /** 8175 8180 * Optional reason for the decision. 8176 8181 * 8177 8182 */ 8178 8183 reason?: string; 8179 - /** 8180 - * The type of the item. Always `mcp_approval_response`. 8181 - * 8182 - */ 8183 - type: 'mcp_approval_response'; 8184 8184 }; 8185 8185 8186 8186 /** ··· 8191 8191 */ 8192 8192 export type McpListTools = { 8193 8193 /** 8194 - * Error message if the server could not list tools. 8194 + * The type of the item. Always `mcp_list_tools`. 8195 8195 * 8196 8196 */ 8197 - error?: string; 8197 + type: 'mcp_list_tools'; 8198 8198 /** 8199 8199 * The unique ID of the list. 8200 8200 * ··· 8211 8211 */ 8212 8212 tools: Array<McpListToolsTool>; 8213 8213 /** 8214 - * The type of the item. Always `mcp_list_tools`. 8214 + * Error message if the server could not list tools. 8215 8215 * 8216 8216 */ 8217 - type: 'mcp_list_tools'; 8217 + error?: string; 8218 8218 }; 8219 8219 8220 8220 /** ··· 8225 8225 */ 8226 8226 export type McpListToolsTool = { 8227 8227 /** 8228 - * Additional annotations about the tool. 8228 + * The name of the tool. 8229 8229 * 8230 8230 */ 8231 - annotations?: { 8232 - [key: string]: unknown; 8233 - }; 8231 + name: string; 8234 8232 /** 8235 8233 * The description of the tool. 8236 8234 * ··· 8244 8242 [key: string]: unknown; 8245 8243 }; 8246 8244 /** 8247 - * The name of the tool. 8245 + * Additional annotations about the tool. 8248 8246 * 8249 8247 */ 8250 - name: string; 8248 + annotations?: { 8249 + [key: string]: unknown; 8250 + }; 8251 8251 }; 8252 8252 8253 8253 /** ··· 8259 8259 */ 8260 8260 export type McpTool = { 8261 8261 /** 8262 + * The type of the MCP tool. Always `mcp`. 8263 + */ 8264 + type: 'mcp'; 8265 + /** 8266 + * A label for this MCP server, used to identify it in tool calls. 8267 + * 8268 + */ 8269 + server_label: string; 8270 + /** 8271 + * The URL for the MCP server. 8272 + * 8273 + */ 8274 + server_url: string; 8275 + /** 8276 + * Optional description of the MCP server, used to provide more context. 8277 + * 8278 + */ 8279 + server_description?: string; 8280 + /** 8281 + * Optional HTTP headers to send to the MCP server. Use for authentication 8282 + * or other purposes. 8283 + * 8284 + */ 8285 + headers?: { 8286 + [key: string]: string; 8287 + }; 8288 + /** 8262 8289 * List of allowed tool names or a filter object. 8263 8290 * 8264 8291 */ ··· 8272 8299 */ 8273 8300 tool_names?: Array<string>; 8274 8301 }; 8275 - /** 8276 - * Optional HTTP headers to send to the MCP server. Use for authentication 8277 - * or other purposes. 8278 - * 8279 - */ 8280 - headers?: { 8281 - [key: string]: string; 8282 - }; 8283 8302 /** 8284 8303 * Specify which of the MCP server's tools require approval. 8285 8304 */ ··· 8308 8327 } 8309 8328 | 'always' 8310 8329 | 'never'; 8311 - /** 8312 - * Optional description of the MCP server, used to provide more context. 8313 - * 8314 - */ 8315 - server_description?: string; 8316 - /** 8317 - * A label for this MCP server, used to identify it in tool calls. 8318 - * 8319 - */ 8320 - server_label: string; 8321 - /** 8322 - * The URL for the MCP server. 8323 - * 8324 - */ 8325 - server_url: string; 8326 - /** 8327 - * The type of the MCP tool. Always `mcp`. 8328 - */ 8329 - type: 'mcp'; 8330 8330 }; 8331 8331 8332 8332 /** ··· 8337 8337 */ 8338 8338 export type McpToolCall = { 8339 8339 /** 8340 - * A JSON string of the arguments passed to the tool. 8340 + * The type of the item. Always `mcp_call`. 8341 8341 * 8342 8342 */ 8343 - arguments: string; 8343 + type: 'mcp_call'; 8344 8344 /** 8345 - * The error from the tool call, if any. 8345 + * The unique ID of the tool call. 8346 8346 * 8347 8347 */ 8348 - error?: string; 8348 + id: string; 8349 8349 /** 8350 - * The unique ID of the tool call. 8350 + * The label of the MCP server running the tool. 8351 8351 * 8352 8352 */ 8353 - id: string; 8353 + server_label: string; 8354 8354 /** 8355 8355 * The name of the tool that was run. 8356 8356 * 8357 8357 */ 8358 8358 name: string; 8359 8359 /** 8360 - * The output from the tool call. 8360 + * A JSON string of the arguments passed to the tool. 8361 8361 * 8362 8362 */ 8363 - output?: string; 8363 + arguments: string; 8364 8364 /** 8365 - * The label of the MCP server running the tool. 8365 + * The output from the tool call. 8366 8366 * 8367 8367 */ 8368 - server_label: string; 8368 + output?: string; 8369 8369 /** 8370 - * The type of the item. Always `mcp_call`. 8370 + * The error from the tool call, if any. 8371 8371 * 8372 8372 */ 8373 - type: 'mcp_call'; 8373 + error?: string; 8374 8374 }; 8375 8375 8376 8376 /** ··· 8379 8379 * References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. 8380 8380 */ 8381 8381 export type MessageContentImageFileObject = { 8382 + /** 8383 + * Always `image_file`. 8384 + */ 8385 + type: 'image_file'; 8382 8386 image_file: { 8387 + /** 8388 + * The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. 8389 + */ 8390 + file_id: string; 8383 8391 /** 8384 8392 * Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`. 8385 8393 */ 8386 8394 detail?: 'auto' | 'low' | 'high'; 8387 - /** 8388 - * The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. 8389 - */ 8390 - file_id: string; 8391 8395 }; 8392 - /** 8393 - * Always `image_file`. 8394 - */ 8395 - type: 'image_file'; 8396 8396 }; 8397 8397 8398 8398 /** ··· 8401 8401 * References an image URL in the content of a message. 8402 8402 */ 8403 8403 export type MessageContentImageUrlObject = { 8404 + /** 8405 + * The type of the content part. 8406 + */ 8407 + type: 'image_url'; 8404 8408 image_url: { 8405 8409 /** 8410 + * The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. 8411 + */ 8412 + url: string; 8413 + /** 8406 8414 * Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto` 8407 8415 */ 8408 8416 detail?: 'auto' | 'low' | 'high'; 8409 - /** 8410 - * The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. 8411 - */ 8412 - url: string; 8413 8417 }; 8414 - /** 8415 - * The type of the content part. 8416 - */ 8417 - type: 'image_url'; 8418 8418 }; 8419 8419 8420 8420 /** ··· 8423 8423 * The refusal content generated by the assistant. 8424 8424 */ 8425 8425 export type MessageContentRefusalObject = { 8426 - refusal: string; 8427 8426 /** 8428 8427 * Always `refusal`. 8429 8428 */ 8430 8429 type: 'refusal'; 8430 + refusal: string; 8431 8431 }; 8432 8432 8433 8433 /** ··· 8436 8436 * A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. 8437 8437 */ 8438 8438 export type MessageContentTextAnnotationsFileCitationObject = { 8439 - end_index: number; 8439 + /** 8440 + * Always `file_citation`. 8441 + */ 8442 + type: 'file_citation'; 8443 + /** 8444 + * The text in the message content that needs to be replaced. 8445 + */ 8446 + text: string; 8440 8447 file_citation: { 8441 8448 /** 8442 8449 * The ID of the specific File the citation is from. ··· 8444 8451 file_id: string; 8445 8452 }; 8446 8453 start_index: number; 8447 - /** 8448 - * The text in the message content that needs to be replaced. 8449 - */ 8450 - text: string; 8451 - /** 8452 - * Always `file_citation`. 8453 - */ 8454 - type: 'file_citation'; 8454 + end_index: number; 8455 8455 }; 8456 8456 8457 8457 /** ··· 8460 8460 * A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. 8461 8461 */ 8462 8462 export type MessageContentTextAnnotationsFilePathObject = { 8463 - end_index: number; 8463 + /** 8464 + * Always `file_path`. 8465 + */ 8466 + type: 'file_path'; 8467 + /** 8468 + * The text in the message content that needs to be replaced. 8469 + */ 8470 + text: string; 8464 8471 file_path: { 8465 8472 /** 8466 8473 * The ID of the file that was generated. ··· 8468 8475 file_id: string; 8469 8476 }; 8470 8477 start_index: number; 8471 - /** 8472 - * The text in the message content that needs to be replaced. 8473 - */ 8474 - text: string; 8475 - /** 8476 - * Always `file_path`. 8477 - */ 8478 - type: 'file_path'; 8478 + end_index: number; 8479 8479 }; 8480 8480 8481 8481 /** ··· 8484 8484 * The text content that is part of a message. 8485 8485 */ 8486 8486 export type MessageContentTextObject = { 8487 + /** 8488 + * Always `text`. 8489 + */ 8490 + type: 'text'; 8487 8491 text: { 8488 - annotations: Array<TextAnnotation>; 8489 8492 /** 8490 8493 * The data that makes up the text. 8491 8494 */ 8492 8495 value: string; 8496 + annotations: Array<TextAnnotation>; 8493 8497 }; 8494 - /** 8495 - * Always `text`. 8496 - */ 8497 - type: 'text'; 8498 8498 }; 8499 8499 8500 8500 /** ··· 8503 8503 * References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. 8504 8504 */ 8505 8505 export type MessageDeltaContentImageFileObject = { 8506 - image_file?: { 8507 - /** 8508 - * Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`. 8509 - */ 8510 - detail?: 'auto' | 'low' | 'high'; 8511 - /** 8512 - * The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. 8513 - */ 8514 - file_id?: string; 8515 - }; 8516 8506 /** 8517 8507 * The index of the content part in the message. 8518 8508 */ ··· 8521 8511 * Always `image_file`. 8522 8512 */ 8523 8513 type: 'image_file'; 8514 + image_file?: { 8515 + /** 8516 + * The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. 8517 + */ 8518 + file_id?: string; 8519 + /** 8520 + * Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`. 8521 + */ 8522 + detail?: 'auto' | 'low' | 'high'; 8523 + }; 8524 8524 }; 8525 8525 8526 8526 /** ··· 8529 8529 * References an image URL in the content of a message. 8530 8530 */ 8531 8531 export type MessageDeltaContentImageUrlObject = { 8532 - image_url?: { 8533 - /** 8534 - * Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. 8535 - */ 8536 - detail?: 'auto' | 'low' | 'high'; 8537 - /** 8538 - * The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. 8539 - */ 8540 - url?: string; 8541 - }; 8542 8532 /** 8543 8533 * The index of the content part in the message. 8544 8534 */ ··· 8547 8537 * Always `image_url`. 8548 8538 */ 8549 8539 type: 'image_url'; 8540 + image_url?: { 8541 + /** 8542 + * The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. 8543 + */ 8544 + url?: string; 8545 + /** 8546 + * Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. 8547 + */ 8548 + detail?: 'auto' | 'low' | 'high'; 8549 + }; 8550 8550 }; 8551 8551 8552 8552 /** ··· 8559 8559 * The index of the refusal part in the message. 8560 8560 */ 8561 8561 index: number; 8562 - refusal?: string; 8563 8562 /** 8564 8563 * Always `refusal`. 8565 8564 */ 8566 8565 type: 'refusal'; 8566 + refusal?: string; 8567 8567 }; 8568 8568 8569 8569 /** ··· 8572 8572 * A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. 8573 8573 */ 8574 8574 export type MessageDeltaContentTextAnnotationsFileCitationObject = { 8575 - end_index?: number; 8575 + /** 8576 + * The index of the annotation in the text content part. 8577 + */ 8578 + index: number; 8579 + /** 8580 + * Always `file_citation`. 8581 + */ 8582 + type: 'file_citation'; 8583 + /** 8584 + * The text in the message content that needs to be replaced. 8585 + */ 8586 + text?: string; 8576 8587 file_citation?: { 8577 8588 /** 8578 8589 * The ID of the specific File the citation is from. ··· 8583 8594 */ 8584 8595 quote?: string; 8585 8596 }; 8586 - /** 8587 - * The index of the annotation in the text content part. 8588 - */ 8589 - index: number; 8590 8597 start_index?: number; 8591 - /** 8592 - * The text in the message content that needs to be replaced. 8593 - */ 8594 - text?: string; 8595 - /** 8596 - * Always `file_citation`. 8597 - */ 8598 - type: 'file_citation'; 8598 + end_index?: number; 8599 8599 }; 8600 8600 8601 8601 /** ··· 8604 8604 * A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. 8605 8605 */ 8606 8606 export type MessageDeltaContentTextAnnotationsFilePathObject = { 8607 - end_index?: number; 8608 - file_path?: { 8609 - /** 8610 - * The ID of the file that was generated. 8611 - */ 8612 - file_id?: string; 8613 - }; 8614 8607 /** 8615 8608 * The index of the annotation in the text content part. 8616 8609 */ 8617 8610 index: number; 8618 - start_index?: number; 8611 + /** 8612 + * Always `file_path`. 8613 + */ 8614 + type: 'file_path'; 8619 8615 /** 8620 8616 * The text in the message content that needs to be replaced. 8621 8617 */ 8622 8618 text?: string; 8623 - /** 8624 - * Always `file_path`. 8625 - */ 8626 - type: 'file_path'; 8619 + file_path?: { 8620 + /** 8621 + * The ID of the file that was generated. 8622 + */ 8623 + file_id?: string; 8624 + }; 8625 + start_index?: number; 8626 + end_index?: number; 8627 8627 }; 8628 8628 8629 8629 /** ··· 8636 8636 * The index of the content part in the message. 8637 8637 */ 8638 8638 index: number; 8639 + /** 8640 + * Always `text`. 8641 + */ 8642 + type: 'text'; 8639 8643 text?: { 8640 - annotations?: Array<TextAnnotationDelta>; 8641 8644 /** 8642 8645 * The data that makes up the text. 8643 8646 */ 8644 8647 value?: string; 8648 + annotations?: Array<TextAnnotationDelta>; 8645 8649 }; 8646 - /** 8647 - * Always `text`. 8648 - */ 8649 - type: 'text'; 8650 8650 }; 8651 8651 8652 8652 /** ··· 8657 8657 */ 8658 8658 export type MessageDeltaObject = { 8659 8659 /** 8660 + * The identifier of the message, which can be referenced in API endpoints. 8661 + */ 8662 + id: string; 8663 + /** 8664 + * The object type, which is always `thread.message.delta`. 8665 + */ 8666 + object: 'thread.message.delta'; 8667 + /** 8660 8668 * The delta containing the fields that have changed on the Message. 8661 8669 */ 8662 8670 delta: { 8663 8671 /** 8672 + * The entity that produced the message. One of `user` or `assistant`. 8673 + */ 8674 + role?: 'user' | 'assistant'; 8675 + /** 8664 8676 * The content of the message in array of text and/or images. 8665 8677 */ 8666 8678 content?: Array<MessageContentDelta>; 8667 - /** 8668 - * The entity that produced the message. One of `user` or `assistant`. 8669 - */ 8670 - role?: 'user' | 'assistant'; 8671 8679 }; 8672 - /** 8673 - * The identifier of the message, which can be referenced in API endpoints. 8674 - */ 8675 - id: string; 8676 - /** 8677 - * The object type, which is always `thread.message.delta`. 8678 - */ 8679 - object: 'thread.message.delta'; 8680 8680 }; 8681 8681 8682 8682 /** ··· 8686 8686 */ 8687 8687 export type MessageObject = { 8688 8688 /** 8689 - * If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message. 8689 + * The identifier, which can be referenced in API endpoints. 8690 8690 */ 8691 - assistant_id: string; 8692 - /** 8693 - * A list of files attached to the message, and the tools they were added to. 8694 - */ 8695 - attachments: Array<{ 8696 - /** 8697 - * The ID of the file to attach to the message. 8698 - */ 8699 - file_id?: string; 8700 - /** 8701 - * The tools to add this file to. 8702 - */ 8703 - tools?: Array<AssistantToolsCode | AssistantToolsFileSearchTypeOnly>; 8704 - }>; 8705 - /** 8706 - * The Unix timestamp (in seconds) for when the message was completed. 8707 - */ 8708 - completed_at: number; 8691 + id: string; 8709 8692 /** 8710 - * The content of the message in array of text and/or images. 8693 + * The object type, which is always `thread.message`. 8711 8694 */ 8712 - content: Array<MessageContent>; 8695 + object: 'thread.message'; 8713 8696 /** 8714 8697 * The Unix timestamp (in seconds) for when the message was created. 8715 8698 */ 8716 8699 created_at: number; 8717 8700 /** 8718 - * The identifier, which can be referenced in API endpoints. 8701 + * The [thread](https://platform.openai.com/docs/api-reference/threads) ID that this message belongs to. 8719 8702 */ 8720 - id: string; 8703 + thread_id: string; 8721 8704 /** 8722 - * The Unix timestamp (in seconds) for when the message was marked as incomplete. 8705 + * The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. 8723 8706 */ 8724 - incomplete_at: number; 8707 + status: 'in_progress' | 'incomplete' | 'completed'; 8725 8708 /** 8726 8709 * On an incomplete message, details about why the message is incomplete. 8727 8710 */ ··· 8736 8719 | 'run_expired' 8737 8720 | 'run_failed'; 8738 8721 }; 8739 - metadata: Metadata; 8740 8722 /** 8741 - * The object type, which is always `thread.message`. 8723 + * The Unix timestamp (in seconds) for when the message was completed. 8742 8724 */ 8743 - object: 'thread.message'; 8725 + completed_at: number; 8726 + /** 8727 + * The Unix timestamp (in seconds) for when the message was marked as incomplete. 8728 + */ 8729 + incomplete_at: number; 8744 8730 /** 8745 8731 * The entity that produced the message. One of `user` or `assistant`. 8746 8732 */ 8747 8733 role: 'user' | 'assistant'; 8748 8734 /** 8749 - * The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. 8735 + * The content of the message in array of text and/or images. 8750 8736 */ 8751 - run_id: string; 8737 + content: Array<MessageContent>; 8752 8738 /** 8753 - * The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. 8739 + * If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message. 8754 8740 */ 8755 - status: 'in_progress' | 'incomplete' | 'completed'; 8741 + assistant_id: string; 8756 8742 /** 8757 - * The [thread](https://platform.openai.com/docs/api-reference/threads) ID that this message belongs to. 8743 + * The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. 8758 8744 */ 8759 - thread_id: string; 8745 + run_id: string; 8746 + /** 8747 + * A list of files attached to the message, and the tools they were added to. 8748 + */ 8749 + attachments: Array<{ 8750 + /** 8751 + * The ID of the file to attach to the message. 8752 + */ 8753 + file_id?: string; 8754 + /** 8755 + * The tools to add this file to. 8756 + */ 8757 + tools?: Array<AssistantToolsCode | AssistantToolsFileSearchTypeOnly>; 8758 + }>; 8759 + metadata: Metadata; 8760 8760 }; 8761 8761 8762 8762 /** ··· 8766 8766 */ 8767 8767 export type MessageRequestContentTextObject = { 8768 8768 /** 8769 + * Always `text`. 8770 + */ 8771 + type: 'text'; 8772 + /** 8769 8773 * Text content to be sent to the model 8770 8774 */ 8771 8775 text: string; 8772 - /** 8773 - * Always `text`. 8774 - */ 8775 - type: 'text'; 8776 8776 }; 8777 8777 8778 8778 export type MessageStreamEvent = 8779 8779 | { 8780 + event: 'thread.message.created'; 8780 8781 data: MessageObject; 8781 - event: 'thread.message.created'; 8782 8782 } 8783 8783 | { 8784 - data: MessageObject; 8785 8784 event: 'thread.message.in_progress'; 8785 + data: MessageObject; 8786 8786 } 8787 8787 | { 8788 + event: 'thread.message.delta'; 8788 8789 data: MessageDeltaObject; 8789 - event: 'thread.message.delta'; 8790 8790 } 8791 8791 | { 8792 - data: MessageObject; 8793 8792 event: 'thread.message.completed'; 8793 + data: MessageObject; 8794 8794 } 8795 8795 | { 8796 - data: MessageObject; 8797 8796 event: 'thread.message.incomplete'; 8797 + data: MessageObject; 8798 8798 }; 8799 8799 8800 8800 /** ··· 8817 8817 */ 8818 8818 export type Model = { 8819 8819 /** 8820 - * The Unix timestamp (in seconds) when the model was created. 8821 - */ 8822 - created: number; 8823 - /** 8824 8820 * The model identifier, which can be referenced in the API endpoints. 8825 8821 */ 8826 8822 id: string; 8823 + /** 8824 + * The Unix timestamp (in seconds) when the model was created. 8825 + */ 8826 + created: number; 8827 8827 /** 8828 8828 * The object type, which is always "model". 8829 8829 */ ··· 8854 8854 export type ModelResponseProperties = { 8855 8855 metadata?: Metadata; 8856 8856 /** 8857 - * Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). 8858 - * 8859 - */ 8860 - prompt_cache_key?: string; 8861 - /** 8862 - * A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. 8863 - * The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). 8857 + * An integer between 0 and 20 specifying the number of most likely tokens to 8858 + * return at each token position, each with an associated log probability. 8864 8859 * 8865 8860 */ 8866 - safety_identifier?: string; 8867 - service_tier?: ServiceTier; 8861 + top_logprobs?: number; 8868 8862 /** 8869 8863 * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 8870 8864 * We generally recommend altering this or `top_p` but not both. 8871 8865 * 8872 8866 */ 8873 8867 temperature?: number; 8874 - /** 8875 - * An integer between 0 and 20 specifying the number of most likely tokens to 8876 - * return at each token position, each with an associated log probability. 8877 - * 8878 - */ 8879 - top_logprobs?: number; 8880 8868 /** 8881 8869 * An alternative to sampling with temperature, called nucleus sampling, 8882 8870 * where the model considers the results of the tokens with top_p probability ··· 8896 8884 * @deprecated 8897 8885 */ 8898 8886 user?: string; 8899 - }; 8900 - 8901 - export type ModifyAssistantRequest = { 8902 8887 /** 8903 - * The description of the assistant. The maximum length is 512 characters. 8888 + * A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. 8889 + * The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). 8904 8890 * 8905 8891 */ 8906 - description?: string; 8892 + safety_identifier?: string; 8907 8893 /** 8908 - * The system instructions that the assistant uses. The maximum length is 256,000 characters. 8894 + * Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). 8909 8895 * 8910 8896 */ 8911 - instructions?: string; 8912 - metadata?: Metadata; 8897 + prompt_cache_key?: string; 8898 + service_tier?: ServiceTier; 8899 + }; 8900 + 8901 + export type ModifyAssistantRequest = { 8913 8902 /** 8914 8903 * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. 8915 8904 * 8916 8905 */ 8917 8906 model?: string | AssistantSupportedModels; 8907 + reasoning_effort?: ReasoningEffort; 8918 8908 /** 8919 8909 * The name of the assistant. The maximum length is 256 characters. 8920 8910 * 8921 8911 */ 8922 8912 name?: string; 8923 - reasoning_effort?: ReasoningEffort; 8924 - response_format?: AssistantsApiResponseFormatOption; 8913 + /** 8914 + * The description of the assistant. The maximum length is 512 characters. 8915 + * 8916 + */ 8917 + description?: string; 8918 + /** 8919 + * The system instructions that the assistant uses. The maximum length is 256,000 characters. 8920 + * 8921 + */ 8922 + instructions?: string; 8925 8923 /** 8926 - * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 8924 + * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. 8927 8925 * 8928 8926 */ 8929 - temperature?: number; 8927 + tools?: Array<AssistantTool>; 8930 8928 /** 8931 8929 * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. 8932 8930 * ··· 8947 8945 vector_store_ids?: Array<string>; 8948 8946 }; 8949 8947 }; 8948 + metadata?: Metadata; 8950 8949 /** 8951 - * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. 8950 + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 8952 8951 * 8953 8952 */ 8954 - tools?: Array<AssistantTool>; 8953 + temperature?: number; 8955 8954 /** 8956 8955 * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. 8957 8956 * ··· 8959 8958 * 8960 8959 */ 8961 8960 top_p?: number; 8961 + response_format?: AssistantsApiResponseFormatOption; 8962 8962 }; 8963 8963 8964 8964 export type ModifyCertificateRequest = { ··· 8977 8977 }; 8978 8978 8979 8979 export type ModifyThreadRequest = { 8980 - metadata?: Metadata; 8981 8980 /** 8982 8981 * A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. 8983 8982 * ··· 8998 8997 vector_store_ids?: Array<string>; 8999 8998 }; 9000 8999 }; 9000 + metadata?: Metadata; 9001 9001 }; 9002 9002 9003 9003 /** ··· 9032 9032 */ 9033 9033 export type OpenAiFile = { 9034 9034 /** 9035 + * The file identifier, which can be referenced in the API endpoints. 9036 + */ 9037 + id: string; 9038 + /** 9035 9039 * The size of the file, in bytes. 9036 9040 */ 9037 9041 bytes: number; ··· 9047 9051 * The name of the file. 9048 9052 */ 9049 9053 filename: string; 9050 - /** 9051 - * The file identifier, which can be referenced in the API endpoints. 9052 - */ 9053 - id: string; 9054 9054 /** 9055 9055 * The object type, which is always `file`. 9056 9056 */ ··· 9100 9100 * 9101 9101 */ 9102 9102 export type OutputAudio = { 9103 + /** 9104 + * The type of the output audio. Always `output_audio`. 9105 + * 9106 + */ 9107 + type: 'output_audio'; 9103 9108 /** 9104 9109 * Base64-encoded audio data from the model. 9105 9110 * ··· 9110 9115 * 9111 9116 */ 9112 9117 transcript: string; 9113 - /** 9114 - * The type of the output audio. Always `output_audio`. 9115 - * 9116 - */ 9117 - type: 'output_audio'; 9118 9118 }; 9119 9119 9120 9120 export type OutputContent = ··· 9174 9174 */ 9175 9175 export type OutputMessage = { 9176 9176 /** 9177 - * The content of the output message. 9177 + * The unique ID of the output message. 9178 9178 * 9179 9179 */ 9180 - content: Array<OutputContent>; 9180 + id: string; 9181 9181 /** 9182 - * The unique ID of the output message. 9182 + * The type of the output message. Always `message`. 9183 9183 * 9184 9184 */ 9185 - id: string; 9185 + type: 'message'; 9186 9186 /** 9187 9187 * The role of the output message. Always `assistant`. 9188 9188 * 9189 9189 */ 9190 9190 role: 'assistant'; 9191 9191 /** 9192 + * The content of the output message. 9193 + * 9194 + */ 9195 + content: Array<OutputContent>; 9196 + /** 9192 9197 * The status of the message input. One of `in_progress`, `completed`, or 9193 9198 * `incomplete`. Populated when input items are returned via API. 9194 9199 * 9195 9200 */ 9196 9201 status: 'in_progress' | 'completed' | 'incomplete'; 9197 - /** 9198 - * The type of the output message. Always `message`. 9199 - * 9200 - */ 9201 - type: 'message'; 9202 9202 }; 9203 9203 9204 9204 /** ··· 9226 9226 */ 9227 9227 export type PredictionContent = { 9228 9228 /** 9229 + * The type of the predicted content you want to provide. This type is 9230 + * currently always `content`. 9231 + * 9232 + */ 9233 + type: 'content'; 9234 + /** 9229 9235 * The content that should be matched when generating a model response. 9230 9236 * If generated tokens would match this content, the entire model response 9231 9237 * can be returned much more quickly. 9232 9238 * 9233 9239 */ 9234 9240 content: string | Array<ChatCompletionRequestMessageContentPartText>; 9235 - /** 9236 - * The type of the predicted content you want to provide. This type is 9237 - * currently always `content`. 9238 - * 9239 - */ 9240 - type: 'content'; 9241 9241 }; 9242 9242 9243 9243 /** ··· 9245 9245 */ 9246 9246 export type Project = { 9247 9247 /** 9248 - * The Unix timestamp (in seconds) of when the project was archived or `null`. 9248 + * The identifier, which can be referenced in API endpoints 9249 9249 */ 9250 - archived_at?: number; 9250 + id: string; 9251 9251 /** 9252 - * The Unix timestamp (in seconds) of when the project was created. 9252 + * The object type, which is always `organization.project` 9253 9253 */ 9254 - created_at: number; 9255 - /** 9256 - * The identifier, which can be referenced in API endpoints 9257 - */ 9258 - id: string; 9254 + object: 'organization.project'; 9259 9255 /** 9260 9256 * The name of the project. This appears in reporting. 9261 9257 */ 9262 9258 name: string; 9263 9259 /** 9264 - * The object type, which is always `organization.project` 9260 + * The Unix timestamp (in seconds) of when the project was created. 9265 9261 */ 9266 - object: 'organization.project'; 9262 + created_at: number; 9263 + /** 9264 + * The Unix timestamp (in seconds) of when the project was archived or `null`. 9265 + */ 9266 + archived_at?: number; 9267 9267 /** 9268 9268 * `active` or `archived` 9269 9269 */ ··· 9275 9275 */ 9276 9276 export type ProjectApiKey = { 9277 9277 /** 9278 - * The Unix timestamp (in seconds) of when the API key was created 9279 - */ 9280 - created_at: number; 9281 - /** 9282 - * The identifier, which can be referenced in API endpoints 9278 + * The object type, which is always `organization.project.api_key` 9283 9279 */ 9284 - id: string; 9280 + object: 'organization.project.api_key'; 9285 9281 /** 9286 - * The Unix timestamp (in seconds) of when the API key was last used. 9282 + * The redacted value of the API key 9287 9283 */ 9288 - last_used_at: number; 9284 + redacted_value: string; 9289 9285 /** 9290 9286 * The name of the API key 9291 9287 */ 9292 9288 name: string; 9293 9289 /** 9294 - * The object type, which is always `organization.project.api_key` 9290 + * The Unix timestamp (in seconds) of when the API key was created 9291 + */ 9292 + created_at: number; 9293 + /** 9294 + * The Unix timestamp (in seconds) of when the API key was last used. 9295 9295 */ 9296 - object: 'organization.project.api_key'; 9296 + last_used_at: number; 9297 + /** 9298 + * The identifier, which can be referenced in API endpoints 9299 + */ 9300 + id: string; 9297 9301 owner: { 9298 - service_account?: ProjectServiceAccount; 9299 9302 /** 9300 9303 * `user` or `service_account` 9301 9304 */ 9302 9305 type?: 'user' | 'service_account'; 9303 9306 user?: ProjectUser; 9307 + service_account?: ProjectServiceAccount; 9304 9308 }; 9305 - /** 9306 - * The redacted value of the API key 9307 - */ 9308 - redacted_value: string; 9309 9309 }; 9310 9310 9311 9311 export type ProjectApiKeyDeleteResponse = { 9312 - deleted: boolean; 9313 - id: string; 9314 9312 object: 'organization.project.api_key.deleted'; 9313 + id: string; 9314 + deleted: boolean; 9315 9315 }; 9316 9316 9317 9317 export type ProjectApiKeyListResponse = { 9318 + object: 'list'; 9318 9319 data: Array<ProjectApiKey>; 9319 9320 first_id: string; 9320 - has_more: boolean; 9321 9321 last_id: string; 9322 - object: 'list'; 9322 + has_more: boolean; 9323 9323 }; 9324 9324 9325 9325 export type ProjectCreateRequest = { ··· 9330 9330 }; 9331 9331 9332 9332 export type ProjectListResponse = { 9333 + object: 'list'; 9333 9334 data: Array<Project>; 9334 9335 first_id: string; 9335 - has_more: boolean; 9336 9336 last_id: string; 9337 - object: 'list'; 9337 + has_more: boolean; 9338 9338 }; 9339 9339 9340 9340 /** ··· 9342 9342 */ 9343 9343 export type ProjectRateLimit = { 9344 9344 /** 9345 - * The maximum batch input tokens per day. Only present for relevant models. 9345 + * The object type, which is always `project.rate_limit` 9346 9346 */ 9347 - batch_1_day_max_input_tokens?: number; 9347 + object: 'project.rate_limit'; 9348 9348 /** 9349 9349 * The identifier, which can be referenced in API endpoints. 9350 9350 */ 9351 9351 id: string; 9352 9352 /** 9353 - * The maximum audio megabytes per minute. Only present for relevant models. 9354 - */ 9355 - max_audio_megabytes_per_1_minute?: number; 9356 - /** 9357 - * The maximum images per minute. Only present for relevant models. 9353 + * The model this rate limit applies to. 9358 9354 */ 9359 - max_images_per_1_minute?: number; 9360 - /** 9361 - * The maximum requests per day. Only present for relevant models. 9362 - */ 9363 - max_requests_per_1_day?: number; 9355 + model: string; 9364 9356 /** 9365 9357 * The maximum requests per minute. 9366 9358 */ ··· 9370 9362 */ 9371 9363 max_tokens_per_1_minute: number; 9372 9364 /** 9373 - * The model this rate limit applies to. 9365 + * The maximum images per minute. Only present for relevant models. 9374 9366 */ 9375 - model: string; 9367 + max_images_per_1_minute?: number; 9376 9368 /** 9377 - * The object type, which is always `project.rate_limit` 9369 + * The maximum audio megabytes per minute. Only present for relevant models. 9378 9370 */ 9379 - object: 'project.rate_limit'; 9371 + max_audio_megabytes_per_1_minute?: number; 9372 + /** 9373 + * The maximum requests per day. Only present for relevant models. 9374 + */ 9375 + max_requests_per_1_day?: number; 9376 + /** 9377 + * The maximum batch input tokens per day. Only present for relevant models. 9378 + */ 9379 + batch_1_day_max_input_tokens?: number; 9380 9380 }; 9381 9381 9382 9382 export type ProjectRateLimitListResponse = { 9383 + object: 'list'; 9383 9384 data: Array<ProjectRateLimit>; 9384 9385 first_id: string; 9386 + last_id: string; 9385 9387 has_more: boolean; 9386 - last_id: string; 9387 - object: 'list'; 9388 9388 }; 9389 9389 9390 9390 export type ProjectRateLimitUpdateRequest = { 9391 9391 /** 9392 - * The maximum batch input tokens per day. Only relevant for certain models. 9392 + * The maximum requests per minute. 9393 9393 */ 9394 - batch_1_day_max_input_tokens?: number; 9394 + max_requests_per_1_minute?: number; 9395 9395 /** 9396 - * The maximum audio megabytes per minute. Only relevant for certain models. 9396 + * The maximum tokens per minute. 9397 9397 */ 9398 - max_audio_megabytes_per_1_minute?: number; 9398 + max_tokens_per_1_minute?: number; 9399 9399 /** 9400 9400 * The maximum images per minute. Only relevant for certain models. 9401 9401 */ 9402 9402 max_images_per_1_minute?: number; 9403 9403 /** 9404 + * The maximum audio megabytes per minute. Only relevant for certain models. 9405 + */ 9406 + max_audio_megabytes_per_1_minute?: number; 9407 + /** 9404 9408 * The maximum requests per day. Only relevant for certain models. 9405 9409 */ 9406 9410 max_requests_per_1_day?: number; 9407 9411 /** 9408 - * The maximum requests per minute. 9412 + * The maximum batch input tokens per day. Only relevant for certain models. 9409 9413 */ 9410 - max_requests_per_1_minute?: number; 9411 - /** 9412 - * The maximum tokens per minute. 9413 - */ 9414 - max_tokens_per_1_minute?: number; 9414 + batch_1_day_max_input_tokens?: number; 9415 9415 }; 9416 9416 9417 9417 /** ··· 9419 9419 */ 9420 9420 export type ProjectServiceAccount = { 9421 9421 /** 9422 - * The Unix timestamp (in seconds) of when the service account was created 9422 + * The object type, which is always `organization.project.service_account` 9423 9423 */ 9424 - created_at: number; 9424 + object: 'organization.project.service_account'; 9425 9425 /** 9426 9426 * The identifier, which can be referenced in API endpoints 9427 9427 */ ··· 9431 9431 */ 9432 9432 name: string; 9433 9433 /** 9434 - * The object type, which is always `organization.project.service_account` 9435 - */ 9436 - object: 'organization.project.service_account'; 9437 - /** 9438 9434 * `owner` or `member` 9439 9435 */ 9440 9436 role: 'owner' | 'member'; 9437 + /** 9438 + * The Unix timestamp (in seconds) of when the service account was created 9439 + */ 9440 + created_at: number; 9441 9441 }; 9442 9442 9443 9443 export type ProjectServiceAccountApiKey = { 9444 - created_at: number; 9445 - id: string; 9446 - name: string; 9447 9444 /** 9448 9445 * The object type, which is always `organization.project.service_account.api_key` 9449 9446 */ 9450 9447 object: 'organization.project.service_account.api_key'; 9451 9448 value: string; 9449 + name: string; 9450 + created_at: number; 9451 + id: string; 9452 9452 }; 9453 9453 9454 9454 export type ProjectServiceAccountCreateRequest = { ··· 9459 9459 }; 9460 9460 9461 9461 export type ProjectServiceAccountCreateResponse = { 9462 - api_key: ProjectServiceAccountApiKey; 9463 - created_at: number; 9462 + object: 'organization.project.service_account'; 9464 9463 id: string; 9465 9464 name: string; 9466 - object: 'organization.project.service_account'; 9467 9465 /** 9468 9466 * Service accounts can only have one role of type `member` 9469 9467 */ 9470 9468 role: 'member'; 9469 + created_at: number; 9470 + api_key: ProjectServiceAccountApiKey; 9471 9471 }; 9472 9472 9473 9473 export type ProjectServiceAccountDeleteResponse = { 9474 - deleted: boolean; 9474 + object: 'organization.project.service_account.deleted'; 9475 9475 id: string; 9476 - object: 'organization.project.service_account.deleted'; 9476 + deleted: boolean; 9477 9477 }; 9478 9478 9479 9479 export type ProjectServiceAccountListResponse = { 9480 + object: 'list'; 9480 9481 data: Array<ProjectServiceAccount>; 9481 9482 first_id: string; 9483 + last_id: string; 9482 9484 has_more: boolean; 9483 - last_id: string; 9484 - object: 'list'; 9485 9485 }; 9486 9486 9487 9487 export type ProjectUpdateRequest = { ··· 9496 9496 */ 9497 9497 export type ProjectUser = { 9498 9498 /** 9499 - * The Unix timestamp (in seconds) of when the project was added. 9500 - */ 9501 - added_at: number; 9502 - /** 9503 - * The email address of the user 9499 + * The object type, which is always `organization.project.user` 9504 9500 */ 9505 - email: string; 9501 + object: 'organization.project.user'; 9506 9502 /** 9507 9503 * The identifier, which can be referenced in API endpoints 9508 9504 */ ··· 9512 9508 */ 9513 9509 name: string; 9514 9510 /** 9515 - * The object type, which is always `organization.project.user` 9511 + * The email address of the user 9516 9512 */ 9517 - object: 'organization.project.user'; 9513 + email: string; 9518 9514 /** 9519 9515 * `owner` or `member` 9520 9516 */ 9521 9517 role: 'owner' | 'member'; 9518 + /** 9519 + * The Unix timestamp (in seconds) of when the project was added. 9520 + */ 9521 + added_at: number; 9522 9522 }; 9523 9523 9524 9524 export type ProjectUserCreateRequest = { 9525 9525 /** 9526 + * The ID of the user. 9527 + */ 9528 + user_id: string; 9529 + /** 9526 9530 * `owner` or `member` 9527 9531 */ 9528 9532 role: 'owner' | 'member'; 9529 - /** 9530 - * The ID of the user. 9531 - */ 9532 - user_id: string; 9533 9533 }; 9534 9534 9535 9535 export type ProjectUserDeleteResponse = { 9536 - deleted: boolean; 9536 + object: 'organization.project.user.deleted'; 9537 9537 id: string; 9538 - object: 'organization.project.user.deleted'; 9538 + deleted: boolean; 9539 9539 }; 9540 9540 9541 9541 export type ProjectUserListResponse = { 9542 + object: string; 9542 9543 data: Array<ProjectUser>; 9543 9544 first_id: string; 9544 - has_more: boolean; 9545 9545 last_id: string; 9546 - object: string; 9546 + has_more: boolean; 9547 9547 }; 9548 9548 9549 9549 export type ProjectUserUpdateRequest = { ··· 9563 9563 * The unique identifier of the prompt template to use. 9564 9564 */ 9565 9565 id: string; 9566 - variables?: ResponsePromptVariables; 9567 9566 /** 9568 9567 * Optional version of the prompt template. 9569 9568 */ 9570 9569 version?: string; 9570 + variables?: ResponsePromptVariables; 9571 9571 }; 9572 9572 9573 9573 /** ··· 9627 9627 * Optional client-generated ID used to identify this event. 9628 9628 */ 9629 9629 event_id?: string; 9630 - item: RealtimeConversationItem; 9630 + /** 9631 + * The event type, must be `conversation.item.create`. 9632 + */ 9633 + type: 'conversation.item.create'; 9631 9634 /** 9632 9635 * The ID of the preceding item after which the new item will be inserted. 9633 9636 * If not set, the new item will be appended to the end of the conversation. ··· 9637 9640 * 9638 9641 */ 9639 9642 previous_item_id?: string; 9640 - /** 9641 - * The event type, must be `conversation.item.create`. 9642 - */ 9643 - type: 'conversation.item.create'; 9643 + item: RealtimeConversationItem; 9644 9644 }; 9645 9645 9646 9646 /** ··· 9656 9656 */ 9657 9657 event_id?: string; 9658 9658 /** 9659 - * The ID of the item to delete. 9660 - */ 9661 - item_id: string; 9662 - /** 9663 9659 * The event type, must be `conversation.item.delete`. 9664 9660 */ 9665 9661 type: 'conversation.item.delete'; 9662 + /** 9663 + * The ID of the item to delete. 9664 + */ 9665 + item_id: string; 9666 9666 }; 9667 9667 9668 9668 /** ··· 9678 9678 */ 9679 9679 event_id?: string; 9680 9680 /** 9681 - * The ID of the item to retrieve. 9682 - */ 9683 - item_id: string; 9684 - /** 9685 9681 * The event type, must be `conversation.item.retrieve`. 9686 9682 */ 9687 9683 type: 'conversation.item.retrieve'; 9684 + /** 9685 + * The ID of the item to retrieve. 9686 + */ 9687 + item_id: string; 9688 9688 }; 9689 9689 9690 9690 /** ··· 9703 9703 */ 9704 9704 export type RealtimeClientEventConversationItemTruncate = { 9705 9705 /** 9706 - * Inclusive duration up to which audio is truncated, in milliseconds. If 9707 - * the audio_end_ms is greater than the actual audio duration, the server 9708 - * will respond with an error. 9709 - * 9706 + * Optional client-generated ID used to identify this event. 9710 9707 */ 9711 - audio_end_ms: number; 9712 - /** 9713 - * The index of the content part to truncate. Set this to 0. 9714 - */ 9715 - content_index: number; 9708 + event_id?: string; 9716 9709 /** 9717 - * Optional client-generated ID used to identify this event. 9710 + * The event type, must be `conversation.item.truncate`. 9718 9711 */ 9719 - event_id?: string; 9712 + type: 'conversation.item.truncate'; 9720 9713 /** 9721 9714 * The ID of the assistant message item to truncate. Only assistant message 9722 9715 * items can be truncated. ··· 9724 9717 */ 9725 9718 item_id: string; 9726 9719 /** 9727 - * The event type, must be `conversation.item.truncate`. 9720 + * The index of the content part to truncate. Set this to 0. 9721 + */ 9722 + content_index: number; 9723 + /** 9724 + * Inclusive duration up to which audio is truncated, in milliseconds. If 9725 + * the audio_end_ms is greater than the actual audio duration, the server 9726 + * will respond with an error. 9727 + * 9728 9728 */ 9729 - type: 'conversation.item.truncate'; 9729 + audio_end_ms: number; 9730 9730 }; 9731 9731 9732 9732 /** ··· 9744 9744 */ 9745 9745 export type RealtimeClientEventInputAudioBufferAppend = { 9746 9746 /** 9747 - * Base64-encoded audio bytes. This must be in the format specified by the 9748 - * `input_audio_format` field in the session configuration. 9749 - * 9750 - */ 9751 - audio: string; 9752 - /** 9753 9747 * Optional client-generated ID used to identify this event. 9754 9748 */ 9755 9749 event_id?: string; ··· 9757 9751 * The event type, must be `input_audio_buffer.append`. 9758 9752 */ 9759 9753 type: 'input_audio_buffer.append'; 9754 + /** 9755 + * Base64-encoded audio bytes. This must be in the format specified by the 9756 + * `input_audio_format` field in the session configuration. 9757 + * 9758 + */ 9759 + audio: string; 9760 9760 }; 9761 9761 9762 9762 /** ··· 9830 9830 */ 9831 9831 event_id?: string; 9832 9832 /** 9833 + * The event type, must be `response.cancel`. 9834 + */ 9835 + type: 'response.cancel'; 9836 + /** 9833 9837 * A specific response ID to cancel - if not provided, will cancel an 9834 9838 * in-progress response in the default conversation. 9835 9839 * 9836 9840 */ 9837 9841 response_id?: string; 9838 - /** 9839 - * The event type, must be `response.cancel`. 9840 - */ 9841 - type: 'response.cancel'; 9842 9842 }; 9843 9843 9844 9844 /** ··· 9864 9864 * Optional client-generated ID used to identify this event. 9865 9865 */ 9866 9866 event_id?: string; 9867 - response?: RealtimeResponseCreateParams; 9868 9867 /** 9869 9868 * The event type, must be `response.create`. 9870 9869 */ 9871 9870 type: 'response.create'; 9871 + response?: RealtimeResponseCreateParams; 9872 9872 }; 9873 9873 9874 9874 /** ··· 9889 9889 * Optional client-generated ID used to identify this event. 9890 9890 */ 9891 9891 event_id?: string; 9892 - session: RealtimeSessionCreateRequest; 9893 9892 /** 9894 9893 * The event type, must be `session.update`. 9895 9894 */ 9896 9895 type: 'session.update'; 9896 + session: RealtimeSessionCreateRequest; 9897 9897 }; 9898 9898 9899 9899 /** ··· 9905 9905 * Optional client-generated ID used to identify this event. 9906 9906 */ 9907 9907 event_id?: string; 9908 - session: RealtimeTranscriptionSessionCreateRequest; 9909 9908 /** 9910 9909 * The event type, must be `transcription_session.update`. 9911 9910 */ 9912 9911 type: 'transcription_session.update'; 9912 + session: RealtimeTranscriptionSessionCreateRequest; 9913 9913 }; 9914 9914 9915 9915 /** ··· 9917 9917 */ 9918 9918 export type RealtimeConversationItem = { 9919 9919 /** 9920 - * The arguments of the function call (for `function_call` items). 9920 + * The unique ID of the item, this can be generated by the client to help 9921 + * manage server-side context, but is not required because the server will 9922 + * generate one if not provided. 9923 + * 9924 + */ 9925 + id?: string; 9926 + /** 9927 + * The type of the item (`message`, `function_call`, `function_call_output`). 9928 + * 9929 + */ 9930 + type?: 'message' | 'function_call' | 'function_call_output'; 9931 + /** 9932 + * Identifier for the API object being returned - always `realtime.item`. 9933 + * 9934 + */ 9935 + object?: 'realtime.item'; 9936 + /** 9937 + * The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect 9938 + * on the conversation, but are accepted for consistency with the 9939 + * `conversation.item.created` event. 9921 9940 * 9922 9941 */ 9923 - arguments?: string; 9942 + status?: 'completed' | 'incomplete' | 'in_progress'; 9924 9943 /** 9925 - * The ID of the function call (for `function_call` and 9926 - * `function_call_output` items). If passed on a `function_call_output` 9927 - * item, the server will check that a `function_call` item with the same 9928 - * ID exists in the conversation history. 9944 + * The role of the message sender (`user`, `assistant`, `system`), only 9945 + * applicable for `message` items. 9929 9946 * 9930 9947 */ 9931 - call_id?: string; 9948 + role?: 'user' | 'assistant' | 'system'; 9932 9949 /** 9933 9950 * The content of the message, applicable for `message` items. 9934 9951 * - Message items of role `system` support only `input_text` content ··· 9939 9956 */ 9940 9957 content?: Array<RealtimeConversationItemContent>; 9941 9958 /** 9942 - * The unique ID of the item, this can be generated by the client to help 9943 - * manage server-side context, but is not required because the server will 9944 - * generate one if not provided. 9959 + * The ID of the function call (for `function_call` and 9960 + * `function_call_output` items). If passed on a `function_call_output` 9961 + * item, the server will check that a `function_call` item with the same 9962 + * ID exists in the conversation history. 9945 9963 * 9946 9964 */ 9947 - id?: string; 9965 + call_id?: string; 9948 9966 /** 9949 9967 * The name of the function being called (for `function_call` items). 9950 9968 * 9951 9969 */ 9952 9970 name?: string; 9953 9971 /** 9954 - * Identifier for the API object being returned - always `realtime.item`. 9972 + * The arguments of the function call (for `function_call` items). 9955 9973 * 9956 9974 */ 9957 - object?: 'realtime.item'; 9975 + arguments?: string; 9958 9976 /** 9959 9977 * The output of the function call (for `function_call_output` items). 9960 9978 * 9961 9979 */ 9962 9980 output?: string; 9981 + }; 9982 + 9983 + /** 9984 + * The item to add to the conversation. 9985 + */ 9986 + export type RealtimeConversationItemWithReference = { 9963 9987 /** 9964 - * The role of the message sender (`user`, `assistant`, `system`), only 9965 - * applicable for `message` items. 9988 + * For an item of type (`message` | `function_call` | `function_call_output`) 9989 + * this field allows the client to assign the unique ID of the item. It is 9990 + * not required because the server will generate one if not provided. 9991 + * 9992 + * For an item of type `item_reference`, this field is required and is a 9993 + * reference to any item that has previously existed in the conversation. 9966 9994 * 9967 9995 */ 9968 - role?: 'user' | 'assistant' | 'system'; 9996 + id?: string; 9969 9997 /** 9970 - * The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect 9971 - * on the conversation, but are accepted for consistency with the 9972 - * `conversation.item.created` event. 9998 + * The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`). 9973 9999 * 9974 10000 */ 9975 - status?: 'completed' | 'incomplete' | 'in_progress'; 10001 + type?: 10002 + | 'message' 10003 + | 'function_call' 10004 + | 'function_call_output' 10005 + | 'item_reference'; 9976 10006 /** 9977 - * The type of the item (`message`, `function_call`, `function_call_output`). 10007 + * Identifier for the API object being returned - always `realtime.item`. 9978 10008 * 9979 10009 */ 9980 - type?: 'message' | 'function_call' | 'function_call_output'; 9981 - }; 9982 - 9983 - /** 9984 - * The item to add to the conversation. 9985 - */ 9986 - export type RealtimeConversationItemWithReference = { 10010 + object?: 'realtime.item'; 9987 10011 /** 9988 - * The arguments of the function call (for `function_call` items). 10012 + * The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect 10013 + * on the conversation, but are accepted for consistency with the 10014 + * `conversation.item.created` event. 9989 10015 * 9990 10016 */ 9991 - arguments?: string; 10017 + status?: 'completed' | 'incomplete' | 'in_progress'; 9992 10018 /** 9993 - * The ID of the function call (for `function_call` and 9994 - * `function_call_output` items). If passed on a `function_call_output` 9995 - * item, the server will check that a `function_call` item with the same 9996 - * ID exists in the conversation history. 10019 + * The role of the message sender (`user`, `assistant`, `system`), only 10020 + * applicable for `message` items. 9997 10021 * 9998 10022 */ 9999 - call_id?: string; 10023 + role?: 'user' | 'assistant' | 'system'; 10000 10024 /** 10001 10025 * The content of the message, applicable for `message` items. 10002 10026 * - Message items of role `system` support only `input_text` content ··· 10007 10031 */ 10008 10032 content?: Array<{ 10009 10033 /** 10010 - * Base64-encoded audio bytes, used for `input_audio` content type. 10034 + * The content type (`input_text`, `input_audio`, `item_reference`, `text`). 10035 + * 10036 + */ 10037 + type?: 'input_text' | 'input_audio' | 'item_reference' | 'text'; 10038 + /** 10039 + * The text content, used for `input_text` and `text` content types. 10011 10040 * 10012 10041 */ 10013 - audio?: string; 10042 + text?: string; 10014 10043 /** 10015 10044 * ID of a previous conversation item to reference (for `item_reference` 10016 10045 * content types in `response.create` events). These can reference both ··· 10019 10048 */ 10020 10049 id?: string; 10021 10050 /** 10022 - * The text content, used for `input_text` and `text` content types. 10051 + * Base64-encoded audio bytes, used for `input_audio` content type. 10023 10052 * 10024 10053 */ 10025 - text?: string; 10054 + audio?: string; 10026 10055 /** 10027 10056 * The transcript of the audio, used for `input_audio` content type. 10028 10057 * 10029 10058 */ 10030 10059 transcript?: string; 10031 - /** 10032 - * The content type (`input_text`, `input_audio`, `item_reference`, `text`). 10033 - * 10034 - */ 10035 - type?: 'input_text' | 'input_audio' | 'item_reference' | 'text'; 10036 10060 }>; 10037 10061 /** 10038 - * For an item of type (`message` | `function_call` | `function_call_output`) 10039 - * this field allows the client to assign the unique ID of the item. It is 10040 - * not required because the server will generate one if not provided. 10041 - * 10042 - * For an item of type `item_reference`, this field is required and is a 10043 - * reference to any item that has previously existed in the conversation. 10062 + * The ID of the function call (for `function_call` and 10063 + * `function_call_output` items). If passed on a `function_call_output` 10064 + * item, the server will check that a `function_call` item with the same 10065 + * ID exists in the conversation history. 10044 10066 * 10045 10067 */ 10046 - id?: string; 10068 + call_id?: string; 10047 10069 /** 10048 10070 * The name of the function being called (for `function_call` items). 10049 10071 * 10050 10072 */ 10051 10073 name?: string; 10052 10074 /** 10053 - * Identifier for the API object being returned - always `realtime.item`. 10075 + * The arguments of the function call (for `function_call` items). 10054 10076 * 10055 10077 */ 10056 - object?: 'realtime.item'; 10078 + arguments?: string; 10057 10079 /** 10058 10080 * The output of the function call (for `function_call_output` items). 10059 10081 * 10060 10082 */ 10061 10083 output?: string; 10062 - /** 10063 - * The role of the message sender (`user`, `assistant`, `system`), only 10064 - * applicable for `message` items. 10065 - * 10066 - */ 10067 - role?: 'user' | 'assistant' | 'system'; 10068 - /** 10069 - * The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect 10070 - * on the conversation, but are accepted for consistency with the 10071 - * `conversation.item.created` event. 10072 - * 10073 - */ 10074 - status?: 'completed' | 'incomplete' | 'in_progress'; 10075 - /** 10076 - * The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`). 10077 - * 10078 - */ 10079 - type?: 10080 - | 'message' 10081 - | 'function_call' 10082 - | 'function_call_output' 10083 - | 'item_reference'; 10084 10084 }; 10085 10085 10086 10086 /** ··· 10088 10088 */ 10089 10089 export type RealtimeResponse = { 10090 10090 /** 10091 - * Which conversation the response is added to, determined by the `conversation` 10092 - * field in the `response.create` event. If `auto`, the response will be added to 10093 - * the default conversation and the value of `conversation_id` will be an id like 10094 - * `conv_1234`. If `none`, the response will not be added to any conversation and 10095 - * the value of `conversation_id` will be `null`. If responses are being triggered 10096 - * by server VAD, the response will be added to the default conversation, thus 10097 - * the `conversation_id` will be an id like `conv_1234`. 10098 - * 10099 - */ 10100 - conversation_id?: string; 10101 - /** 10102 10091 * The unique ID of the response. 10103 10092 */ 10104 10093 id?: string; 10105 10094 /** 10106 - * Maximum number of output tokens for a single assistant response, 10107 - * inclusive of tool calls, that was used in this response. 10108 - * 10109 - */ 10110 - max_output_tokens?: number | 'inf'; 10111 - metadata?: Metadata; 10112 - /** 10113 - * The set of modalities the model used to respond. If there are multiple modalities, 10114 - * the model will pick one, for example if `modalities` is `["text", "audio"]`, the model 10115 - * could be responding in either text or audio. 10116 - * 10117 - */ 10118 - modalities?: Array<'text' | 'audio'>; 10119 - /** 10120 10095 * The object type, must be `realtime.response`. 10121 10096 */ 10122 10097 object?: 'realtime.response'; 10123 10098 /** 10124 - * The list of output items generated by the response. 10125 - */ 10126 - output?: Array<RealtimeConversationItem>; 10127 - /** 10128 - * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 10129 - * 10130 - */ 10131 - output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 10132 - /** 10133 10099 * The final status of the response (`completed`, `cancelled`, `failed`, or 10134 10100 * `incomplete`, `in_progress`). 10135 10101 * ··· 10140 10106 */ 10141 10107 status_details?: { 10142 10108 /** 10143 - * A description of the error that caused the response to fail, 10144 - * populated when the `status` is `failed`. 10109 + * The type of error that caused the response to fail, corresponding 10110 + * with the `status` field (`completed`, `cancelled`, `incomplete`, 10111 + * `failed`). 10145 10112 * 10146 10113 */ 10147 - error?: { 10148 - /** 10149 - * Error code, if any. 10150 - */ 10151 - code?: string; 10152 - /** 10153 - * The type of error. 10154 - */ 10155 - type?: string; 10156 - }; 10114 + type?: 'completed' | 'cancelled' | 'incomplete' | 'failed'; 10157 10115 /** 10158 10116 * The reason the Response did not complete. For a `cancelled` Response, 10159 10117 * one of `turn_detected` (the server VAD detected a new start of speech) ··· 10168 10126 | 'max_output_tokens' 10169 10127 | 'content_filter'; 10170 10128 /** 10171 - * The type of error that caused the response to fail, corresponding 10172 - * with the `status` field (`completed`, `cancelled`, `incomplete`, 10173 - * `failed`). 10129 + * A description of the error that caused the response to fail, 10130 + * populated when the `status` is `failed`. 10174 10131 * 10175 10132 */ 10176 - type?: 'completed' | 'cancelled' | 'incomplete' | 'failed'; 10133 + error?: { 10134 + /** 10135 + * The type of error. 10136 + */ 10137 + type?: string; 10138 + /** 10139 + * Error code, if any. 10140 + */ 10141 + code?: string; 10142 + }; 10177 10143 }; 10178 10144 /** 10179 - * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. 10180 - * 10145 + * The list of output items generated by the response. 10181 10146 */ 10182 - temperature?: number; 10147 + output?: Array<RealtimeConversationItem>; 10148 + metadata?: Metadata; 10183 10149 /** 10184 10150 * Usage statistics for the Response, this will correspond to billing. A 10185 10151 * Realtime API session will maintain a conversation context and append new ··· 10189 10155 */ 10190 10156 usage?: { 10191 10157 /** 10158 + * The total number of tokens in the Response including input and output 10159 + * text and audio tokens. 10160 + * 10161 + */ 10162 + total_tokens?: number; 10163 + /** 10164 + * The number of input tokens used in the Response, including text and 10165 + * audio tokens. 10166 + * 10167 + */ 10168 + input_tokens?: number; 10169 + /** 10170 + * The number of output tokens sent in the Response, including text and 10171 + * audio tokens. 10172 + * 10173 + */ 10174 + output_tokens?: number; 10175 + /** 10192 10176 * Details about the input tokens used in the Response. 10193 10177 */ 10194 10178 input_token_details?: { 10195 10179 /** 10196 - * The number of audio tokens used in the Response. 10197 - */ 10198 - audio_tokens?: number; 10199 - /** 10200 10180 * The number of cached tokens used in the Response. 10201 10181 */ 10202 10182 cached_tokens?: number; ··· 10204 10184 * The number of text tokens used in the Response. 10205 10185 */ 10206 10186 text_tokens?: number; 10187 + /** 10188 + * The number of audio tokens used in the Response. 10189 + */ 10190 + audio_tokens?: number; 10207 10191 }; 10208 10192 /** 10209 - * The number of input tokens used in the Response, including text and 10210 - * audio tokens. 10211 - * 10212 - */ 10213 - input_tokens?: number; 10214 - /** 10215 10193 * Details about the output tokens used in the Response. 10216 10194 */ 10217 10195 output_token_details?: { 10218 - /** 10219 - * The number of audio tokens used in the Response. 10220 - */ 10221 - audio_tokens?: number; 10222 10196 /** 10223 10197 * The number of text tokens used in the Response. 10224 10198 */ 10225 10199 text_tokens?: number; 10200 + /** 10201 + * The number of audio tokens used in the Response. 10202 + */ 10203 + audio_tokens?: number; 10226 10204 }; 10227 - /** 10228 - * The number of output tokens sent in the Response, including text and 10229 - * audio tokens. 10230 - * 10231 - */ 10232 - output_tokens?: number; 10233 - /** 10234 - * The total number of tokens in the Response including input and output 10235 - * text and audio tokens. 10236 - * 10237 - */ 10238 - total_tokens?: number; 10239 10205 }; 10240 10206 /** 10207 + * Which conversation the response is added to, determined by the `conversation` 10208 + * field in the `response.create` event. If `auto`, the response will be added to 10209 + * the default conversation and the value of `conversation_id` will be an id like 10210 + * `conv_1234`. If `none`, the response will not be added to any conversation and 10211 + * the value of `conversation_id` will be `null`. If responses are being triggered 10212 + * by server VAD, the response will be added to the default conversation, thus 10213 + * the `conversation_id` will be an id like `conv_1234`. 10214 + * 10215 + */ 10216 + conversation_id?: string; 10217 + /** 10241 10218 * The voice the model used to respond. 10242 10219 * Current voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 10243 10220 * `shimmer`, and `verse`. 10244 10221 * 10245 10222 */ 10246 10223 voice?: VoiceIdsShared; 10224 + /** 10225 + * The set of modalities the model used to respond. If there are multiple modalities, 10226 + * the model will pick one, for example if `modalities` is `["text", "audio"]`, the model 10227 + * could be responding in either text or audio. 10228 + * 10229 + */ 10230 + modalities?: Array<'text' | 'audio'>; 10231 + /** 10232 + * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 10233 + * 10234 + */ 10235 + output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 10236 + /** 10237 + * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. 10238 + * 10239 + */ 10240 + temperature?: number; 10241 + /** 10242 + * Maximum number of output tokens for a single assistant response, 10243 + * inclusive of tool calls, that was used in this response. 10244 + * 10245 + */ 10246 + max_output_tokens?: number | 'inf'; 10247 10247 }; 10248 10248 10249 10249 /** ··· 10251 10251 */ 10252 10252 export type RealtimeResponseCreateParams = { 10253 10253 /** 10254 - * Controls which conversation the response is added to. Currently supports 10255 - * `auto` and `none`, with `auto` as the default value. The `auto` value 10256 - * means that the contents of the response will be added to the default 10257 - * conversation. Set this to `none` to create an out-of-band response which 10258 - * will not add items to default conversation. 10259 - * 10260 - */ 10261 - conversation?: string | 'auto' | 'none'; 10262 - /** 10263 - * Input items to include in the prompt for the model. Using this field 10264 - * creates a new context for this Response instead of using the default 10265 - * conversation. An empty array `[]` will clear the context for this Response. 10266 - * Note that this can include references to items from the default conversation. 10254 + * The set of modalities the model can respond with. To disable audio, 10255 + * set this to ["text"]. 10267 10256 * 10268 10257 */ 10269 - input?: Array<RealtimeConversationItemWithReference>; 10258 + modalities?: Array<'text' | 'audio'>; 10270 10259 /** 10271 10260 * The default system instructions (i.e. system message) prepended to model 10272 10261 * calls. This field allows the client to guide the model on desired ··· 10284 10273 */ 10285 10274 instructions?: string; 10286 10275 /** 10287 - * Maximum number of output tokens for a single assistant response, 10288 - * inclusive of tool calls. Provide an integer between 1 and 4096 to 10289 - * limit output tokens, or `inf` for the maximum available tokens for a 10290 - * given model. Defaults to `inf`. 10276 + * The voice the model uses to respond. Voice cannot be changed during the 10277 + * session once the model has responded with audio at least once. Current 10278 + * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 10279 + * `shimmer`, and `verse`. 10291 10280 * 10292 10281 */ 10293 - max_response_output_tokens?: number | 'inf'; 10294 - metadata?: Metadata; 10295 - /** 10296 - * The set of modalities the model can respond with. To disable audio, 10297 - * set this to ["text"]. 10298 - * 10299 - */ 10300 - modalities?: Array<'text' | 'audio'>; 10282 + voice?: VoiceIdsShared; 10301 10283 /** 10302 10284 * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 10303 10285 * 10304 10286 */ 10305 10287 output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 10306 10288 /** 10307 - * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. 10308 - * 10309 - */ 10310 - temperature?: number; 10311 - /** 10312 - * How the model chooses tools. Options are `auto`, `none`, `required`, or 10313 - * specify a function, like `{"type": "function", "function": {"name": "my_function"}}`. 10314 - * 10315 - */ 10316 - tool_choice?: string; 10317 - /** 10318 10289 * Tools (functions) available to the model. 10319 10290 */ 10320 10291 tools?: Array<{ 10321 10292 /** 10293 + * The type of the tool, i.e. `function`. 10294 + */ 10295 + type?: 'function'; 10296 + /** 10297 + * The name of the function. 10298 + */ 10299 + name?: string; 10300 + /** 10322 10301 * The description of the function, including guidance on when and how 10323 10302 * to call it, and guidance about what to tell the user when calling 10324 10303 * (if anything). ··· 10326 10305 */ 10327 10306 description?: string; 10328 10307 /** 10329 - * The name of the function. 10330 - */ 10331 - name?: string; 10332 - /** 10333 10308 * Parameters of the function in JSON Schema. 10334 10309 */ 10335 10310 parameters?: { 10336 10311 [key: string]: unknown; 10337 10312 }; 10338 - /** 10339 - * The type of the tool, i.e. `function`. 10340 - */ 10341 - type?: 'function'; 10342 10313 }>; 10343 10314 /** 10344 - * The voice the model uses to respond. Voice cannot be changed during the 10345 - * session once the model has responded with audio at least once. Current 10346 - * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 10347 - * `shimmer`, and `verse`. 10315 + * How the model chooses tools. Options are `auto`, `none`, `required`, or 10316 + * specify a function, like `{"type": "function", "function": {"name": "my_function"}}`. 10317 + * 10318 + */ 10319 + tool_choice?: string; 10320 + /** 10321 + * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. 10322 + * 10323 + */ 10324 + temperature?: number; 10325 + /** 10326 + * Maximum number of output tokens for a single assistant response, 10327 + * inclusive of tool calls. Provide an integer between 1 and 4096 to 10328 + * limit output tokens, or `inf` for the maximum available tokens for a 10329 + * given model. Defaults to `inf`. 10348 10330 * 10349 10331 */ 10350 - voice?: VoiceIdsShared; 10332 + max_response_output_tokens?: number | 'inf'; 10333 + /** 10334 + * Controls which conversation the response is added to. Currently supports 10335 + * `auto` and `none`, with `auto` as the default value. The `auto` value 10336 + * means that the contents of the response will be added to the default 10337 + * conversation. Set this to `none` to create an out-of-band response which 10338 + * will not add items to default conversation. 10339 + * 10340 + */ 10341 + conversation?: string | 'auto' | 'none'; 10342 + metadata?: Metadata; 10343 + /** 10344 + * Input items to include in the prompt for the model. Using this field 10345 + * creates a new context for this Response instead of using the default 10346 + * conversation. An empty array `[]` will clear the context for this Response. 10347 + * Note that this can include references to items from the default conversation. 10348 + * 10349 + */ 10350 + input?: Array<RealtimeConversationItemWithReference>; 10351 10351 }; 10352 10352 10353 10353 /** ··· 10464 10464 */ 10465 10465 export type RealtimeServerEventConversationCreated = { 10466 10466 /** 10467 + * The unique ID of the server event. 10468 + */ 10469 + event_id: string; 10470 + /** 10471 + * The event type, must be `conversation.created`. 10472 + */ 10473 + type: 'conversation.created'; 10474 + /** 10467 10475 * The conversation resource. 10468 10476 */ 10469 10477 conversation: { ··· 10476 10484 */ 10477 10485 object?: 'realtime.conversation'; 10478 10486 }; 10479 - /** 10480 - * The unique ID of the server event. 10481 - */ 10482 - event_id: string; 10483 - /** 10484 - * The event type, must be `conversation.created`. 10485 - */ 10486 - type: 'conversation.created'; 10487 10487 }; 10488 10488 10489 10489 /** ··· 10503 10503 * The unique ID of the server event. 10504 10504 */ 10505 10505 event_id: string; 10506 - item: RealtimeConversationItem; 10506 + /** 10507 + * The event type, must be `conversation.item.created`. 10508 + */ 10509 + type: 'conversation.item.created'; 10507 10510 /** 10508 10511 * The ID of the preceding item in the Conversation context, allows the 10509 10512 * client to understand the order of the conversation. Can be `null` if the ··· 10511 10514 * 10512 10515 */ 10513 10516 previous_item_id?: string; 10514 - /** 10515 - * The event type, must be `conversation.item.created`. 10516 - */ 10517 - type: 'conversation.item.created'; 10517 + item: RealtimeConversationItem; 10518 10518 }; 10519 10519 10520 10520 /** ··· 10529 10529 */ 10530 10530 event_id: string; 10531 10531 /** 10532 - * The ID of the item that was deleted. 10533 - */ 10534 - item_id: string; 10535 - /** 10536 10532 * The event type, must be `conversation.item.deleted`. 10537 10533 */ 10538 10534 type: 'conversation.item.deleted'; 10535 + /** 10536 + * The ID of the item that was deleted. 10537 + */ 10538 + item_id: string; 10539 10539 }; 10540 10540 10541 10541 /** ··· 10554 10554 export type RealtimeServerEventConversationItemInputAudioTranscriptionCompleted = 10555 10555 { 10556 10556 /** 10557 - * The index of the content part containing the audio. 10557 + * The unique ID of the server event. 10558 10558 */ 10559 - content_index: number; 10559 + event_id: string; 10560 10560 /** 10561 - * The unique ID of the server event. 10561 + * The event type, must be 10562 + * `conversation.item.input_audio_transcription.completed`. 10563 + * 10562 10564 */ 10563 - event_id: string; 10565 + type: 'conversation.item.input_audio_transcription.completed'; 10564 10566 /** 10565 10567 * The ID of the user message item containing the audio. 10566 10568 */ 10567 10569 item_id: string; 10568 10570 /** 10569 - * The log probabilities of the transcription. 10571 + * The index of the content part containing the audio. 10570 10572 */ 10571 - logprobs?: Array<LogProbProperties>; 10573 + content_index: number; 10572 10574 /** 10573 10575 * The transcribed text. 10574 10576 */ 10575 10577 transcript: string; 10576 10578 /** 10577 - * The event type, must be 10578 - * `conversation.item.input_audio_transcription.completed`. 10579 - * 10579 + * The log probabilities of the transcription. 10580 10580 */ 10581 - type: 'conversation.item.input_audio_transcription.completed'; 10581 + logprobs?: Array<LogProbProperties>; 10582 10582 /** 10583 10583 * Usage statistics for the transcription. 10584 10584 */ ··· 10591 10591 */ 10592 10592 export type RealtimeServerEventConversationItemInputAudioTranscriptionDelta = { 10593 10593 /** 10594 - * The index of the content part in the item's content array. 10595 - */ 10596 - content_index?: number; 10597 - /** 10598 - * The text delta. 10594 + * The unique ID of the server event. 10599 10595 */ 10600 - delta?: string; 10596 + event_id: string; 10601 10597 /** 10602 - * The unique ID of the server event. 10598 + * The event type, must be `conversation.item.input_audio_transcription.delta`. 10603 10599 */ 10604 - event_id: string; 10600 + type: 'conversation.item.input_audio_transcription.delta'; 10605 10601 /** 10606 10602 * The ID of the item. 10607 10603 */ 10608 10604 item_id: string; 10609 10605 /** 10610 - * The log probabilities of the transcription. 10606 + * The index of the content part in the item's content array. 10611 10607 */ 10612 - logprobs?: Array<LogProbProperties>; 10608 + content_index?: number; 10613 10609 /** 10614 - * The event type, must be `conversation.item.input_audio_transcription.delta`. 10610 + * The text delta. 10615 10611 */ 10616 - type: 'conversation.item.input_audio_transcription.delta'; 10612 + delta?: string; 10613 + /** 10614 + * The log probabilities of the transcription. 10615 + */ 10616 + logprobs?: Array<LogProbProperties>; 10617 10617 }; 10618 10618 10619 10619 /** ··· 10624 10624 */ 10625 10625 export type RealtimeServerEventConversationItemInputAudioTranscriptionFailed = { 10626 10626 /** 10627 + * The unique ID of the server event. 10628 + */ 10629 + event_id: string; 10630 + /** 10631 + * The event type, must be 10632 + * `conversation.item.input_audio_transcription.failed`. 10633 + * 10634 + */ 10635 + type: 'conversation.item.input_audio_transcription.failed'; 10636 + /** 10637 + * The ID of the user message item. 10638 + */ 10639 + item_id: string; 10640 + /** 10627 10641 * The index of the content part containing the audio. 10628 10642 */ 10629 10643 content_index: number; ··· 10632 10646 */ 10633 10647 error: { 10634 10648 /** 10649 + * The type of error. 10650 + */ 10651 + type?: string; 10652 + /** 10635 10653 * Error code, if any. 10636 10654 */ 10637 10655 code?: string; ··· 10643 10661 * Parameter related to the error, if any. 10644 10662 */ 10645 10663 param?: string; 10646 - /** 10647 - * The type of error. 10648 - */ 10649 - type?: string; 10650 10664 }; 10651 - /** 10652 - * The unique ID of the server event. 10653 - */ 10654 - event_id: string; 10655 - /** 10656 - * The ID of the user message item. 10657 - */ 10658 - item_id: string; 10659 - /** 10660 - * The event type, must be 10661 - * `conversation.item.input_audio_transcription.failed`. 10662 - * 10663 - */ 10664 - type: 'conversation.item.input_audio_transcription.failed'; 10665 10665 }; 10666 10666 10667 10667 /** ··· 10673 10673 * The unique ID of the server event. 10674 10674 */ 10675 10675 event_id: string; 10676 - item: RealtimeConversationItem; 10677 10676 /** 10678 10677 * The event type, must be `conversation.item.retrieved`. 10679 10678 */ 10680 10679 type: 'conversation.item.retrieved'; 10680 + item: RealtimeConversationItem; 10681 10681 }; 10682 10682 10683 10683 /** ··· 10691 10691 */ 10692 10692 export type RealtimeServerEventConversationItemTruncated = { 10693 10693 /** 10694 - * The duration up to which the audio was truncated, in milliseconds. 10695 - * 10694 + * The unique ID of the server event. 10696 10695 */ 10697 - audio_end_ms: number; 10698 - /** 10699 - * The index of the content part that was truncated. 10700 - */ 10701 - content_index: number; 10696 + event_id: string; 10702 10697 /** 10703 - * The unique ID of the server event. 10698 + * The event type, must be `conversation.item.truncated`. 10704 10699 */ 10705 - event_id: string; 10700 + type: 'conversation.item.truncated'; 10706 10701 /** 10707 10702 * The ID of the assistant message item that was truncated. 10708 10703 */ 10709 10704 item_id: string; 10710 10705 /** 10711 - * The event type, must be `conversation.item.truncated`. 10706 + * The index of the content part that was truncated. 10707 + */ 10708 + content_index: number; 10709 + /** 10710 + * The duration up to which the audio was truncated, in milliseconds. 10711 + * 10712 10712 */ 10713 - type: 'conversation.item.truncated'; 10713 + audio_end_ms: number; 10714 10714 }; 10715 10715 10716 10716 /** ··· 10721 10721 */ 10722 10722 export type RealtimeServerEventError = { 10723 10723 /** 10724 + * The unique ID of the server event. 10725 + */ 10726 + event_id: string; 10727 + /** 10728 + * The event type, must be `error`. 10729 + */ 10730 + type: 'error'; 10731 + /** 10724 10732 * Details of the error. 10725 10733 */ 10726 10734 error: { 10727 10735 /** 10736 + * The type of error (e.g., "invalid_request_error", "server_error"). 10737 + * 10738 + */ 10739 + type: string; 10740 + /** 10728 10741 * Error code, if any. 10729 10742 */ 10730 10743 code?: string; 10731 10744 /** 10732 - * The event_id of the client event that caused the error, if applicable. 10733 - * 10734 - */ 10735 - event_id?: string; 10736 - /** 10737 10745 * A human-readable error message. 10738 10746 */ 10739 10747 message: string; ··· 10742 10750 */ 10743 10751 param?: string; 10744 10752 /** 10745 - * The type of error (e.g., "invalid_request_error", "server_error"). 10753 + * The event_id of the client event that caused the error, if applicable. 10746 10754 * 10747 10755 */ 10748 - type: string; 10756 + event_id?: string; 10749 10757 }; 10750 - /** 10751 - * The unique ID of the server event. 10752 - */ 10753 - event_id: string; 10754 - /** 10755 - * The event type, must be `error`. 10756 - */ 10757 - type: 'error'; 10758 10758 }; 10759 10759 10760 10760 /** ··· 10786 10786 */ 10787 10787 event_id: string; 10788 10788 /** 10789 - * The ID of the user message item that will be created. 10789 + * The event type, must be `input_audio_buffer.committed`. 10790 10790 */ 10791 - item_id: string; 10791 + type: 'input_audio_buffer.committed'; 10792 10792 /** 10793 10793 * The ID of the preceding item after which the new item will be inserted. 10794 10794 * Can be `null` if the item has no predecessor. ··· 10796 10796 */ 10797 10797 previous_item_id?: string; 10798 10798 /** 10799 - * The event type, must be `input_audio_buffer.committed`. 10799 + * The ID of the user message item that will be created. 10800 10800 */ 10801 - type: 'input_audio_buffer.committed'; 10801 + item_id: string; 10802 10802 }; 10803 10803 10804 10804 /** ··· 10816 10816 */ 10817 10817 export type RealtimeServerEventInputAudioBufferSpeechStarted = { 10818 10818 /** 10819 + * The unique ID of the server event. 10820 + */ 10821 + event_id: string; 10822 + /** 10823 + * The event type, must be `input_audio_buffer.speech_started`. 10824 + */ 10825 + type: 'input_audio_buffer.speech_started'; 10826 + /** 10819 10827 * Milliseconds from the start of all audio written to the buffer during the 10820 10828 * session when speech was first detected. This will correspond to the 10821 10829 * beginning of audio sent to the model, and thus includes the ··· 10824 10832 */ 10825 10833 audio_start_ms: number; 10826 10834 /** 10827 - * The unique ID of the server event. 10828 - */ 10829 - event_id: string; 10830 - /** 10831 10835 * The ID of the user message item that will be created when speech stops. 10832 10836 * 10833 10837 */ 10834 10838 item_id: string; 10835 - /** 10836 - * The event type, must be `input_audio_buffer.speech_started`. 10837 - */ 10838 - type: 'input_audio_buffer.speech_started'; 10839 10839 }; 10840 10840 10841 10841 /** ··· 10846 10846 */ 10847 10847 export type RealtimeServerEventInputAudioBufferSpeechStopped = { 10848 10848 /** 10849 + * The unique ID of the server event. 10850 + */ 10851 + event_id: string; 10852 + /** 10853 + * The event type, must be `input_audio_buffer.speech_stopped`. 10854 + */ 10855 + type: 'input_audio_buffer.speech_stopped'; 10856 + /** 10849 10857 * Milliseconds since the session started when speech stopped. This will 10850 10858 * correspond to the end of audio sent to the model, and thus includes the 10851 10859 * `min_silence_duration_ms` configured in the Session. ··· 10853 10861 */ 10854 10862 audio_end_ms: number; 10855 10863 /** 10856 - * The unique ID of the server event. 10857 - */ 10858 - event_id: string; 10859 - /** 10860 10864 * The ID of the user message item that will be created. 10861 10865 */ 10862 10866 item_id: string; 10863 - /** 10864 - * The event type, must be `input_audio_buffer.speech_stopped`. 10865 - */ 10866 - type: 'input_audio_buffer.speech_stopped'; 10867 10867 }; 10868 10868 10869 10869 /** ··· 10880 10880 */ 10881 10881 event_id: string; 10882 10882 /** 10883 - * The unique ID of the response that produced the audio. 10884 - */ 10885 - response_id: string; 10886 - /** 10887 10883 * The event type, must be `output_audio_buffer.cleared`. 10888 10884 */ 10889 10885 type: 'output_audio_buffer.cleared'; 10886 + /** 10887 + * The unique ID of the response that produced the audio. 10888 + */ 10889 + response_id: string; 10890 10890 }; 10891 10891 10892 10892 /** ··· 10902 10902 */ 10903 10903 event_id: string; 10904 10904 /** 10905 - * The unique ID of the response that produced the audio. 10906 - */ 10907 - response_id: string; 10908 - /** 10909 10905 * The event type, must be `output_audio_buffer.started`. 10910 10906 */ 10911 10907 type: 'output_audio_buffer.started'; 10908 + /** 10909 + * The unique ID of the response that produced the audio. 10910 + */ 10911 + response_id: string; 10912 10912 }; 10913 10913 10914 10914 /** ··· 10924 10924 */ 10925 10925 event_id: string; 10926 10926 /** 10927 - * The unique ID of the response that produced the audio. 10928 - */ 10929 - response_id: string; 10930 - /** 10931 10927 * The event type, must be `output_audio_buffer.stopped`. 10932 10928 */ 10933 10929 type: 'output_audio_buffer.stopped'; 10930 + /** 10931 + * The unique ID of the response that produced the audio. 10932 + */ 10933 + response_id: string; 10934 10934 }; 10935 10935 10936 10936 /** ··· 10946 10946 */ 10947 10947 event_id: string; 10948 10948 /** 10949 + * The event type, must be `rate_limits.updated`. 10950 + */ 10951 + type: 'rate_limits.updated'; 10952 + /** 10949 10953 * List of rate limit information. 10950 10954 */ 10951 10955 rate_limits: Array<{ 10952 10956 /** 10953 - * The maximum allowed value for the rate limit. 10954 - */ 10955 - limit?: number; 10956 - /** 10957 10957 * The name of the rate limit (`requests`, `tokens`). 10958 10958 * 10959 10959 */ 10960 10960 name?: 'requests' | 'tokens'; 10961 10961 /** 10962 + * The maximum allowed value for the rate limit. 10963 + */ 10964 + limit?: number; 10965 + /** 10962 10966 * The remaining value before the limit is reached. 10963 10967 */ 10964 10968 remaining?: number; ··· 10967 10971 */ 10968 10972 reset_seconds?: number; 10969 10973 }>; 10970 - /** 10971 - * The event type, must be `rate_limits.updated`. 10972 - */ 10973 - type: 'rate_limits.updated'; 10974 10974 }; 10975 10975 10976 10976 /** ··· 10978 10978 */ 10979 10979 export type RealtimeServerEventResponseAudioDelta = { 10980 10980 /** 10981 - * The index of the content part in the item's content array. 10981 + * The unique ID of the server event. 10982 10982 */ 10983 - content_index: number; 10983 + event_id: string; 10984 10984 /** 10985 - * Base64-encoded audio data delta. 10985 + * The event type, must be `response.audio.delta`. 10986 10986 */ 10987 - delta: string; 10987 + type: 'response.audio.delta'; 10988 10988 /** 10989 - * The unique ID of the server event. 10989 + * The ID of the response. 10990 10990 */ 10991 - event_id: string; 10991 + response_id: string; 10992 10992 /** 10993 10993 * The ID of the item. 10994 10994 */ ··· 10998 10998 */ 10999 10999 output_index: number; 11000 11000 /** 11001 - * The ID of the response. 11001 + * The index of the content part in the item's content array. 11002 11002 */ 11003 - response_id: string; 11003 + content_index: number; 11004 11004 /** 11005 - * The event type, must be `response.audio.delta`. 11005 + * Base64-encoded audio data delta. 11006 11006 */ 11007 - type: 'response.audio.delta'; 11007 + delta: string; 11008 11008 }; 11009 11009 11010 11010 /** ··· 11014 11014 */ 11015 11015 export type RealtimeServerEventResponseAudioDone = { 11016 11016 /** 11017 - * The index of the content part in the item's content array. 11017 + * The unique ID of the server event. 11018 + */ 11019 + event_id: string; 11020 + /** 11021 + * The event type, must be `response.audio.done`. 11018 11022 */ 11019 - content_index: number; 11023 + type: 'response.audio.done'; 11020 11024 /** 11021 - * The unique ID of the server event. 11025 + * The ID of the response. 11022 11026 */ 11023 - event_id: string; 11027 + response_id: string; 11024 11028 /** 11025 11029 * The ID of the item. 11026 11030 */ ··· 11030 11034 */ 11031 11035 output_index: number; 11032 11036 /** 11033 - * The ID of the response. 11037 + * The index of the content part in the item's content array. 11034 11038 */ 11035 - response_id: string; 11036 - /** 11037 - * The event type, must be `response.audio.done`. 11038 - */ 11039 - type: 'response.audio.done'; 11039 + content_index: number; 11040 11040 }; 11041 11041 11042 11042 /** ··· 11045 11045 */ 11046 11046 export type RealtimeServerEventResponseAudioTranscriptDelta = { 11047 11047 /** 11048 - * The index of the content part in the item's content array. 11048 + * The unique ID of the server event. 11049 11049 */ 11050 - content_index: number; 11050 + event_id: string; 11051 11051 /** 11052 - * The transcript delta. 11052 + * The event type, must be `response.audio_transcript.delta`. 11053 11053 */ 11054 - delta: string; 11054 + type: 'response.audio_transcript.delta'; 11055 11055 /** 11056 - * The unique ID of the server event. 11056 + * The ID of the response. 11057 11057 */ 11058 - event_id: string; 11058 + response_id: string; 11059 11059 /** 11060 11060 * The ID of the item. 11061 11061 */ ··· 11065 11065 */ 11066 11066 output_index: number; 11067 11067 /** 11068 - * The ID of the response. 11068 + * The index of the content part in the item's content array. 11069 11069 */ 11070 - response_id: string; 11070 + content_index: number; 11071 11071 /** 11072 - * The event type, must be `response.audio_transcript.delta`. 11072 + * The transcript delta. 11073 11073 */ 11074 - type: 'response.audio_transcript.delta'; 11074 + delta: string; 11075 11075 }; 11076 11076 11077 11077 /** ··· 11082 11082 */ 11083 11083 export type RealtimeServerEventResponseAudioTranscriptDone = { 11084 11084 /** 11085 - * The index of the content part in the item's content array. 11085 + * The unique ID of the server event. 11086 + */ 11087 + event_id: string; 11088 + /** 11089 + * The event type, must be `response.audio_transcript.done`. 11086 11090 */ 11087 - content_index: number; 11091 + type: 'response.audio_transcript.done'; 11088 11092 /** 11089 - * The unique ID of the server event. 11093 + * The ID of the response. 11090 11094 */ 11091 - event_id: string; 11095 + response_id: string; 11092 11096 /** 11093 11097 * The ID of the item. 11094 11098 */ ··· 11098 11102 */ 11099 11103 output_index: number; 11100 11104 /** 11101 - * The ID of the response. 11105 + * The index of the content part in the item's content array. 11102 11106 */ 11103 - response_id: string; 11107 + content_index: number; 11104 11108 /** 11105 11109 * The final transcript of the audio. 11106 11110 */ 11107 11111 transcript: string; 11108 - /** 11109 - * The event type, must be `response.audio_transcript.done`. 11110 - */ 11111 - type: 'response.audio_transcript.done'; 11112 11112 }; 11113 11113 11114 11114 /** ··· 11118 11118 */ 11119 11119 export type RealtimeServerEventResponseContentPartAdded = { 11120 11120 /** 11121 - * The index of the content part in the item's content array. 11122 - */ 11123 - content_index: number; 11124 - /** 11125 11121 * The unique ID of the server event. 11126 11122 */ 11127 11123 event_id: string; 11128 11124 /** 11125 + * The event type, must be `response.content_part.added`. 11126 + */ 11127 + type: 'response.content_part.added'; 11128 + /** 11129 + * The ID of the response. 11130 + */ 11131 + response_id: string; 11132 + /** 11129 11133 * The ID of the item to which the content part was added. 11130 11134 */ 11131 11135 item_id: string; ··· 11134 11138 */ 11135 11139 output_index: number; 11136 11140 /** 11141 + * The index of the content part in the item's content array. 11142 + */ 11143 + content_index: number; 11144 + /** 11137 11145 * The content part that was added. 11138 11146 */ 11139 11147 part: { 11140 11148 /** 11141 - * Base64-encoded audio data (if type is "audio"). 11149 + * The content type ("text", "audio"). 11142 11150 */ 11143 - audio?: string; 11151 + type?: 'text' | 'audio'; 11144 11152 /** 11145 11153 * The text content (if type is "text"). 11146 11154 */ 11147 11155 text?: string; 11148 11156 /** 11157 + * Base64-encoded audio data (if type is "audio"). 11158 + */ 11159 + audio?: string; 11160 + /** 11149 11161 * The transcript of the audio (if type is "audio"). 11150 11162 */ 11151 11163 transcript?: string; 11152 - /** 11153 - * The content type ("text", "audio"). 11154 - */ 11155 - type?: 'text' | 'audio'; 11156 11164 }; 11157 - /** 11158 - * The ID of the response. 11159 - */ 11160 - response_id: string; 11161 - /** 11162 - * The event type, must be `response.content_part.added`. 11163 - */ 11164 - type: 'response.content_part.added'; 11165 11165 }; 11166 11166 11167 11167 /** ··· 11171 11171 */ 11172 11172 export type RealtimeServerEventResponseContentPartDone = { 11173 11173 /** 11174 - * The index of the content part in the item's content array. 11174 + * The unique ID of the server event. 11175 + */ 11176 + event_id: string; 11177 + /** 11178 + * The event type, must be `response.content_part.done`. 11175 11179 */ 11176 - content_index: number; 11180 + type: 'response.content_part.done'; 11177 11181 /** 11178 - * The unique ID of the server event. 11182 + * The ID of the response. 11179 11183 */ 11180 - event_id: string; 11184 + response_id: string; 11181 11185 /** 11182 11186 * The ID of the item. 11183 11187 */ ··· 11187 11191 */ 11188 11192 output_index: number; 11189 11193 /** 11194 + * The index of the content part in the item's content array. 11195 + */ 11196 + content_index: number; 11197 + /** 11190 11198 * The content part that is done. 11191 11199 */ 11192 11200 part: { 11193 11201 /** 11194 - * Base64-encoded audio data (if type is "audio"). 11202 + * The content type ("text", "audio"). 11195 11203 */ 11196 - audio?: string; 11204 + type?: 'text' | 'audio'; 11197 11205 /** 11198 11206 * The text content (if type is "text"). 11199 11207 */ 11200 11208 text?: string; 11201 11209 /** 11202 - * The transcript of the audio (if type is "audio"). 11210 + * Base64-encoded audio data (if type is "audio"). 11203 11211 */ 11204 - transcript?: string; 11212 + audio?: string; 11205 11213 /** 11206 - * The content type ("text", "audio"). 11214 + * The transcript of the audio (if type is "audio"). 11207 11215 */ 11208 - type?: 'text' | 'audio'; 11216 + transcript?: string; 11209 11217 }; 11210 - /** 11211 - * The ID of the response. 11212 - */ 11213 - response_id: string; 11214 - /** 11215 - * The event type, must be `response.content_part.done`. 11216 - */ 11217 - type: 'response.content_part.done'; 11218 11218 }; 11219 11219 11220 11220 /** ··· 11227 11227 * The unique ID of the server event. 11228 11228 */ 11229 11229 event_id: string; 11230 - response: RealtimeResponse; 11231 11230 /** 11232 11231 * The event type, must be `response.created`. 11233 11232 */ 11234 11233 type: 'response.created'; 11234 + response: RealtimeResponse; 11235 11235 }; 11236 11236 11237 11237 /** ··· 11245 11245 * The unique ID of the server event. 11246 11246 */ 11247 11247 event_id: string; 11248 - response: RealtimeResponse; 11249 11248 /** 11250 11249 * The event type, must be `response.done`. 11251 11250 */ 11252 11251 type: 'response.done'; 11252 + response: RealtimeResponse; 11253 11253 }; 11254 11254 11255 11255 /** ··· 11258 11258 */ 11259 11259 export type RealtimeServerEventResponseFunctionCallArgumentsDelta = { 11260 11260 /** 11261 - * The ID of the function call. 11261 + * The unique ID of the server event. 11262 11262 */ 11263 - call_id: string; 11263 + event_id: string; 11264 11264 /** 11265 - * The arguments delta as a JSON string. 11265 + * The event type, must be `response.function_call_arguments.delta`. 11266 + * 11266 11267 */ 11267 - delta: string; 11268 + type: 'response.function_call_arguments.delta'; 11268 11269 /** 11269 - * The unique ID of the server event. 11270 + * The ID of the response. 11270 11271 */ 11271 - event_id: string; 11272 + response_id: string; 11272 11273 /** 11273 11274 * The ID of the function call item. 11274 11275 */ ··· 11278 11279 */ 11279 11280 output_index: number; 11280 11281 /** 11281 - * The ID of the response. 11282 + * The ID of the function call. 11282 11283 */ 11283 - response_id: string; 11284 + call_id: string; 11284 11285 /** 11285 - * The event type, must be `response.function_call_arguments.delta`. 11286 - * 11286 + * The arguments delta as a JSON string. 11287 11287 */ 11288 - type: 'response.function_call_arguments.delta'; 11288 + delta: string; 11289 11289 }; 11290 11290 11291 11291 /** ··· 11295 11295 */ 11296 11296 export type RealtimeServerEventResponseFunctionCallArgumentsDone = { 11297 11297 /** 11298 - * The final arguments as a JSON string. 11298 + * The unique ID of the server event. 11299 11299 */ 11300 - arguments: string; 11300 + event_id: string; 11301 11301 /** 11302 - * The ID of the function call. 11302 + * The event type, must be `response.function_call_arguments.done`. 11303 + * 11303 11304 */ 11304 - call_id: string; 11305 + type: 'response.function_call_arguments.done'; 11305 11306 /** 11306 - * The unique ID of the server event. 11307 + * The ID of the response. 11307 11308 */ 11308 - event_id: string; 11309 + response_id: string; 11309 11310 /** 11310 11311 * The ID of the function call item. 11311 11312 */ ··· 11315 11316 */ 11316 11317 output_index: number; 11317 11318 /** 11318 - * The ID of the response. 11319 + * The ID of the function call. 11319 11320 */ 11320 - response_id: string; 11321 + call_id: string; 11321 11322 /** 11322 - * The event type, must be `response.function_call_arguments.done`. 11323 - * 11323 + * The final arguments as a JSON string. 11324 11324 */ 11325 - type: 'response.function_call_arguments.done'; 11325 + arguments: string; 11326 11326 }; 11327 11327 11328 11328 /** ··· 11333 11333 * The unique ID of the server event. 11334 11334 */ 11335 11335 event_id: string; 11336 - item: RealtimeConversationItem; 11337 11336 /** 11338 - * The index of the output item in the Response. 11337 + * The event type, must be `response.output_item.added`. 11339 11338 */ 11340 - output_index: number; 11339 + type: 'response.output_item.added'; 11341 11340 /** 11342 11341 * The ID of the Response to which the item belongs. 11343 11342 */ 11344 11343 response_id: string; 11345 11344 /** 11346 - * The event type, must be `response.output_item.added`. 11345 + * The index of the output item in the Response. 11347 11346 */ 11348 - type: 'response.output_item.added'; 11347 + output_index: number; 11348 + item: RealtimeConversationItem; 11349 11349 }; 11350 11350 11351 11351 /** ··· 11358 11358 * The unique ID of the server event. 11359 11359 */ 11360 11360 event_id: string; 11361 - item: RealtimeConversationItem; 11362 11361 /** 11363 - * The index of the output item in the Response. 11362 + * The event type, must be `response.output_item.done`. 11364 11363 */ 11365 - output_index: number; 11364 + type: 'response.output_item.done'; 11366 11365 /** 11367 11366 * The ID of the Response to which the item belongs. 11368 11367 */ 11369 11368 response_id: string; 11370 11369 /** 11371 - * The event type, must be `response.output_item.done`. 11370 + * The index of the output item in the Response. 11372 11371 */ 11373 - type: 'response.output_item.done'; 11372 + output_index: number; 11373 + item: RealtimeConversationItem; 11374 11374 }; 11375 11375 11376 11376 /** ··· 11378 11378 */ 11379 11379 export type RealtimeServerEventResponseTextDelta = { 11380 11380 /** 11381 - * The index of the content part in the item's content array. 11381 + * The unique ID of the server event. 11382 11382 */ 11383 - content_index: number; 11383 + event_id: string; 11384 11384 /** 11385 - * The text delta. 11385 + * The event type, must be `response.text.delta`. 11386 11386 */ 11387 - delta: string; 11387 + type: 'response.text.delta'; 11388 11388 /** 11389 - * The unique ID of the server event. 11389 + * The ID of the response. 11390 11390 */ 11391 - event_id: string; 11391 + response_id: string; 11392 11392 /** 11393 11393 * The ID of the item. 11394 11394 */ ··· 11398 11398 */ 11399 11399 output_index: number; 11400 11400 /** 11401 - * The ID of the response. 11401 + * The index of the content part in the item's content array. 11402 11402 */ 11403 - response_id: string; 11403 + content_index: number; 11404 11404 /** 11405 - * The event type, must be `response.text.delta`. 11405 + * The text delta. 11406 11406 */ 11407 - type: 'response.text.delta'; 11407 + delta: string; 11408 11408 }; 11409 11409 11410 11410 /** ··· 11414 11414 */ 11415 11415 export type RealtimeServerEventResponseTextDone = { 11416 11416 /** 11417 - * The index of the content part in the item's content array. 11417 + * The unique ID of the server event. 11418 + */ 11419 + event_id: string; 11420 + /** 11421 + * The event type, must be `response.text.done`. 11418 11422 */ 11419 - content_index: number; 11423 + type: 'response.text.done'; 11420 11424 /** 11421 - * The unique ID of the server event. 11425 + * The ID of the response. 11422 11426 */ 11423 - event_id: string; 11427 + response_id: string; 11424 11428 /** 11425 11429 * The ID of the item. 11426 11430 */ ··· 11430 11434 */ 11431 11435 output_index: number; 11432 11436 /** 11433 - * The ID of the response. 11437 + * The index of the content part in the item's content array. 11434 11438 */ 11435 - response_id: string; 11439 + content_index: number; 11436 11440 /** 11437 11441 * The final text content. 11438 11442 */ 11439 11443 text: string; 11440 - /** 11441 - * The event type, must be `response.text.done`. 11442 - */ 11443 - type: 'response.text.done'; 11444 11444 }; 11445 11445 11446 11446 /** ··· 11454 11454 * The unique ID of the server event. 11455 11455 */ 11456 11456 event_id: string; 11457 - session: RealtimeSession; 11458 11457 /** 11459 11458 * The event type, must be `session.created`. 11460 11459 */ 11461 11460 type: 'session.created'; 11461 + session: RealtimeSession; 11462 11462 }; 11463 11463 11464 11464 /** ··· 11471 11471 * The unique ID of the server event. 11472 11472 */ 11473 11473 event_id: string; 11474 - session: RealtimeSession; 11475 11474 /** 11476 11475 * The event type, must be `session.updated`. 11477 11476 */ 11478 11477 type: 'session.updated'; 11478 + session: RealtimeSession; 11479 11479 }; 11480 11480 11481 11481 /** ··· 11488 11488 * The unique ID of the server event. 11489 11489 */ 11490 11490 event_id: string; 11491 - session: RealtimeTranscriptionSessionCreateResponse; 11492 11491 /** 11493 11492 * The event type, must be `transcription_session.updated`. 11494 11493 */ 11495 11494 type: 'transcription_session.updated'; 11495 + session: RealtimeTranscriptionSessionCreateResponse; 11496 11496 }; 11497 11497 11498 11498 /** ··· 11505 11505 */ 11506 11506 id?: string; 11507 11507 /** 11508 - * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 11509 - * For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, 11510 - * single channel (mono), and little-endian byte order. 11508 + * The set of modalities the model can respond with. To disable audio, 11509 + * set this to ["text"]. 11511 11510 * 11512 11511 */ 11513 - input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 11512 + modalities?: unknown; 11514 11513 /** 11515 - * Configuration for input audio noise reduction. This can be set to `null` to turn off. 11516 - * Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. 11517 - * Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. 11514 + * The Realtime model used for this session. 11518 11515 * 11519 11516 */ 11520 - input_audio_noise_reduction?: { 11521 - /** 11522 - * Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones. 11523 - * 11524 - */ 11525 - type?: 'near_field' | 'far_field'; 11526 - }; 11527 - /** 11528 - * Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. 11529 - * 11530 - */ 11531 - input_audio_transcription?: { 11532 - /** 11533 - * The language of the input audio. Supplying the input language in 11534 - * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format 11535 - * will improve accuracy and latency. 11536 - * 11537 - */ 11538 - language?: string; 11539 - /** 11540 - * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`. 11541 - * 11542 - */ 11543 - model?: string; 11544 - /** 11545 - * An optional text to guide the model's style or continue a previous audio 11546 - * segment. 11547 - * For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). 11548 - * For `gpt-4o-transcribe` models, the prompt is a free text string, for example "expect words related to technology". 11549 - * 11550 - */ 11551 - prompt?: string; 11552 - }; 11517 + model?: 11518 + | 'gpt-4o-realtime-preview' 11519 + | 'gpt-4o-realtime-preview-2024-10-01' 11520 + | 'gpt-4o-realtime-preview-2024-12-17' 11521 + | 'gpt-4o-realtime-preview-2025-06-03' 11522 + | 'gpt-4o-mini-realtime-preview' 11523 + | 'gpt-4o-mini-realtime-preview-2024-12-17'; 11553 11524 /** 11554 11525 * The default system instructions (i.e. system message) prepended to model 11555 11526 * calls. This field allows the client to guide the model on desired ··· 11568 11539 */ 11569 11540 instructions?: string; 11570 11541 /** 11571 - * Maximum number of output tokens for a single assistant response, 11572 - * inclusive of tool calls. Provide an integer between 1 and 4096 to 11573 - * limit output tokens, or `inf` for the maximum available tokens for a 11574 - * given model. Defaults to `inf`. 11575 - * 11576 - */ 11577 - max_response_output_tokens?: number | 'inf'; 11578 - /** 11579 - * The set of modalities the model can respond with. To disable audio, 11580 - * set this to ["text"]. 11542 + * The voice the model uses to respond. Voice cannot be changed during the 11543 + * session once the model has responded with audio at least once. Current 11544 + * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 11545 + * `shimmer`, and `verse`. 11581 11546 * 11582 11547 */ 11583 - modalities?: unknown; 11548 + voice?: VoiceIdsShared; 11584 11549 /** 11585 - * The Realtime model used for this session. 11550 + * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 11551 + * For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, 11552 + * single channel (mono), and little-endian byte order. 11586 11553 * 11587 11554 */ 11588 - model?: 11589 - | 'gpt-4o-realtime-preview' 11590 - | 'gpt-4o-realtime-preview-2024-10-01' 11591 - | 'gpt-4o-realtime-preview-2024-12-17' 11592 - | 'gpt-4o-realtime-preview-2025-06-03' 11593 - | 'gpt-4o-mini-realtime-preview' 11594 - | 'gpt-4o-mini-realtime-preview-2024-12-17'; 11555 + input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 11595 11556 /** 11596 11557 * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 11597 11558 * For `pcm16`, output audio is sampled at a rate of 24kHz. ··· 11599 11560 */ 11600 11561 output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 11601 11562 /** 11602 - * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is 11603 - * the minimum speed. 1.5 is the maximum speed. This value can only be changed 11604 - * in between model turns, not while a response is in progress. 11563 + * Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. 11605 11564 * 11606 11565 */ 11607 - speed?: number; 11608 - /** 11609 - * Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance. 11610 - * 11611 - */ 11612 - temperature?: number; 11613 - /** 11614 - * How the model chooses tools. Options are `auto`, `none`, `required`, or 11615 - * specify a function. 11616 - * 11617 - */ 11618 - tool_choice?: string; 11619 - /** 11620 - * Tools (functions) available to the model. 11621 - */ 11622 - tools?: Array<{ 11566 + input_audio_transcription?: { 11623 11567 /** 11624 - * The description of the function, including guidance on when and how 11625 - * to call it, and guidance about what to tell the user when calling 11626 - * (if anything). 11568 + * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`. 11627 11569 * 11628 11570 */ 11629 - description?: string; 11571 + model?: string; 11630 11572 /** 11631 - * The name of the function. 11573 + * The language of the input audio. Supplying the input language in 11574 + * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format 11575 + * will improve accuracy and latency. 11576 + * 11632 11577 */ 11633 - name?: string; 11578 + language?: string; 11634 11579 /** 11635 - * Parameters of the function in JSON Schema. 11580 + * An optional text to guide the model's style or continue a previous audio 11581 + * segment. 11582 + * For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). 11583 + * For `gpt-4o-transcribe` models, the prompt is a free text string, for example "expect words related to technology". 11584 + * 11636 11585 */ 11637 - parameters?: { 11638 - [key: string]: unknown; 11639 - }; 11640 - /** 11641 - * The type of the tool, i.e. `function`. 11642 - */ 11643 - type?: 'function'; 11644 - }>; 11645 - /** 11646 - * Tracing Configuration 11647 - * 11648 - * Configuration options for tracing. Set to null to disable tracing. Once 11649 - * tracing is enabled for a session, the configuration cannot be modified. 11650 - * 11651 - * `auto` will create a trace for the session with default values for the 11652 - * workflow name, group id, and metadata. 11653 - * 11654 - */ 11655 - tracing?: 11656 - | 'auto' 11657 - | { 11658 - /** 11659 - * The group id to attach to this trace to enable filtering and 11660 - * grouping in the traces dashboard. 11661 - * 11662 - */ 11663 - group_id?: string; 11664 - /** 11665 - * The arbitrary metadata to attach to this trace to enable 11666 - * filtering in the traces dashboard. 11667 - * 11668 - */ 11669 - metadata?: { 11670 - [key: string]: unknown; 11671 - }; 11672 - /** 11673 - * The name of the workflow to attach to this trace. This is used to 11674 - * name the trace in the traces dashboard. 11675 - * 11676 - */ 11677 - workflow_name?: string; 11678 - }; 11586 + prompt?: string; 11587 + }; 11679 11588 /** 11680 11589 * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. 11681 11590 * Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. ··· 11684 11593 */ 11685 11594 turn_detection?: { 11686 11595 /** 11687 - * Whether or not to automatically generate a response when a VAD stop event occurs. 11596 + * Type of turn detection. 11688 11597 * 11689 11598 */ 11690 - create_response?: boolean; 11599 + type?: 'server_vad' | 'semantic_vad'; 11691 11600 /** 11692 11601 * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. 11693 11602 * 11694 11603 */ 11695 11604 eagerness?: 'low' | 'medium' | 'high' | 'auto'; 11696 11605 /** 11697 - * Whether or not to automatically interrupt any ongoing response with output to the default 11698 - * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. 11606 + * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 11607 + * higher threshold will require louder audio to activate the model, and 11608 + * thus might perform better in noisy environments. 11699 11609 * 11700 11610 */ 11701 - interrupt_response?: boolean; 11611 + threshold?: number; 11702 11612 /** 11703 11613 * Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in 11704 11614 * milliseconds). Defaults to 300ms. ··· 11713 11623 */ 11714 11624 silence_duration_ms?: number; 11715 11625 /** 11716 - * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 11717 - * higher threshold will require louder audio to activate the model, and 11718 - * thus might perform better in noisy environments. 11626 + * Whether or not to automatically generate a response when a VAD stop event occurs. 11719 11627 * 11720 11628 */ 11721 - threshold?: number; 11722 - /** 11723 - * Type of turn detection. 11724 - * 11725 - */ 11726 - type?: 'server_vad' | 'semantic_vad'; 11727 - }; 11728 - /** 11729 - * The voice the model uses to respond. Voice cannot be changed during the 11730 - * session once the model has responded with audio at least once. Current 11731 - * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 11732 - * `shimmer`, and `verse`. 11733 - * 11734 - */ 11735 - voice?: VoiceIdsShared; 11736 - }; 11737 - 11738 - /** 11739 - * Realtime session object configuration. 11740 - */ 11741 - export type RealtimeSessionCreateRequest = { 11742 - /** 11743 - * Configuration options for the generated client secret. 11744 - * 11745 - */ 11746 - client_secret?: { 11629 + create_response?: boolean; 11747 11630 /** 11748 - * Configuration for the ephemeral token expiration. 11631 + * Whether or not to automatically interrupt any ongoing response with output to the default 11632 + * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. 11749 11633 * 11750 11634 */ 11751 - expires_after?: { 11752 - /** 11753 - * The anchor point for the ephemeral token expiration. Only `created_at` is currently supported. 11754 - * 11755 - */ 11756 - anchor: 'created_at'; 11757 - /** 11758 - * The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200`. 11759 - * 11760 - */ 11761 - seconds?: number; 11762 - }; 11635 + interrupt_response?: boolean; 11763 11636 }; 11764 11637 /** 11765 - * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 11766 - * For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, 11767 - * single channel (mono), and little-endian byte order. 11768 - * 11769 - */ 11770 - input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 11771 - /** 11772 11638 * Configuration for input audio noise reduction. This can be set to `null` to turn off. 11773 11639 * Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. 11774 11640 * Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. ··· 11782 11648 type?: 'near_field' | 'far_field'; 11783 11649 }; 11784 11650 /** 11785 - * Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. 11651 + * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is 11652 + * the minimum speed. 1.5 is the maximum speed. This value can only be changed 11653 + * in between model turns, not while a response is in progress. 11654 + * 11655 + */ 11656 + speed?: number; 11657 + /** 11658 + * Tracing Configuration 11659 + * 11660 + * Configuration options for tracing. Set to null to disable tracing. Once 11661 + * tracing is enabled for a session, the configuration cannot be modified. 11662 + * 11663 + * `auto` will create a trace for the session with default values for the 11664 + * workflow name, group id, and metadata. 11786 11665 * 11787 11666 */ 11788 - input_audio_transcription?: { 11667 + tracing?: 11668 + | 'auto' 11669 + | { 11670 + /** 11671 + * The name of the workflow to attach to this trace. This is used to 11672 + * name the trace in the traces dashboard. 11673 + * 11674 + */ 11675 + workflow_name?: string; 11676 + /** 11677 + * The group id to attach to this trace to enable filtering and 11678 + * grouping in the traces dashboard. 11679 + * 11680 + */ 11681 + group_id?: string; 11682 + /** 11683 + * The arbitrary metadata to attach to this trace to enable 11684 + * filtering in the traces dashboard. 11685 + * 11686 + */ 11687 + metadata?: { 11688 + [key: string]: unknown; 11689 + }; 11690 + }; 11691 + /** 11692 + * Tools (functions) available to the model. 11693 + */ 11694 + tools?: Array<{ 11789 11695 /** 11790 - * The language of the input audio. Supplying the input language in 11791 - * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format 11792 - * will improve accuracy and latency. 11793 - * 11696 + * The type of the tool, i.e. `function`. 11794 11697 */ 11795 - language?: string; 11698 + type?: 'function'; 11796 11699 /** 11797 - * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`. 11700 + * The name of the function. 11701 + */ 11702 + name?: string; 11703 + /** 11704 + * The description of the function, including guidance on when and how 11705 + * to call it, and guidance about what to tell the user when calling 11706 + * (if anything). 11798 11707 * 11799 11708 */ 11800 - model?: string; 11709 + description?: string; 11801 11710 /** 11802 - * An optional text to guide the model's style or continue a previous audio 11803 - * segment. 11804 - * For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). 11805 - * For `gpt-4o-transcribe` models, the prompt is a free text string, for example "expect words related to technology". 11806 - * 11711 + * Parameters of the function in JSON Schema. 11807 11712 */ 11808 - prompt?: string; 11809 - }; 11713 + parameters?: { 11714 + [key: string]: unknown; 11715 + }; 11716 + }>; 11810 11717 /** 11811 - * The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. 11718 + * How the model chooses tools. Options are `auto`, `none`, `required`, or 11719 + * specify a function. 11812 11720 * 11813 - * Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. 11721 + */ 11722 + tool_choice?: string; 11723 + /** 11724 + * Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance. 11814 11725 * 11815 11726 */ 11816 - instructions?: string; 11727 + temperature?: number; 11817 11728 /** 11818 11729 * Maximum number of output tokens for a single assistant response, 11819 11730 * inclusive of tool calls. Provide an integer between 1 and 4096 to ··· 11822 11733 * 11823 11734 */ 11824 11735 max_response_output_tokens?: number | 'inf'; 11736 + }; 11737 + 11738 + /** 11739 + * Realtime session object configuration. 11740 + */ 11741 + export type RealtimeSessionCreateRequest = { 11825 11742 /** 11826 11743 * The set of modalities the model can respond with. To disable audio, 11827 11744 * set this to ["text"]. ··· 11840 11757 | 'gpt-4o-mini-realtime-preview' 11841 11758 | 'gpt-4o-mini-realtime-preview-2024-12-17'; 11842 11759 /** 11843 - * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 11844 - * For `pcm16`, output audio is sampled at a rate of 24kHz. 11760 + * The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. 11761 + * 11762 + * Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. 11845 11763 * 11846 11764 */ 11847 - output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 11765 + instructions?: string; 11848 11766 /** 11849 - * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is 11850 - * the minimum speed. 1.5 is the maximum speed. This value can only be changed 11851 - * in between model turns, not while a response is in progress. 11767 + * The voice the model uses to respond. Voice cannot be changed during the 11768 + * session once the model has responded with audio at least once. Current 11769 + * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 11770 + * `shimmer`, and `verse`. 11771 + * 11772 + */ 11773 + voice?: VoiceIdsShared; 11774 + /** 11775 + * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 11776 + * For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, 11777 + * single channel (mono), and little-endian byte order. 11852 11778 * 11853 11779 */ 11854 - speed?: number; 11780 + input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 11855 11781 /** 11856 - * Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance. 11782 + * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 11783 + * For `pcm16`, output audio is sampled at a rate of 24kHz. 11857 11784 * 11858 11785 */ 11859 - temperature?: number; 11786 + output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 11860 11787 /** 11861 - * How the model chooses tools. Options are `auto`, `none`, `required`, or 11862 - * specify a function. 11788 + * Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. 11863 11789 * 11864 11790 */ 11865 - tool_choice?: string; 11791 + input_audio_transcription?: { 11792 + /** 11793 + * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`. 11794 + * 11795 + */ 11796 + model?: string; 11797 + /** 11798 + * The language of the input audio. Supplying the input language in 11799 + * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format 11800 + * will improve accuracy and latency. 11801 + * 11802 + */ 11803 + language?: string; 11804 + /** 11805 + * An optional text to guide the model's style or continue a previous audio 11806 + * segment. 11807 + * For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). 11808 + * For `gpt-4o-transcribe` models, the prompt is a free text string, for example "expect words related to technology". 11809 + * 11810 + */ 11811 + prompt?: string; 11812 + }; 11866 11813 /** 11867 - * Tools (functions) available to the model. 11814 + * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. 11815 + * Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. 11816 + * Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. 11817 + * 11868 11818 */ 11869 - tools?: Array<{ 11819 + turn_detection?: { 11820 + /** 11821 + * Type of turn detection. 11822 + * 11823 + */ 11824 + type?: 'server_vad' | 'semantic_vad'; 11870 11825 /** 11871 - * The description of the function, including guidance on when and how 11872 - * to call it, and guidance about what to tell the user when calling 11873 - * (if anything). 11826 + * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. 11874 11827 * 11875 11828 */ 11876 - description?: string; 11829 + eagerness?: 'low' | 'medium' | 'high' | 'auto'; 11830 + /** 11831 + * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 11832 + * higher threshold will require louder audio to activate the model, and 11833 + * thus might perform better in noisy environments. 11834 + * 11835 + */ 11836 + threshold?: number; 11837 + /** 11838 + * Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in 11839 + * milliseconds). Defaults to 300ms. 11840 + * 11841 + */ 11842 + prefix_padding_ms?: number; 11843 + /** 11844 + * Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults 11845 + * to 500ms. With shorter values the model will respond more quickly, 11846 + * but may jump in on short pauses from the user. 11847 + * 11848 + */ 11849 + silence_duration_ms?: number; 11877 11850 /** 11878 - * The name of the function. 11851 + * Whether or not to automatically generate a response when a VAD stop event occurs. 11852 + * 11879 11853 */ 11880 - name?: string; 11854 + create_response?: boolean; 11881 11855 /** 11882 - * Parameters of the function in JSON Schema. 11856 + * Whether or not to automatically interrupt any ongoing response with output to the default 11857 + * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. 11858 + * 11883 11859 */ 11884 - parameters?: { 11885 - [key: string]: unknown; 11886 - }; 11860 + interrupt_response?: boolean; 11861 + }; 11862 + /** 11863 + * Configuration for input audio noise reduction. This can be set to `null` to turn off. 11864 + * Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. 11865 + * Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. 11866 + * 11867 + */ 11868 + input_audio_noise_reduction?: { 11887 11869 /** 11888 - * The type of the tool, i.e. `function`. 11870 + * Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones. 11871 + * 11889 11872 */ 11890 - type?: 'function'; 11891 - }>; 11873 + type?: 'near_field' | 'far_field'; 11874 + }; 11875 + /** 11876 + * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is 11877 + * the minimum speed. 1.5 is the maximum speed. This value can only be changed 11878 + * in between model turns, not while a response is in progress. 11879 + * 11880 + */ 11881 + speed?: number; 11892 11882 /** 11893 11883 * Tracing Configuration 11894 11884 * ··· 11902 11892 tracing?: 11903 11893 | 'auto' 11904 11894 | { 11895 + /** 11896 + * The name of the workflow to attach to this trace. This is used to 11897 + * name the trace in the traces dashboard. 11898 + * 11899 + */ 11900 + workflow_name?: string; 11905 11901 /** 11906 11902 * The group id to attach to this trace to enable filtering and 11907 11903 * grouping in the traces dashboard. ··· 11916 11912 metadata?: { 11917 11913 [key: string]: unknown; 11918 11914 }; 11919 - /** 11920 - * The name of the workflow to attach to this trace. This is used to 11921 - * name the trace in the traces dashboard. 11922 - * 11923 - */ 11924 - workflow_name?: string; 11925 11915 }; 11926 11916 /** 11927 - * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. 11928 - * Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. 11929 - * Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. 11930 - * 11917 + * Tools (functions) available to the model. 11931 11918 */ 11932 - turn_detection?: { 11919 + tools?: Array<{ 11933 11920 /** 11934 - * Whether or not to automatically generate a response when a VAD stop event occurs. 11935 - * 11921 + * The type of the tool, i.e. `function`. 11936 11922 */ 11937 - create_response?: boolean; 11923 + type?: 'function'; 11938 11924 /** 11939 - * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. 11940 - * 11925 + * The name of the function. 11941 11926 */ 11942 - eagerness?: 'low' | 'medium' | 'high' | 'auto'; 11927 + name?: string; 11943 11928 /** 11944 - * Whether or not to automatically interrupt any ongoing response with output to the default 11945 - * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. 11929 + * The description of the function, including guidance on when and how 11930 + * to call it, and guidance about what to tell the user when calling 11931 + * (if anything). 11946 11932 * 11947 11933 */ 11948 - interrupt_response?: boolean; 11934 + description?: string; 11949 11935 /** 11950 - * Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in 11951 - * milliseconds). Defaults to 300ms. 11952 - * 11936 + * Parameters of the function in JSON Schema. 11953 11937 */ 11954 - prefix_padding_ms?: number; 11938 + parameters?: { 11939 + [key: string]: unknown; 11940 + }; 11941 + }>; 11942 + /** 11943 + * How the model chooses tools. Options are `auto`, `none`, `required`, or 11944 + * specify a function. 11945 + * 11946 + */ 11947 + tool_choice?: string; 11948 + /** 11949 + * Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance. 11950 + * 11951 + */ 11952 + temperature?: number; 11953 + /** 11954 + * Maximum number of output tokens for a single assistant response, 11955 + * inclusive of tool calls. Provide an integer between 1 and 4096 to 11956 + * limit output tokens, or `inf` for the maximum available tokens for a 11957 + * given model. Defaults to `inf`. 11958 + * 11959 + */ 11960 + max_response_output_tokens?: number | 'inf'; 11961 + /** 11962 + * Configuration options for the generated client secret. 11963 + * 11964 + */ 11965 + client_secret?: { 11955 11966 /** 11956 - * Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults 11957 - * to 500ms. With shorter values the model will respond more quickly, 11958 - * but may jump in on short pauses from the user. 11967 + * Configuration for the ephemeral token expiration. 11959 11968 * 11960 11969 */ 11961 - silence_duration_ms?: number; 11962 - /** 11963 - * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 11964 - * higher threshold will require louder audio to activate the model, and 11965 - * thus might perform better in noisy environments. 11966 - * 11967 - */ 11968 - threshold?: number; 11969 - /** 11970 - * Type of turn detection. 11971 - * 11972 - */ 11973 - type?: 'server_vad' | 'semantic_vad'; 11970 + expires_after?: { 11971 + /** 11972 + * The anchor point for the ephemeral token expiration. Only `created_at` is currently supported. 11973 + * 11974 + */ 11975 + anchor: 'created_at'; 11976 + /** 11977 + * The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200`. 11978 + * 11979 + */ 11980 + seconds?: number; 11981 + }; 11974 11982 }; 11975 - /** 11976 - * The voice the model uses to respond. Voice cannot be changed during the 11977 - * session once the model has responded with audio at least once. Current 11978 - * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 11979 - * `shimmer`, and `verse`. 11980 - * 11981 - */ 11982 - voice?: VoiceIdsShared; 11983 11983 }; 11984 11984 11985 11985 /** ··· 11993 11993 */ 11994 11994 client_secret: { 11995 11995 /** 11996 - * Timestamp for when the token expires. Currently, all tokens expire 11997 - * after one minute. 11998 - * 11999 - */ 12000 - expires_at: number; 12001 - /** 12002 11996 * Ephemeral key usable in client environments to authenticate connections 12003 11997 * to the Realtime API. Use this in client-side environments rather than 12004 11998 * a standard API token, which should only be used server-side. 12005 11999 * 12006 12000 */ 12007 12001 value: string; 12008 - }; 12009 - /** 12010 - * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 12011 - * 12012 - */ 12013 - input_audio_format?: string; 12014 - /** 12015 - * Configuration for input audio transcription, defaults to off and can be 12016 - * set to `null` to turn off once on. Input audio transcription is not native 12017 - * to the model, since the model consumes audio directly. Transcription runs 12018 - * asynchronously and should be treated as rough guidance 12019 - * rather than the representation understood by the model. 12020 - * 12021 - */ 12022 - input_audio_transcription?: { 12023 12002 /** 12024 - * The model to use for transcription. 12003 + * Timestamp for when the token expires. Currently, all tokens expire 12004 + * after one minute. 12025 12005 * 12026 12006 */ 12027 - model?: string; 12007 + expires_at: number; 12028 12008 }; 12009 + /** 12010 + * The set of modalities the model can respond with. To disable audio, 12011 + * set this to ["text"]. 12012 + * 12013 + */ 12014 + modalities?: unknown; 12029 12015 /** 12030 12016 * The default system instructions (i.e. system message) prepended to model 12031 12017 * calls. This field allows the client to guide the model on desired ··· 12043 12029 */ 12044 12030 instructions?: string; 12045 12031 /** 12046 - * Maximum number of output tokens for a single assistant response, 12047 - * inclusive of tool calls. Provide an integer between 1 and 4096 to 12048 - * limit output tokens, or `inf` for the maximum available tokens for a 12049 - * given model. Defaults to `inf`. 12032 + * The voice the model uses to respond. Voice cannot be changed during the 12033 + * session once the model has responded with audio at least once. Current 12034 + * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 12035 + * `shimmer`, and `verse`. 12050 12036 * 12051 12037 */ 12052 - max_response_output_tokens?: number | 'inf'; 12038 + voice?: VoiceIdsShared; 12053 12039 /** 12054 - * The set of modalities the model can respond with. To disable audio, 12055 - * set this to ["text"]. 12040 + * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 12056 12041 * 12057 12042 */ 12058 - modalities?: unknown; 12043 + input_audio_format?: string; 12059 12044 /** 12060 12045 * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 12061 12046 * 12062 12047 */ 12063 12048 output_audio_format?: string; 12064 12049 /** 12050 + * Configuration for input audio transcription, defaults to off and can be 12051 + * set to `null` to turn off once on. Input audio transcription is not native 12052 + * to the model, since the model consumes audio directly. Transcription runs 12053 + * asynchronously and should be treated as rough guidance 12054 + * rather than the representation understood by the model. 12055 + * 12056 + */ 12057 + input_audio_transcription?: { 12058 + /** 12059 + * The model to use for transcription. 12060 + * 12061 + */ 12062 + model?: string; 12063 + }; 12064 + /** 12065 12065 * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is 12066 12066 * the minimum speed. 1.5 is the maximum speed. This value can only be changed 12067 12067 * in between model turns, not while a response is in progress. ··· 12069 12069 */ 12070 12070 speed?: number; 12071 12071 /** 12072 - * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. 12073 - * 12074 - */ 12075 - temperature?: number; 12076 - /** 12077 - * How the model chooses tools. Options are `auto`, `none`, `required`, or 12078 - * specify a function. 12079 - * 12080 - */ 12081 - tool_choice?: string; 12082 - /** 12083 - * Tools (functions) available to the model. 12084 - */ 12085 - tools?: Array<{ 12086 - /** 12087 - * The description of the function, including guidance on when and how 12088 - * to call it, and guidance about what to tell the user when calling 12089 - * (if anything). 12090 - * 12091 - */ 12092 - description?: string; 12093 - /** 12094 - * The name of the function. 12095 - */ 12096 - name?: string; 12097 - /** 12098 - * Parameters of the function in JSON Schema. 12099 - */ 12100 - parameters?: { 12101 - [key: string]: unknown; 12102 - }; 12103 - /** 12104 - * The type of the tool, i.e. `function`. 12105 - */ 12106 - type?: 'function'; 12107 - }>; 12108 - /** 12109 12072 * Tracing Configuration 12110 12073 * 12111 12074 * Configuration options for tracing. Set to null to disable tracing. Once ··· 12118 12081 tracing?: 12119 12082 | 'auto' 12120 12083 | { 12084 + /** 12085 + * The name of the workflow to attach to this trace. This is used to 12086 + * name the trace in the traces dashboard. 12087 + * 12088 + */ 12089 + workflow_name?: string; 12121 12090 /** 12122 12091 * The group id to attach to this trace to enable filtering and 12123 12092 * grouping in the traces dashboard. ··· 12132 12101 metadata?: { 12133 12102 [key: string]: unknown; 12134 12103 }; 12135 - /** 12136 - * The name of the workflow to attach to this trace. This is used to 12137 - * name the trace in the traces dashboard. 12138 - * 12139 - */ 12140 - workflow_name?: string; 12141 12104 }; 12142 12105 /** 12143 12106 * Configuration for turn detection. Can be set to `null` to turn off. Server ··· 12147 12110 */ 12148 12111 turn_detection?: { 12149 12112 /** 12113 + * Type of turn detection, only `server_vad` is currently supported. 12114 + * 12115 + */ 12116 + type?: string; 12117 + /** 12118 + * Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 12119 + * higher threshold will require louder audio to activate the model, and 12120 + * thus might perform better in noisy environments. 12121 + * 12122 + */ 12123 + threshold?: number; 12124 + /** 12150 12125 * Amount of audio to include before the VAD detected speech (in 12151 12126 * milliseconds). Defaults to 300ms. 12152 12127 * ··· 12159 12134 * 12160 12135 */ 12161 12136 silence_duration_ms?: number; 12137 + }; 12138 + /** 12139 + * Tools (functions) available to the model. 12140 + */ 12141 + tools?: Array<{ 12162 12142 /** 12163 - * Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 12164 - * higher threshold will require louder audio to activate the model, and 12165 - * thus might perform better in noisy environments. 12143 + * The type of the tool, i.e. `function`. 12144 + */ 12145 + type?: 'function'; 12146 + /** 12147 + * The name of the function. 12148 + */ 12149 + name?: string; 12150 + /** 12151 + * The description of the function, including guidance on when and how 12152 + * to call it, and guidance about what to tell the user when calling 12153 + * (if anything). 12166 12154 * 12167 12155 */ 12168 - threshold?: number; 12156 + description?: string; 12169 12157 /** 12170 - * Type of turn detection, only `server_vad` is currently supported. 12171 - * 12158 + * Parameters of the function in JSON Schema. 12172 12159 */ 12173 - type?: string; 12174 - }; 12160 + parameters?: { 12161 + [key: string]: unknown; 12162 + }; 12163 + }>; 12164 + /** 12165 + * How the model chooses tools. Options are `auto`, `none`, `required`, or 12166 + * specify a function. 12167 + * 12168 + */ 12169 + tool_choice?: string; 12175 12170 /** 12176 - * The voice the model uses to respond. Voice cannot be changed during the 12177 - * session once the model has responded with audio at least once. Current 12178 - * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, 12179 - * `shimmer`, and `verse`. 12171 + * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. 12180 12172 * 12181 12173 */ 12182 - voice?: VoiceIdsShared; 12174 + temperature?: number; 12175 + /** 12176 + * Maximum number of output tokens for a single assistant response, 12177 + * inclusive of tool calls. Provide an integer between 1 and 4096 to 12178 + * limit output tokens, or `inf` for the maximum available tokens for a 12179 + * given model. Defaults to `inf`. 12180 + * 12181 + */ 12182 + max_response_output_tokens?: number | 'inf'; 12183 12183 }; 12184 12184 12185 12185 /** ··· 12187 12187 */ 12188 12188 export type RealtimeTranscriptionSessionCreateRequest = { 12189 12189 /** 12190 - * Configuration options for the generated client secret. 12190 + * The set of modalities the model can respond with. To disable audio, 12191 + * set this to ["text"]. 12191 12192 * 12192 12193 */ 12193 - client_secret?: { 12194 - /** 12195 - * Configuration for the ephemeral token expiration. 12196 - * 12197 - */ 12198 - expires_at?: { 12199 - /** 12200 - * The anchor point for the ephemeral token expiration. Only `created_at` is currently supported. 12201 - * 12202 - */ 12203 - anchor?: 'created_at'; 12204 - /** 12205 - * The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200`. 12206 - * 12207 - */ 12208 - seconds?: number; 12209 - }; 12210 - }; 12211 - /** 12212 - * The set of items to include in the transcription. Current available items are: 12213 - * - `item.input_audio_transcription.logprobs` 12214 - * 12215 - */ 12216 - include?: Array<string>; 12194 + modalities?: unknown; 12217 12195 /** 12218 12196 * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 12219 12197 * For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, ··· 12222 12200 */ 12223 12201 input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw'; 12224 12202 /** 12225 - * Configuration for input audio noise reduction. This can be set to `null` to turn off. 12226 - * Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. 12227 - * Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. 12203 + * Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. 12228 12204 * 12229 12205 */ 12230 - input_audio_noise_reduction?: { 12206 + input_audio_transcription?: { 12231 12207 /** 12232 - * Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones. 12208 + * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`. 12233 12209 * 12234 12210 */ 12235 - type?: 'near_field' | 'far_field'; 12236 - }; 12237 - /** 12238 - * Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. 12239 - * 12240 - */ 12241 - input_audio_transcription?: { 12211 + model?: 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe' | 'whisper-1'; 12242 12212 /** 12243 12213 * The language of the input audio. Supplying the input language in 12244 12214 * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format ··· 12247 12217 */ 12248 12218 language?: string; 12249 12219 /** 12250 - * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`. 12251 - * 12252 - */ 12253 - model?: 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe' | 'whisper-1'; 12254 - /** 12255 12220 * An optional text to guide the model's style or continue a previous audio 12256 12221 * segment. 12257 12222 * For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). ··· 12260 12225 */ 12261 12226 prompt?: string; 12262 12227 }; 12263 - /** 12264 - * The set of modalities the model can respond with. To disable audio, 12265 - * set this to ["text"]. 12266 - * 12267 - */ 12268 - modalities?: unknown; 12269 12228 /** 12270 12229 * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. 12271 12230 * Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. ··· 12274 12233 */ 12275 12234 turn_detection?: { 12276 12235 /** 12277 - * Whether or not to automatically generate a response when a VAD stop event occurs. Not available for transcription sessions. 12236 + * Type of turn detection. 12278 12237 * 12279 12238 */ 12280 - create_response?: boolean; 12239 + type?: 'server_vad' | 'semantic_vad'; 12281 12240 /** 12282 12241 * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. 12283 12242 * 12284 12243 */ 12285 12244 eagerness?: 'low' | 'medium' | 'high' | 'auto'; 12286 12245 /** 12287 - * Whether or not to automatically interrupt any ongoing response with output to the default 12288 - * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. Not available for transcription sessions. 12246 + * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 12247 + * higher threshold will require louder audio to activate the model, and 12248 + * thus might perform better in noisy environments. 12289 12249 * 12290 12250 */ 12291 - interrupt_response?: boolean; 12251 + threshold?: number; 12292 12252 /** 12293 12253 * Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in 12294 12254 * milliseconds). Defaults to 300ms. ··· 12303 12263 */ 12304 12264 silence_duration_ms?: number; 12305 12265 /** 12306 - * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 12307 - * higher threshold will require louder audio to activate the model, and 12308 - * thus might perform better in noisy environments. 12266 + * Whether or not to automatically generate a response when a VAD stop event occurs. Not available for transcription sessions. 12267 + * 12268 + */ 12269 + create_response?: boolean; 12270 + /** 12271 + * Whether or not to automatically interrupt any ongoing response with output to the default 12272 + * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. Not available for transcription sessions. 12309 12273 * 12310 12274 */ 12311 - threshold?: number; 12275 + interrupt_response?: boolean; 12276 + }; 12277 + /** 12278 + * Configuration for input audio noise reduction. This can be set to `null` to turn off. 12279 + * Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. 12280 + * Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. 12281 + * 12282 + */ 12283 + input_audio_noise_reduction?: { 12312 12284 /** 12313 - * Type of turn detection. 12285 + * Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones. 12314 12286 * 12315 12287 */ 12316 - type?: 'server_vad' | 'semantic_vad'; 12288 + type?: 'near_field' | 'far_field'; 12289 + }; 12290 + /** 12291 + * The set of items to include in the transcription. Current available items are: 12292 + * - `item.input_audio_transcription.logprobs` 12293 + * 12294 + */ 12295 + include?: Array<string>; 12296 + /** 12297 + * Configuration options for the generated client secret. 12298 + * 12299 + */ 12300 + client_secret?: { 12301 + /** 12302 + * Configuration for the ephemeral token expiration. 12303 + * 12304 + */ 12305 + expires_at?: { 12306 + /** 12307 + * The anchor point for the ephemeral token expiration. Only `created_at` is currently supported. 12308 + * 12309 + */ 12310 + anchor?: 'created_at'; 12311 + /** 12312 + * The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200`. 12313 + * 12314 + */ 12315 + seconds?: number; 12316 + }; 12317 12317 }; 12318 12318 }; 12319 12319 ··· 12333 12333 */ 12334 12334 client_secret: { 12335 12335 /** 12336 - * Timestamp for when the token expires. Currently, all tokens expire 12337 - * after one minute. 12338 - * 12339 - */ 12340 - expires_at: number; 12341 - /** 12342 12336 * Ephemeral key usable in client environments to authenticate connections 12343 12337 * to the Realtime API. Use this in client-side environments rather than 12344 12338 * a standard API token, which should only be used server-side. 12345 12339 * 12346 12340 */ 12347 12341 value: string; 12342 + /** 12343 + * Timestamp for when the token expires. Currently, all tokens expire 12344 + * after one minute. 12345 + * 12346 + */ 12347 + expires_at: number; 12348 12348 }; 12349 + /** 12350 + * The set of modalities the model can respond with. To disable audio, 12351 + * set this to ["text"]. 12352 + * 12353 + */ 12354 + modalities?: unknown; 12349 12355 /** 12350 12356 * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. 12351 12357 * ··· 12357 12363 */ 12358 12364 input_audio_transcription?: { 12359 12365 /** 12366 + * The model to use for transcription. Can be `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, or `whisper-1`. 12367 + * 12368 + */ 12369 + model?: 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe' | 'whisper-1'; 12370 + /** 12360 12371 * The language of the input audio. Supplying the input language in 12361 12372 * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format 12362 12373 * will improve accuracy and latency. ··· 12364 12375 */ 12365 12376 language?: string; 12366 12377 /** 12367 - * The model to use for transcription. Can be `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, or `whisper-1`. 12368 - * 12369 - */ 12370 - model?: 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe' | 'whisper-1'; 12371 - /** 12372 12378 * An optional text to guide the model's style or continue a previous audio 12373 12379 * segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match 12374 12380 * the audio language. ··· 12377 12383 prompt?: string; 12378 12384 }; 12379 12385 /** 12380 - * The set of modalities the model can respond with. To disable audio, 12381 - * set this to ["text"]. 12382 - * 12383 - */ 12384 - modalities?: unknown; 12385 - /** 12386 12386 * Configuration for turn detection. Can be set to `null` to turn off. Server 12387 12387 * VAD means that the model will detect the start and end of speech based on 12388 12388 * audio volume and respond at the end of user speech. ··· 12390 12390 */ 12391 12391 turn_detection?: { 12392 12392 /** 12393 - * Amount of audio to include before the VAD detected speech (in 12394 - * milliseconds). Defaults to 300ms. 12395 - * 12396 - */ 12397 - prefix_padding_ms?: number; 12398 - /** 12399 - * Duration of silence to detect speech stop (in milliseconds). Defaults 12400 - * to 500ms. With shorter values the model will respond more quickly, 12401 - * but may jump in on short pauses from the user. 12393 + * Type of turn detection, only `server_vad` is currently supported. 12402 12394 * 12403 12395 */ 12404 - silence_duration_ms?: number; 12396 + type?: string; 12405 12397 /** 12406 12398 * Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A 12407 12399 * higher threshold will require louder audio to activate the model, and ··· 12410 12402 */ 12411 12403 threshold?: number; 12412 12404 /** 12413 - * Type of turn detection, only `server_vad` is currently supported. 12405 + * Amount of audio to include before the VAD detected speech (in 12406 + * milliseconds). Defaults to 300ms. 12407 + * 12408 + */ 12409 + prefix_padding_ms?: number; 12410 + /** 12411 + * Duration of silence to detect speech stop (in milliseconds). Defaults 12412 + * to 500ms. With shorter values the model will respond more quickly, 12413 + * but may jump in on short pauses from the user. 12414 12414 * 12415 12415 */ 12416 - type?: string; 12416 + silence_duration_ms?: number; 12417 12417 }; 12418 12418 }; 12419 12419 ··· 12429 12429 export type Reasoning = { 12430 12430 effort?: ReasoningEffort; 12431 12431 /** 12432 - * **Deprecated:** use `summary` instead. 12433 - * 12434 12432 * A summary of the reasoning performed by the model. This can be 12435 12433 * useful for debugging and understanding the model's reasoning process. 12436 12434 * One of `auto`, `concise`, or `detailed`. 12437 12435 * 12438 - * 12439 - * @deprecated 12440 12436 */ 12441 - generate_summary?: 'auto' | 'concise' | 'detailed'; 12437 + summary?: 'auto' | 'concise' | 'detailed'; 12442 12438 /** 12439 + * **Deprecated:** use `summary` instead. 12440 + * 12443 12441 * A summary of the reasoning performed by the model. This can be 12444 12442 * useful for debugging and understanding the model's reasoning process. 12445 12443 * One of `auto`, `concise`, or `detailed`. 12446 12444 * 12445 + * 12446 + * @deprecated 12447 12447 */ 12448 - summary?: 'auto' | 'concise' | 'detailed'; 12448 + generate_summary?: 'auto' | 'concise' | 'detailed'; 12449 12449 }; 12450 12450 12451 12451 /** ··· 12457 12457 * 12458 12458 */ 12459 12459 export const ReasoningEffort = { 12460 - HIGH: 'high', 12460 + MINIMAL: 'minimal', 12461 12461 LOW: 'low', 12462 12462 MEDIUM: 'medium', 12463 - MINIMAL: 'minimal', 12463 + HIGH: 'high', 12464 12464 } as const; 12465 12465 12466 12466 /** ··· 12485 12485 */ 12486 12486 export type ReasoningItem = { 12487 12487 /** 12488 - * Reasoning text content. 12488 + * The type of the object. Always `reasoning`. 12489 12489 * 12490 12490 */ 12491 - content?: Array<{ 12492 - /** 12493 - * Reasoning text output from the model. 12494 - * 12495 - */ 12496 - text: string; 12497 - /** 12498 - * The type of the object. Always `reasoning_text`. 12499 - * 12500 - */ 12501 - type: 'reasoning_text'; 12502 - }>; 12503 - /** 12504 - * The encrypted content of the reasoning item - populated when a response is 12505 - * generated with `reasoning.encrypted_content` in the `include` parameter. 12506 - * 12507 - */ 12508 - encrypted_content?: string; 12491 + type: 'reasoning'; 12509 12492 /** 12510 12493 * The unique identifier of the reasoning content. 12511 12494 * 12512 12495 */ 12513 12496 id: string; 12514 12497 /** 12515 - * The status of the item. One of `in_progress`, `completed`, or 12516 - * `incomplete`. Populated when items are returned via API. 12498 + * The encrypted content of the reasoning item - populated when a response is 12499 + * generated with `reasoning.encrypted_content` in the `include` parameter. 12517 12500 * 12518 12501 */ 12519 - status?: 'in_progress' | 'completed' | 'incomplete'; 12502 + encrypted_content?: string; 12520 12503 /** 12521 12504 * Reasoning summary content. 12522 12505 * 12523 12506 */ 12524 12507 summary: Array<{ 12525 12508 /** 12509 + * The type of the object. Always `summary_text`. 12510 + * 12511 + */ 12512 + type: 'summary_text'; 12513 + /** 12526 12514 * A summary of the reasoning output from the model so far. 12527 12515 * 12528 12516 */ 12529 12517 text: string; 12518 + }>; 12519 + /** 12520 + * Reasoning text content. 12521 + * 12522 + */ 12523 + content?: Array<{ 12530 12524 /** 12531 - * The type of the object. Always `summary_text`. 12525 + * The type of the object. Always `reasoning_text`. 12532 12526 * 12533 12527 */ 12534 - type: 'summary_text'; 12528 + type: 'reasoning_text'; 12529 + /** 12530 + * Reasoning text output from the model. 12531 + * 12532 + */ 12533 + text: string; 12535 12534 }>; 12536 12535 /** 12537 - * The type of the object. Always `reasoning`. 12536 + * The status of the item. One of `in_progress`, `completed`, or 12537 + * `incomplete`. Populated when items are returned via API. 12538 12538 * 12539 12539 */ 12540 - type: 'reasoning'; 12540 + status?: 'in_progress' | 'completed' | 'incomplete'; 12541 12541 }; 12542 12542 12543 12543 /** ··· 12546 12546 export type Response = ModelResponseProperties & 12547 12547 ResponseProperties & { 12548 12548 /** 12549 - * Unix timestamp (in seconds) of when this Response was created. 12549 + * Unique identifier for this Response. 12550 12550 * 12551 12551 */ 12552 - created_at: number; 12553 - error: ResponseError; 12552 + id: string; 12554 12553 /** 12555 - * Unique identifier for this Response. 12554 + * The object type of this resource - always set to `response`. 12556 12555 * 12557 12556 */ 12558 - id: string; 12557 + object: 'response'; 12558 + /** 12559 + * The status of the response generation. One of `completed`, `failed`, 12560 + * `in_progress`, `cancelled`, `queued`, or `incomplete`. 12561 + * 12562 + */ 12563 + status?: 12564 + | 'completed' 12565 + | 'failed' 12566 + | 'in_progress' 12567 + | 'cancelled' 12568 + | 'queued' 12569 + | 'incomplete'; 12570 + /** 12571 + * Unix timestamp (in seconds) of when this Response was created. 12572 + * 12573 + */ 12574 + created_at: number; 12575 + error: ResponseError; 12559 12576 /** 12560 12577 * Details about why the response is incomplete. 12561 12578 * ··· 12567 12584 reason?: 'max_output_tokens' | 'content_filter'; 12568 12585 }; 12569 12586 /** 12570 - * A system (or developer) message inserted into the model's context. 12571 - * 12572 - * When using along with `previous_response_id`, the instructions from a previous 12573 - * response will not be carried over to the next response. This makes it simple 12574 - * to swap out system (or developer) messages in new responses. 12575 - * 12576 - */ 12577 - instructions: string | Array<InputItem>; 12578 - /** 12579 - * The object type of this resource - always set to `response`. 12580 - * 12581 - */ 12582 - object: 'response'; 12583 - /** 12584 12587 * An array of content items generated by the model. 12585 12588 * 12586 12589 * - The length and order of items in the `output` array is dependent ··· 12593 12596 */ 12594 12597 output: Array<OutputItem>; 12595 12598 /** 12599 + * A system (or developer) message inserted into the model's context. 12600 + * 12601 + * When using along with `previous_response_id`, the instructions from a previous 12602 + * response will not be carried over to the next response. This makes it simple 12603 + * to swap out system (or developer) messages in new responses. 12604 + * 12605 + */ 12606 + instructions: string | Array<InputItem>; 12607 + /** 12596 12608 * SDK-only convenience property that contains the aggregated text output 12597 12609 * from all `output_text` items in the `output` array, if any are present. 12598 12610 * Supported in the Python and JavaScript SDKs. 12599 12611 * 12600 12612 */ 12601 12613 output_text?: string; 12614 + usage?: ResponseUsage; 12602 12615 /** 12603 12616 * Whether to allow the model to run tool calls in parallel. 12604 12617 * 12605 12618 */ 12606 12619 parallel_tool_calls: boolean; 12607 - /** 12608 - * The status of the response generation. One of `completed`, `failed`, 12609 - * `in_progress`, `cancelled`, `queued`, or `incomplete`. 12610 - * 12611 - */ 12612 - status?: 12613 - | 'completed' 12614 - | 'failed' 12615 - | 'in_progress' 12616 - | 'cancelled' 12617 - | 'queued' 12618 - | 'incomplete'; 12619 - usage?: ResponseUsage; 12620 12620 }; 12621 12621 12622 12622 /** ··· 12624 12624 */ 12625 12625 export type ResponseAudioDeltaEvent = { 12626 12626 /** 12627 - * A chunk of Base64 encoded response audio bytes. 12627 + * The type of the event. Always `response.audio.delta`. 12628 12628 * 12629 12629 */ 12630 - delta: string; 12630 + type: 'response.audio.delta'; 12631 12631 /** 12632 12632 * A sequence number for this chunk of the stream response. 12633 12633 * 12634 12634 */ 12635 12635 sequence_number: number; 12636 12636 /** 12637 - * The type of the event. Always `response.audio.delta`. 12637 + * A chunk of Base64 encoded response audio bytes. 12638 12638 * 12639 12639 */ 12640 - type: 'response.audio.delta'; 12640 + delta: string; 12641 12641 }; 12642 12642 12643 12643 /** ··· 12645 12645 */ 12646 12646 export type ResponseAudioDoneEvent = { 12647 12647 /** 12648 - * The sequence number of the delta. 12648 + * The type of the event. Always `response.audio.done`. 12649 12649 * 12650 12650 */ 12651 - sequence_number: number; 12651 + type: 'response.audio.done'; 12652 12652 /** 12653 - * The type of the event. Always `response.audio.done`. 12653 + * The sequence number of the delta. 12654 12654 * 12655 12655 */ 12656 - type: 'response.audio.done'; 12656 + sequence_number: number; 12657 12657 }; 12658 12658 12659 12659 /** 12660 12660 * Emitted when there is a partial transcript of audio. 12661 12661 */ 12662 12662 export type ResponseAudioTranscriptDeltaEvent = { 12663 + /** 12664 + * The type of the event. Always `response.audio.transcript.delta`. 12665 + * 12666 + */ 12667 + type: 'response.audio.transcript.delta'; 12663 12668 /** 12664 12669 * The partial transcript of the audio response. 12665 12670 * ··· 12669 12674 * The sequence number of this event. 12670 12675 */ 12671 12676 sequence_number: number; 12672 - /** 12673 - * The type of the event. Always `response.audio.transcript.delta`. 12674 - * 12675 - */ 12676 - type: 'response.audio.transcript.delta'; 12677 12677 }; 12678 12678 12679 12679 /** ··· 12681 12681 */ 12682 12682 export type ResponseAudioTranscriptDoneEvent = { 12683 12683 /** 12684 - * The sequence number of this event. 12685 - */ 12686 - sequence_number: number; 12687 - /** 12688 12684 * The type of the event. Always `response.audio.transcript.done`. 12689 12685 * 12690 12686 */ 12691 12687 type: 'response.audio.transcript.done'; 12688 + /** 12689 + * The sequence number of this event. 12690 + */ 12691 + sequence_number: number; 12692 12692 }; 12693 12693 12694 12694 /** ··· 12696 12696 */ 12697 12697 export type ResponseCodeInterpreterCallCodeDeltaEvent = { 12698 12698 /** 12699 - * The partial code snippet being streamed by the code interpreter. 12699 + * The type of the event. Always `response.code_interpreter_call_code.delta`. 12700 + */ 12701 + type: 'response.code_interpreter_call_code.delta'; 12702 + /** 12703 + * The index of the output item in the response for which the code is being streamed. 12700 12704 */ 12701 - delta: string; 12705 + output_index: number; 12702 12706 /** 12703 12707 * The unique identifier of the code interpreter tool call item. 12704 12708 */ 12705 12709 item_id: string; 12706 12710 /** 12707 - * The index of the output item in the response for which the code is being streamed. 12711 + * The partial code snippet being streamed by the code interpreter. 12708 12712 */ 12709 - output_index: number; 12713 + delta: string; 12710 12714 /** 12711 12715 * The sequence number of this event, used to order streaming events. 12712 12716 */ 12713 12717 sequence_number: number; 12714 - /** 12715 - * The type of the event. Always `response.code_interpreter_call_code.delta`. 12716 - */ 12717 - type: 'response.code_interpreter_call_code.delta'; 12718 12718 }; 12719 12719 12720 12720 /** ··· 12722 12722 */ 12723 12723 export type ResponseCodeInterpreterCallCodeDoneEvent = { 12724 12724 /** 12725 - * The final code snippet output by the code interpreter. 12725 + * The type of the event. Always `response.code_interpreter_call_code.done`. 12726 + */ 12727 + type: 'response.code_interpreter_call_code.done'; 12728 + /** 12729 + * The index of the output item in the response for which the code is finalized. 12726 12730 */ 12727 - code: string; 12731 + output_index: number; 12728 12732 /** 12729 12733 * The unique identifier of the code interpreter tool call item. 12730 12734 */ 12731 12735 item_id: string; 12732 12736 /** 12733 - * The index of the output item in the response for which the code is finalized. 12737 + * The final code snippet output by the code interpreter. 12734 12738 */ 12735 - output_index: number; 12739 + code: string; 12736 12740 /** 12737 12741 * The sequence number of this event, used to order streaming events. 12738 12742 */ 12739 12743 sequence_number: number; 12740 - /** 12741 - * The type of the event. Always `response.code_interpreter_call_code.done`. 12742 - */ 12743 - type: 'response.code_interpreter_call_code.done'; 12744 12744 }; 12745 12745 12746 12746 /** ··· 12748 12748 */ 12749 12749 export type ResponseCodeInterpreterCallCompletedEvent = { 12750 12750 /** 12751 - * The unique identifier of the code interpreter tool call item. 12751 + * The type of the event. Always `response.code_interpreter_call.completed`. 12752 12752 */ 12753 - item_id: string; 12753 + type: 'response.code_interpreter_call.completed'; 12754 12754 /** 12755 12755 * The index of the output item in the response for which the code interpreter call is completed. 12756 12756 */ 12757 12757 output_index: number; 12758 12758 /** 12759 - * The sequence number of this event, used to order streaming events. 12759 + * The unique identifier of the code interpreter tool call item. 12760 12760 */ 12761 - sequence_number: number; 12761 + item_id: string; 12762 12762 /** 12763 - * The type of the event. Always `response.code_interpreter_call.completed`. 12763 + * The sequence number of this event, used to order streaming events. 12764 12764 */ 12765 - type: 'response.code_interpreter_call.completed'; 12765 + sequence_number: number; 12766 12766 }; 12767 12767 12768 12768 /** ··· 12770 12770 */ 12771 12771 export type ResponseCodeInterpreterCallInProgressEvent = { 12772 12772 /** 12773 - * The unique identifier of the code interpreter tool call item. 12773 + * The type of the event. Always `response.code_interpreter_call.in_progress`. 12774 12774 */ 12775 - item_id: string; 12775 + type: 'response.code_interpreter_call.in_progress'; 12776 12776 /** 12777 12777 * The index of the output item in the response for which the code interpreter call is in progress. 12778 12778 */ 12779 12779 output_index: number; 12780 12780 /** 12781 + * The unique identifier of the code interpreter tool call item. 12782 + */ 12783 + item_id: string; 12784 + /** 12781 12785 * The sequence number of this event, used to order streaming events. 12782 12786 */ 12783 12787 sequence_number: number; 12784 - /** 12785 - * The type of the event. Always `response.code_interpreter_call.in_progress`. 12786 - */ 12787 - type: 'response.code_interpreter_call.in_progress'; 12788 12788 }; 12789 12789 12790 12790 /** ··· 12792 12792 */ 12793 12793 export type ResponseCodeInterpreterCallInterpretingEvent = { 12794 12794 /** 12795 - * The unique identifier of the code interpreter tool call item. 12795 + * The type of the event. Always `response.code_interpreter_call.interpreting`. 12796 12796 */ 12797 - item_id: string; 12797 + type: 'response.code_interpreter_call.interpreting'; 12798 12798 /** 12799 12799 * The index of the output item in the response for which the code interpreter is interpreting code. 12800 12800 */ 12801 12801 output_index: number; 12802 + /** 12803 + * The unique identifier of the code interpreter tool call item. 12804 + */ 12805 + item_id: string; 12802 12806 /** 12803 12807 * The sequence number of this event, used to order streaming events. 12804 12808 */ 12805 12809 sequence_number: number; 12806 - /** 12807 - * The type of the event. Always `response.code_interpreter_call.interpreting`. 12808 - */ 12809 - type: 'response.code_interpreter_call.interpreting'; 12810 12810 }; 12811 12811 12812 12812 /** ··· 12814 12814 */ 12815 12815 export type ResponseCompletedEvent = { 12816 12816 /** 12817 + * The type of the event. Always `response.completed`. 12818 + * 12819 + */ 12820 + type: 'response.completed'; 12821 + /** 12817 12822 * Properties of the completed response. 12818 12823 * 12819 12824 */ ··· 12822 12827 * The sequence number for this event. 12823 12828 */ 12824 12829 sequence_number: number; 12825 - /** 12826 - * The type of the event. Always `response.completed`. 12827 - * 12828 - */ 12829 - type: 'response.completed'; 12830 12830 }; 12831 12831 12832 12832 /** ··· 12834 12834 */ 12835 12835 export type ResponseContentPartAddedEvent = { 12836 12836 /** 12837 - * The index of the content part that was added. 12837 + * The type of the event. Always `response.content_part.added`. 12838 12838 * 12839 12839 */ 12840 - content_index: number; 12840 + type: 'response.content_part.added'; 12841 12841 /** 12842 12842 * The ID of the output item that the content part was added to. 12843 12843 * ··· 12849 12849 */ 12850 12850 output_index: number; 12851 12851 /** 12852 + * The index of the content part that was added. 12853 + * 12854 + */ 12855 + content_index: number; 12856 + /** 12852 12857 * The content part that was added. 12853 12858 * 12854 12859 */ ··· 12857 12862 * The sequence number of this event. 12858 12863 */ 12859 12864 sequence_number: number; 12860 - /** 12861 - * The type of the event. Always `response.content_part.added`. 12862 - * 12863 - */ 12864 - type: 'response.content_part.added'; 12865 12865 }; 12866 12866 12867 12867 /** ··· 12869 12869 */ 12870 12870 export type ResponseContentPartDoneEvent = { 12871 12871 /** 12872 - * The index of the content part that is done. 12872 + * The type of the event. Always `response.content_part.done`. 12873 12873 * 12874 12874 */ 12875 - content_index: number; 12875 + type: 'response.content_part.done'; 12876 12876 /** 12877 12877 * The ID of the output item that the content part was added to. 12878 12878 * ··· 12884 12884 */ 12885 12885 output_index: number; 12886 12886 /** 12887 - * The content part that is done. 12887 + * The index of the content part that is done. 12888 12888 * 12889 12889 */ 12890 - part: OutputContent; 12890 + content_index: number; 12891 12891 /** 12892 12892 * The sequence number of this event. 12893 12893 */ 12894 12894 sequence_number: number; 12895 12895 /** 12896 - * The type of the event. Always `response.content_part.done`. 12896 + * The content part that is done. 12897 12897 * 12898 12898 */ 12899 - type: 'response.content_part.done'; 12899 + part: OutputContent; 12900 12900 }; 12901 12901 12902 12902 /** ··· 12905 12905 */ 12906 12906 export type ResponseCreatedEvent = { 12907 12907 /** 12908 + * The type of the event. Always `response.created`. 12909 + * 12910 + */ 12911 + type: 'response.created'; 12912 + /** 12908 12913 * The response that was created. 12909 12914 * 12910 12915 */ ··· 12913 12918 * The sequence number for this event. 12914 12919 */ 12915 12920 sequence_number: number; 12916 - /** 12917 - * The type of the event. Always `response.created`. 12918 - * 12919 - */ 12920 - type: 'response.created'; 12921 12921 }; 12922 12922 12923 12923 /** ··· 12928 12928 */ 12929 12929 export type ResponseCustomToolCallInputDeltaEvent = { 12930 12930 /** 12931 - * The incremental input data (delta) for the custom tool call. 12931 + * The event type identifier. 12932 12932 */ 12933 - delta: string; 12933 + type: 'response.custom_tool_call_input.delta'; 12934 12934 /** 12935 - * Unique identifier for the API item associated with this event. 12935 + * The sequence number of this event. 12936 12936 */ 12937 - item_id: string; 12937 + sequence_number: number; 12938 12938 /** 12939 12939 * The index of the output this delta applies to. 12940 12940 */ 12941 12941 output_index: number; 12942 12942 /** 12943 - * The sequence number of this event. 12943 + * Unique identifier for the API item associated with this event. 12944 12944 */ 12945 - sequence_number: number; 12945 + item_id: string; 12946 12946 /** 12947 - * The event type identifier. 12947 + * The incremental input data (delta) for the custom tool call. 12948 12948 */ 12949 - type: 'response.custom_tool_call_input.delta'; 12949 + delta: string; 12950 12950 }; 12951 12951 12952 12952 /** ··· 12957 12957 */ 12958 12958 export type ResponseCustomToolCallInputDoneEvent = { 12959 12959 /** 12960 - * The complete input data for the custom tool call. 12960 + * The event type identifier. 12961 12961 */ 12962 - input: string; 12962 + type: 'response.custom_tool_call_input.done'; 12963 12963 /** 12964 - * Unique identifier for the API item associated with this event. 12964 + * The sequence number of this event. 12965 12965 */ 12966 - item_id: string; 12966 + sequence_number: number; 12967 12967 /** 12968 12968 * The index of the output this event applies to. 12969 12969 */ 12970 12970 output_index: number; 12971 12971 /** 12972 - * The sequence number of this event. 12972 + * Unique identifier for the API item associated with this event. 12973 12973 */ 12974 - sequence_number: number; 12974 + item_id: string; 12975 12975 /** 12976 - * The event type identifier. 12976 + * The complete input data for the custom tool call. 12977 12977 */ 12978 - type: 'response.custom_tool_call_input.done'; 12978 + input: string; 12979 12979 }; 12980 12980 12981 12981 /** ··· 12996 12996 * 12997 12997 */ 12998 12998 export const ResponseErrorCode = { 12999 - EMPTY_IMAGE_FILE: 'empty_image_file', 13000 - FAILED_TO_DOWNLOAD_IMAGE: 'failed_to_download_image', 13001 - IMAGE_CONTENT_POLICY_VIOLATION: 'image_content_policy_violation', 13002 - IMAGE_FILE_NOT_FOUND: 'image_file_not_found', 13003 - IMAGE_FILE_TOO_LARGE: 'image_file_too_large', 13004 - IMAGE_PARSE_ERROR: 'image_parse_error', 13005 - IMAGE_TOO_LARGE: 'image_too_large', 13006 - IMAGE_TOO_SMALL: 'image_too_small', 13007 - INVALID_BASE64_IMAGE: 'invalid_base64_image', 12999 + SERVER_ERROR: 'server_error', 13000 + RATE_LIMIT_EXCEEDED: 'rate_limit_exceeded', 13001 + INVALID_PROMPT: 'invalid_prompt', 13002 + VECTOR_STORE_TIMEOUT: 'vector_store_timeout', 13008 13003 INVALID_IMAGE: 'invalid_image', 13009 13004 INVALID_IMAGE_FORMAT: 'invalid_image_format', 13010 - INVALID_IMAGE_MODE: 'invalid_image_mode', 13005 + INVALID_BASE64_IMAGE: 'invalid_base64_image', 13011 13006 INVALID_IMAGE_URL: 'invalid_image_url', 13012 - INVALID_PROMPT: 'invalid_prompt', 13013 - RATE_LIMIT_EXCEEDED: 'rate_limit_exceeded', 13014 - SERVER_ERROR: 'server_error', 13007 + IMAGE_TOO_LARGE: 'image_too_large', 13008 + IMAGE_TOO_SMALL: 'image_too_small', 13009 + IMAGE_PARSE_ERROR: 'image_parse_error', 13010 + IMAGE_CONTENT_POLICY_VIOLATION: 'image_content_policy_violation', 13011 + INVALID_IMAGE_MODE: 'invalid_image_mode', 13012 + IMAGE_FILE_TOO_LARGE: 'image_file_too_large', 13015 13013 UNSUPPORTED_IMAGE_MEDIA_TYPE: 'unsupported_image_media_type', 13016 - VECTOR_STORE_TIMEOUT: 'vector_store_timeout', 13014 + EMPTY_IMAGE_FILE: 'empty_image_file', 13015 + FAILED_TO_DOWNLOAD_IMAGE: 'failed_to_download_image', 13016 + IMAGE_FILE_NOT_FOUND: 'image_file_not_found', 13017 13017 } as const; 13018 13018 13019 13019 /** ··· 13028 13028 */ 13029 13029 export type ResponseErrorEvent = { 13030 13030 /** 13031 + * The type of the event. Always `error`. 13032 + * 13033 + */ 13034 + type: 'error'; 13035 + /** 13031 13036 * The error code. 13032 13037 * 13033 13038 */ ··· 13046 13051 * The sequence number of this event. 13047 13052 */ 13048 13053 sequence_number: number; 13049 - /** 13050 - * The type of the event. Always `error`. 13051 - * 13052 - */ 13053 - type: 'error'; 13054 13054 }; 13055 13055 13056 13056 /** ··· 13059 13059 */ 13060 13060 export type ResponseFailedEvent = { 13061 13061 /** 13062 - * The response that failed. 13062 + * The type of the event. Always `response.failed`. 13063 13063 * 13064 13064 */ 13065 - response: Response; 13065 + type: 'response.failed'; 13066 13066 /** 13067 13067 * The sequence number of this event. 13068 13068 */ 13069 13069 sequence_number: number; 13070 13070 /** 13071 - * The type of the event. Always `response.failed`. 13071 + * The response that failed. 13072 13072 * 13073 13073 */ 13074 - type: 'response.failed'; 13074 + response: Response; 13075 13075 }; 13076 13076 13077 13077 /** ··· 13079 13079 */ 13080 13080 export type ResponseFileSearchCallCompletedEvent = { 13081 13081 /** 13082 - * The ID of the output item that the file search call is initiated. 13082 + * The type of the event. Always `response.file_search_call.completed`. 13083 13083 * 13084 13084 */ 13085 - item_id: string; 13085 + type: 'response.file_search_call.completed'; 13086 13086 /** 13087 13087 * The index of the output item that the file search call is initiated. 13088 13088 * 13089 13089 */ 13090 13090 output_index: number; 13091 13091 /** 13092 - * The sequence number of this event. 13092 + * The ID of the output item that the file search call is initiated. 13093 + * 13093 13094 */ 13094 - sequence_number: number; 13095 + item_id: string; 13095 13096 /** 13096 - * The type of the event. Always `response.file_search_call.completed`. 13097 - * 13097 + * The sequence number of this event. 13098 13098 */ 13099 - type: 'response.file_search_call.completed'; 13099 + sequence_number: number; 13100 13100 }; 13101 13101 13102 13102 /** ··· 13104 13104 */ 13105 13105 export type ResponseFileSearchCallInProgressEvent = { 13106 13106 /** 13107 - * The ID of the output item that the file search call is initiated. 13107 + * The type of the event. Always `response.file_search_call.in_progress`. 13108 13108 * 13109 13109 */ 13110 - item_id: string; 13110 + type: 'response.file_search_call.in_progress'; 13111 13111 /** 13112 13112 * The index of the output item that the file search call is initiated. 13113 13113 * 13114 13114 */ 13115 13115 output_index: number; 13116 13116 /** 13117 + * The ID of the output item that the file search call is initiated. 13118 + * 13119 + */ 13120 + item_id: string; 13121 + /** 13117 13122 * The sequence number of this event. 13118 13123 */ 13119 13124 sequence_number: number; 13120 - /** 13121 - * The type of the event. Always `response.file_search_call.in_progress`. 13122 - * 13123 - */ 13124 - type: 'response.file_search_call.in_progress'; 13125 13125 }; 13126 13126 13127 13127 /** ··· 13129 13129 */ 13130 13130 export type ResponseFileSearchCallSearchingEvent = { 13131 13131 /** 13132 - * The ID of the output item that the file search call is initiated. 13132 + * The type of the event. Always `response.file_search_call.searching`. 13133 13133 * 13134 13134 */ 13135 - item_id: string; 13135 + type: 'response.file_search_call.searching'; 13136 13136 /** 13137 13137 * The index of the output item that the file search call is searching. 13138 13138 * 13139 13139 */ 13140 13140 output_index: number; 13141 13141 /** 13142 + * The ID of the output item that the file search call is initiated. 13143 + * 13144 + */ 13145 + item_id: string; 13146 + /** 13142 13147 * The sequence number of this event. 13143 13148 */ 13144 13149 sequence_number: number; 13145 - /** 13146 - * The type of the event. Always `response.file_search_call.searching`. 13147 - * 13148 - */ 13149 - type: 'response.file_search_call.searching'; 13150 13150 }; 13151 13151 13152 13152 /** ··· 13173 13173 * 13174 13174 */ 13175 13175 export type ResponseFormatJsonSchema = { 13176 + /** 13177 + * The type of response format being defined. Always `json_schema`. 13178 + */ 13179 + type: 'json_schema'; 13176 13180 /** 13177 13181 * JSON schema 13178 13182 * ··· 13203 13207 */ 13204 13208 strict?: boolean; 13205 13209 }; 13206 - /** 13207 - * The type of response format being defined. Always `json_schema`. 13208 - */ 13209 - type: 'json_schema'; 13210 13210 }; 13211 13211 13212 13212 /** ··· 13242 13242 */ 13243 13243 export type ResponseFormatTextGrammar = { 13244 13244 /** 13245 - * The custom grammar for the model to follow. 13246 - */ 13247 - grammar: string; 13248 - /** 13249 13245 * The type of response format being defined. Always `grammar`. 13250 13246 */ 13251 13247 type: 'grammar'; 13248 + /** 13249 + * The custom grammar for the model to follow. 13250 + */ 13251 + grammar: string; 13252 13252 }; 13253 13253 13254 13254 /** ··· 13270 13270 */ 13271 13271 export type ResponseFunctionCallArgumentsDeltaEvent = { 13272 13272 /** 13273 - * The function-call arguments delta that is added. 13273 + * The type of the event. Always `response.function_call_arguments.delta`. 13274 13274 * 13275 13275 */ 13276 - delta: string; 13276 + type: 'response.function_call_arguments.delta'; 13277 13277 /** 13278 13278 * The ID of the output item that the function-call arguments delta is added to. 13279 13279 * ··· 13289 13289 */ 13290 13290 sequence_number: number; 13291 13291 /** 13292 - * The type of the event. Always `response.function_call_arguments.delta`. 13292 + * The function-call arguments delta that is added. 13293 13293 * 13294 13294 */ 13295 - type: 'response.function_call_arguments.delta'; 13295 + delta: string; 13296 13296 }; 13297 13297 13298 13298 /** 13299 13299 * Emitted when function-call arguments are finalized. 13300 13300 */ 13301 13301 export type ResponseFunctionCallArgumentsDoneEvent = { 13302 - /** 13303 - * The function-call arguments. 13304 - */ 13305 - arguments: string; 13302 + type: 'response.function_call_arguments.done'; 13306 13303 /** 13307 13304 * The ID of the item. 13308 13305 */ ··· 13315 13312 * The sequence number of this event. 13316 13313 */ 13317 13314 sequence_number: number; 13318 - type: 'response.function_call_arguments.done'; 13315 + /** 13316 + * The function-call arguments. 13317 + */ 13318 + arguments: string; 13319 13319 }; 13320 13320 13321 13321 /** ··· 13326 13326 */ 13327 13327 export type ResponseImageGenCallCompletedEvent = { 13328 13328 /** 13329 - * The unique identifier of the image generation item being processed. 13329 + * The type of the event. Always 'response.image_generation_call.completed'. 13330 13330 */ 13331 - item_id: string; 13331 + type: 'response.image_generation_call.completed'; 13332 13332 /** 13333 13333 * The index of the output item in the response's output array. 13334 13334 */ ··· 13338 13338 */ 13339 13339 sequence_number: number; 13340 13340 /** 13341 - * The type of the event. Always 'response.image_generation_call.completed'. 13341 + * The unique identifier of the image generation item being processed. 13342 13342 */ 13343 - type: 'response.image_generation_call.completed'; 13343 + item_id: string; 13344 13344 }; 13345 13345 13346 13346 /** ··· 13351 13351 */ 13352 13352 export type ResponseImageGenCallGeneratingEvent = { 13353 13353 /** 13354 - * The unique identifier of the image generation item being processed. 13354 + * The type of the event. Always 'response.image_generation_call.generating'. 13355 13355 */ 13356 - item_id: string; 13356 + type: 'response.image_generation_call.generating'; 13357 13357 /** 13358 13358 * The index of the output item in the response's output array. 13359 13359 */ 13360 13360 output_index: number; 13361 13361 /** 13362 - * The sequence number of the image generation item being processed. 13362 + * The unique identifier of the image generation item being processed. 13363 13363 */ 13364 - sequence_number: number; 13364 + item_id: string; 13365 13365 /** 13366 - * The type of the event. Always 'response.image_generation_call.generating'. 13366 + * The sequence number of the image generation item being processed. 13367 13367 */ 13368 - type: 'response.image_generation_call.generating'; 13368 + sequence_number: number; 13369 13369 }; 13370 13370 13371 13371 /** ··· 13376 13376 */ 13377 13377 export type ResponseImageGenCallInProgressEvent = { 13378 13378 /** 13379 - * The unique identifier of the image generation item being processed. 13379 + * The type of the event. Always 'response.image_generation_call.in_progress'. 13380 13380 */ 13381 - item_id: string; 13381 + type: 'response.image_generation_call.in_progress'; 13382 13382 /** 13383 13383 * The index of the output item in the response's output array. 13384 13384 */ 13385 13385 output_index: number; 13386 13386 /** 13387 + * The unique identifier of the image generation item being processed. 13388 + */ 13389 + item_id: string; 13390 + /** 13387 13391 * The sequence number of the image generation item being processed. 13388 13392 */ 13389 13393 sequence_number: number; 13390 - /** 13391 - * The type of the event. Always 'response.image_generation_call.in_progress'. 13392 - */ 13393 - type: 'response.image_generation_call.in_progress'; 13394 13394 }; 13395 13395 13396 13396 /** ··· 13401 13401 */ 13402 13402 export type ResponseImageGenCallPartialImageEvent = { 13403 13403 /** 13404 - * The unique identifier of the image generation item being processed. 13404 + * The type of the event. Always 'response.image_generation_call.partial_image'. 13405 13405 */ 13406 - item_id: string; 13406 + type: 'response.image_generation_call.partial_image'; 13407 13407 /** 13408 13408 * The index of the output item in the response's output array. 13409 13409 */ 13410 13410 output_index: number; 13411 13411 /** 13412 - * Base64-encoded partial image data, suitable for rendering as an image. 13413 - */ 13414 - partial_image_b64: string; 13415 - /** 13416 - * 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). 13412 + * The unique identifier of the image generation item being processed. 13417 13413 */ 13418 - partial_image_index: number; 13414 + item_id: string; 13419 13415 /** 13420 13416 * The sequence number of the image generation item being processed. 13421 13417 */ 13422 13418 sequence_number: number; 13423 13419 /** 13424 - * The type of the event. Always 'response.image_generation_call.partial_image'. 13420 + * 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). 13421 + */ 13422 + partial_image_index: number; 13423 + /** 13424 + * Base64-encoded partial image data, suitable for rendering as an image. 13425 13425 */ 13426 - type: 'response.image_generation_call.partial_image'; 13426 + partial_image_b64: string; 13427 13427 }; 13428 13428 13429 13429 /** ··· 13431 13431 */ 13432 13432 export type ResponseInProgressEvent = { 13433 13433 /** 13434 + * The type of the event. Always `response.in_progress`. 13435 + * 13436 + */ 13437 + type: 'response.in_progress'; 13438 + /** 13434 13439 * The response that is in progress. 13435 13440 * 13436 13441 */ ··· 13439 13444 * The sequence number of this event. 13440 13445 */ 13441 13446 sequence_number: number; 13442 - /** 13443 - * The type of the event. Always `response.in_progress`. 13444 - * 13445 - */ 13446 - type: 'response.in_progress'; 13447 13447 }; 13448 13448 13449 13449 /** ··· 13452 13452 */ 13453 13453 export type ResponseIncompleteEvent = { 13454 13454 /** 13455 + * The type of the event. Always `response.incomplete`. 13456 + * 13457 + */ 13458 + type: 'response.incomplete'; 13459 + /** 13455 13460 * The response that was incomplete. 13456 13461 * 13457 13462 */ ··· 13460 13465 * The sequence number of this event. 13461 13466 */ 13462 13467 sequence_number: number; 13463 - /** 13464 - * The type of the event. Always `response.incomplete`. 13465 - * 13466 - */ 13467 - type: 'response.incomplete'; 13468 13468 }; 13469 13469 13470 13470 /** ··· 13472 13472 */ 13473 13473 export type ResponseItemList = { 13474 13474 /** 13475 + * The type of object returned, must be `list`. 13476 + */ 13477 + object: 'list'; 13478 + /** 13475 13479 * A list of items used to generate this response. 13476 13480 */ 13477 13481 data: Array<ItemResource>; 13478 13482 /** 13479 - * The ID of the first item in the list. 13480 - */ 13481 - first_id: string; 13482 - /** 13483 13483 * Whether there are more items available. 13484 13484 */ 13485 13485 has_more: boolean; 13486 + /** 13487 + * The ID of the first item in the list. 13488 + */ 13489 + first_id: string; 13486 13490 /** 13487 13491 * The ID of the last item in the list. 13488 13492 */ 13489 13493 last_id: string; 13490 - /** 13491 - * The type of object returned, must be `list`. 13492 - */ 13493 - object: 'list'; 13494 13494 }; 13495 13495 13496 13496 /** ··· 13501 13501 */ 13502 13502 export type ResponseLogProb = { 13503 13503 /** 13504 + * A possible text token. 13505 + */ 13506 + token: string; 13507 + /** 13504 13508 * The log probability of this token. 13505 13509 * 13506 13510 */ 13507 13511 logprob: number; 13508 13512 /** 13509 - * A possible text token. 13510 - */ 13511 - token: string; 13512 - /** 13513 13513 * The log probability of the top 20 most likely tokens. 13514 13514 * 13515 13515 */ 13516 13516 top_logprobs?: Array<{ 13517 13517 /** 13518 - * The log probability of this token. 13519 - */ 13520 - logprob?: number; 13521 - /** 13522 13518 * A possible text token. 13523 13519 */ 13524 13520 token?: string; 13521 + /** 13522 + * The log probability of this token. 13523 + */ 13524 + logprob?: number; 13525 13525 }>; 13526 13526 }; 13527 13527 ··· 13533 13533 */ 13534 13534 export type ResponseMcpCallArgumentsDeltaEvent = { 13535 13535 /** 13536 - * A JSON string containing the partial update to the arguments for the MCP tool call. 13537 - * 13536 + * The type of the event. Always 'response.mcp_call_arguments.delta'. 13537 + */ 13538 + type: 'response.mcp_call_arguments.delta'; 13539 + /** 13540 + * The index of the output item in the response's output array. 13538 13541 */ 13539 - delta: string; 13542 + output_index: number; 13540 13543 /** 13541 13544 * The unique identifier of the MCP tool call item being processed. 13542 13545 */ 13543 13546 item_id: string; 13544 13547 /** 13545 - * The index of the output item in the response's output array. 13548 + * A JSON string containing the partial update to the arguments for the MCP tool call. 13549 + * 13546 13550 */ 13547 - output_index: number; 13551 + delta: string; 13548 13552 /** 13549 13553 * The sequence number of this event. 13550 13554 */ 13551 13555 sequence_number: number; 13552 - /** 13553 - * The type of the event. Always 'response.mcp_call_arguments.delta'. 13554 - */ 13555 - type: 'response.mcp_call_arguments.delta'; 13556 13556 }; 13557 13557 13558 13558 /** ··· 13563 13563 */ 13564 13564 export type ResponseMcpCallArgumentsDoneEvent = { 13565 13565 /** 13566 - * A JSON string containing the finalized arguments for the MCP tool call. 13567 - * 13566 + * The type of the event. Always 'response.mcp_call_arguments.done'. 13567 + */ 13568 + type: 'response.mcp_call_arguments.done'; 13569 + /** 13570 + * The index of the output item in the response's output array. 13568 13571 */ 13569 - arguments: string; 13572 + output_index: number; 13570 13573 /** 13571 13574 * The unique identifier of the MCP tool call item being processed. 13572 13575 */ 13573 13576 item_id: string; 13574 13577 /** 13575 - * The index of the output item in the response's output array. 13578 + * A JSON string containing the finalized arguments for the MCP tool call. 13579 + * 13576 13580 */ 13577 - output_index: number; 13581 + arguments: string; 13578 13582 /** 13579 13583 * The sequence number of this event. 13580 13584 */ 13581 13585 sequence_number: number; 13582 - /** 13583 - * The type of the event. Always 'response.mcp_call_arguments.done'. 13584 - */ 13585 - type: 'response.mcp_call_arguments.done'; 13586 13586 }; 13587 13587 13588 13588 /** ··· 13593 13593 */ 13594 13594 export type ResponseMcpCallCompletedEvent = { 13595 13595 /** 13596 + * The type of the event. Always 'response.mcp_call.completed'. 13597 + */ 13598 + type: 'response.mcp_call.completed'; 13599 + /** 13596 13600 * The ID of the MCP tool call item that completed. 13597 13601 */ 13598 13602 item_id: string; ··· 13604 13608 * The sequence number of this event. 13605 13609 */ 13606 13610 sequence_number: number; 13607 - /** 13608 - * The type of the event. Always 'response.mcp_call.completed'. 13609 - */ 13610 - type: 'response.mcp_call.completed'; 13611 13611 }; 13612 13612 13613 13613 /** ··· 13618 13618 */ 13619 13619 export type ResponseMcpCallFailedEvent = { 13620 13620 /** 13621 + * The type of the event. Always 'response.mcp_call.failed'. 13622 + */ 13623 + type: 'response.mcp_call.failed'; 13624 + /** 13621 13625 * The ID of the MCP tool call item that failed. 13622 13626 */ 13623 13627 item_id: string; ··· 13629 13633 * The sequence number of this event. 13630 13634 */ 13631 13635 sequence_number: number; 13632 - /** 13633 - * The type of the event. Always 'response.mcp_call.failed'. 13634 - */ 13635 - type: 'response.mcp_call.failed'; 13636 13636 }; 13637 13637 13638 13638 /** ··· 13643 13643 */ 13644 13644 export type ResponseMcpCallInProgressEvent = { 13645 13645 /** 13646 - * The unique identifier of the MCP tool call item being processed. 13646 + * The type of the event. Always 'response.mcp_call.in_progress'. 13647 13647 */ 13648 - item_id: string; 13648 + type: 'response.mcp_call.in_progress'; 13649 + /** 13650 + * The sequence number of this event. 13651 + */ 13652 + sequence_number: number; 13649 13653 /** 13650 13654 * The index of the output item in the response's output array. 13651 13655 */ 13652 13656 output_index: number; 13653 13657 /** 13654 - * The sequence number of this event. 13658 + * The unique identifier of the MCP tool call item being processed. 13655 13659 */ 13656 - sequence_number: number; 13657 - /** 13658 - * The type of the event. Always 'response.mcp_call.in_progress'. 13659 - */ 13660 - type: 'response.mcp_call.in_progress'; 13660 + item_id: string; 13661 13661 }; 13662 13662 13663 13663 /** ··· 13667 13667 * 13668 13668 */ 13669 13669 export type ResponseMcpListToolsCompletedEvent = { 13670 + /** 13671 + * The type of the event. Always 'response.mcp_list_tools.completed'. 13672 + */ 13673 + type: 'response.mcp_list_tools.completed'; 13670 13674 /** 13671 13675 * The ID of the MCP tool call item that produced this output. 13672 13676 */ ··· 13679 13683 * The sequence number of this event. 13680 13684 */ 13681 13685 sequence_number: number; 13682 - /** 13683 - * The type of the event. Always 'response.mcp_list_tools.completed'. 13684 - */ 13685 - type: 'response.mcp_list_tools.completed'; 13686 13686 }; 13687 13687 13688 13688 /** ··· 13693 13693 */ 13694 13694 export type ResponseMcpListToolsFailedEvent = { 13695 13695 /** 13696 + * The type of the event. Always 'response.mcp_list_tools.failed'. 13697 + */ 13698 + type: 'response.mcp_list_tools.failed'; 13699 + /** 13696 13700 * The ID of the MCP tool call item that failed. 13697 13701 */ 13698 13702 item_id: string; ··· 13704 13708 * The sequence number of this event. 13705 13709 */ 13706 13710 sequence_number: number; 13707 - /** 13708 - * The type of the event. Always 'response.mcp_list_tools.failed'. 13709 - */ 13710 - type: 'response.mcp_list_tools.failed'; 13711 13711 }; 13712 13712 13713 13713 /** ··· 13717 13717 * 13718 13718 */ 13719 13719 export type ResponseMcpListToolsInProgressEvent = { 13720 + /** 13721 + * The type of the event. Always 'response.mcp_list_tools.in_progress'. 13722 + */ 13723 + type: 'response.mcp_list_tools.in_progress'; 13720 13724 /** 13721 13725 * The ID of the MCP tool call item that is being processed. 13722 13726 */ ··· 13729 13733 * The sequence number of this event. 13730 13734 */ 13731 13735 sequence_number: number; 13732 - /** 13733 - * The type of the event. Always 'response.mcp_list_tools.in_progress'. 13734 - */ 13735 - type: 'response.mcp_list_tools.in_progress'; 13736 13736 }; 13737 13737 13738 13738 /** ··· 13755 13755 */ 13756 13756 export type ResponseOutputItemAddedEvent = { 13757 13757 /** 13758 - * The output item that was added. 13758 + * The type of the event. Always `response.output_item.added`. 13759 13759 * 13760 13760 */ 13761 - item: OutputItem; 13761 + type: 'response.output_item.added'; 13762 13762 /** 13763 13763 * The index of the output item that was added. 13764 13764 * ··· 13770 13770 */ 13771 13771 sequence_number: number; 13772 13772 /** 13773 - * The type of the event. Always `response.output_item.added`. 13773 + * The output item that was added. 13774 13774 * 13775 13775 */ 13776 - type: 'response.output_item.added'; 13776 + item: OutputItem; 13777 13777 }; 13778 13778 13779 13779 /** ··· 13781 13781 */ 13782 13782 export type ResponseOutputItemDoneEvent = { 13783 13783 /** 13784 - * The output item that was marked done. 13784 + * The type of the event. Always `response.output_item.done`. 13785 13785 * 13786 13786 */ 13787 - item: OutputItem; 13787 + type: 'response.output_item.done'; 13788 13788 /** 13789 13789 * The index of the output item that was marked done. 13790 13790 * ··· 13796 13796 */ 13797 13797 sequence_number: number; 13798 13798 /** 13799 - * The type of the event. Always `response.output_item.done`. 13799 + * The output item that was marked done. 13800 13800 * 13801 13801 */ 13802 - type: 'response.output_item.done'; 13802 + item: OutputItem; 13803 13803 }; 13804 13804 13805 13805 /** ··· 13810 13810 */ 13811 13811 export type ResponseOutputTextAnnotationAddedEvent = { 13812 13812 /** 13813 - * The annotation object being added. (See annotation schema for details.) 13813 + * The type of the event. Always 'response.output_text.annotation.added'. 13814 + */ 13815 + type: 'response.output_text.annotation.added'; 13816 + /** 13817 + * The unique identifier of the item to which the annotation is being added. 13814 13818 */ 13815 - annotation: { 13816 - [key: string]: unknown; 13817 - }; 13819 + item_id: string; 13818 13820 /** 13819 - * The index of the annotation within the content part. 13821 + * The index of the output item in the response's output array. 13820 13822 */ 13821 - annotation_index: number; 13823 + output_index: number; 13822 13824 /** 13823 13825 * The index of the content part within the output item. 13824 13826 */ 13825 13827 content_index: number; 13826 13828 /** 13827 - * The unique identifier of the item to which the annotation is being added. 13829 + * The index of the annotation within the content part. 13828 13830 */ 13829 - item_id: string; 13830 - /** 13831 - * The index of the output item in the response's output array. 13832 - */ 13833 - output_index: number; 13831 + annotation_index: number; 13834 13832 /** 13835 13833 * The sequence number of this event. 13836 13834 */ 13837 13835 sequence_number: number; 13838 13836 /** 13839 - * The type of the event. Always 'response.output_text.annotation.added'. 13837 + * The annotation object being added. (See annotation schema for details.) 13840 13838 */ 13841 - type: 'response.output_text.annotation.added'; 13839 + annotation: { 13840 + [key: string]: unknown; 13841 + }; 13842 13842 }; 13843 13843 13844 13844 /** ··· 13859 13859 13860 13860 export type ResponseProperties = { 13861 13861 /** 13862 + * The unique ID of the previous response to the model. Use this to 13863 + * create multi-turn conversations. Learn more about 13864 + * [conversation state](https://platform.openai.com/docs/guides/conversation-state). 13865 + * 13866 + */ 13867 + previous_response_id?: string; 13868 + /** 13869 + * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI 13870 + * offers a wide range of models with different capabilities, performance 13871 + * characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) 13872 + * to browse and compare available models. 13873 + * 13874 + */ 13875 + model?: ModelIdsResponses; 13876 + reasoning?: Reasoning; 13877 + /** 13862 13878 * Whether to run the model response in the background. 13863 13879 * [Learn more](https://platform.openai.com/docs/guides/background). 13864 13880 * ··· 13875 13891 */ 13876 13892 max_tool_calls?: number; 13877 13893 /** 13878 - * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI 13879 - * offers a wide range of models with different capabilities, performance 13880 - * characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) 13881 - * to browse and compare available models. 13882 - * 13883 - */ 13884 - model?: ModelIdsResponses; 13885 - /** 13886 - * The unique ID of the previous response to the model. Use this to 13887 - * create multi-turn conversations. Learn more about 13888 - * [conversation state](https://platform.openai.com/docs/guides/conversation-state). 13889 - * 13890 - */ 13891 - previous_response_id?: string; 13892 - prompt?: Prompt; 13893 - reasoning?: Reasoning; 13894 - /** 13895 13894 * Configuration options for a text response from the model. Can be plain 13896 13895 * text or structured JSON data. Learn more: 13897 13896 * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) ··· 13903 13902 verbosity?: Verbosity; 13904 13903 }; 13905 13904 /** 13906 - * How the model should select which tool (or tools) to use when generating 13907 - * a response. See the `tools` parameter to see how to specify which tools 13908 - * the model can call. 13909 - * 13910 - */ 13911 - tool_choice?: 13912 - | ToolChoiceOptions 13913 - | ToolChoiceAllowed 13914 - | ToolChoiceTypes 13915 - | ToolChoiceFunction 13916 - | ToolChoiceMcp 13917 - | ToolChoiceCustom; 13918 - /** 13919 13905 * An array of tools the model may call while generating a response. You 13920 13906 * can specify which tool to use by setting the `tool_choice` parameter. 13921 13907 * ··· 13934 13920 */ 13935 13921 tools?: Array<Tool>; 13936 13922 /** 13923 + * How the model should select which tool (or tools) to use when generating 13924 + * a response. See the `tools` parameter to see how to specify which tools 13925 + * the model can call. 13926 + * 13927 + */ 13928 + tool_choice?: 13929 + | ToolChoiceOptions 13930 + | ToolChoiceAllowed 13931 + | ToolChoiceTypes 13932 + | ToolChoiceFunction 13933 + | ToolChoiceMcp 13934 + | ToolChoiceCustom; 13935 + prompt?: Prompt; 13936 + /** 13937 13937 * The truncation strategy to use for the model response. 13938 13938 * - `auto`: If the context of this response and previous ones exceeds 13939 13939 * the model's context window size, the model will truncate the ··· 13954 13954 */ 13955 13955 export type ResponseQueuedEvent = { 13956 13956 /** 13957 + * The type of the event. Always 'response.queued'. 13958 + */ 13959 + type: 'response.queued'; 13960 + /** 13957 13961 * The full response object that is queued. 13958 13962 */ 13959 13963 response: Response; ··· 13961 13965 * The sequence number for this event. 13962 13966 */ 13963 13967 sequence_number: number; 13964 - /** 13965 - * The type of the event. Always 'response.queued'. 13966 - */ 13967 - type: 'response.queued'; 13968 13968 }; 13969 13969 13970 13970 /** ··· 13972 13972 */ 13973 13973 export type ResponseReasoningSummaryPartAddedEvent = { 13974 13974 /** 13975 + * The type of the event. Always `response.reasoning_summary_part.added`. 13976 + * 13977 + */ 13978 + type: 'response.reasoning_summary_part.added'; 13979 + /** 13975 13980 * The ID of the item this summary part is associated with. 13976 13981 * 13977 13982 */ ··· 13982 13987 */ 13983 13988 output_index: number; 13984 13989 /** 13985 - * The summary part that was added. 13990 + * The index of the summary part within the reasoning summary. 13986 13991 * 13987 13992 */ 13988 - part: { 13989 - /** 13990 - * The text of the summary part. 13991 - */ 13992 - text: string; 13993 - /** 13994 - * The type of the summary part. Always `summary_text`. 13995 - */ 13996 - type: 'summary_text'; 13997 - }; 13993 + summary_index: number; 13998 13994 /** 13999 13995 * The sequence number of this event. 14000 13996 * 14001 13997 */ 14002 13998 sequence_number: number; 14003 13999 /** 14004 - * The index of the summary part within the reasoning summary. 14000 + * The summary part that was added. 14005 14001 * 14006 14002 */ 14007 - summary_index: number; 14008 - /** 14009 - * The type of the event. Always `response.reasoning_summary_part.added`. 14010 - * 14011 - */ 14012 - type: 'response.reasoning_summary_part.added'; 14003 + part: { 14004 + /** 14005 + * The type of the summary part. Always `summary_text`. 14006 + */ 14007 + type: 'summary_text'; 14008 + /** 14009 + * The text of the summary part. 14010 + */ 14011 + text: string; 14012 + }; 14013 14013 }; 14014 14014 14015 14015 /** ··· 14017 14017 */ 14018 14018 export type ResponseReasoningSummaryPartDoneEvent = { 14019 14019 /** 14020 + * The type of the event. Always `response.reasoning_summary_part.done`. 14021 + * 14022 + */ 14023 + type: 'response.reasoning_summary_part.done'; 14024 + /** 14020 14025 * The ID of the item this summary part is associated with. 14021 14026 * 14022 14027 */ ··· 14027 14032 */ 14028 14033 output_index: number; 14029 14034 /** 14030 - * The completed summary part. 14035 + * The index of the summary part within the reasoning summary. 14031 14036 * 14032 14037 */ 14033 - part: { 14034 - /** 14035 - * The text of the summary part. 14036 - */ 14037 - text: string; 14038 - /** 14039 - * The type of the summary part. Always `summary_text`. 14040 - */ 14041 - type: 'summary_text'; 14042 - }; 14038 + summary_index: number; 14043 14039 /** 14044 14040 * The sequence number of this event. 14045 14041 * 14046 14042 */ 14047 14043 sequence_number: number; 14048 14044 /** 14049 - * The index of the summary part within the reasoning summary. 14050 - * 14051 - */ 14052 - summary_index: number; 14053 - /** 14054 - * The type of the event. Always `response.reasoning_summary_part.done`. 14045 + * The completed summary part. 14055 14046 * 14056 14047 */ 14057 - type: 'response.reasoning_summary_part.done'; 14048 + part: { 14049 + /** 14050 + * The type of the summary part. Always `summary_text`. 14051 + */ 14052 + type: 'summary_text'; 14053 + /** 14054 + * The text of the summary part. 14055 + */ 14056 + text: string; 14057 + }; 14058 14058 }; 14059 14059 14060 14060 /** ··· 14062 14062 */ 14063 14063 export type ResponseReasoningSummaryTextDeltaEvent = { 14064 14064 /** 14065 - * The text delta that was added to the summary. 14065 + * The type of the event. Always `response.reasoning_summary_text.delta`. 14066 14066 * 14067 14067 */ 14068 - delta: string; 14068 + type: 'response.reasoning_summary_text.delta'; 14069 14069 /** 14070 14070 * The ID of the item this summary text delta is associated with. 14071 14071 * ··· 14077 14077 */ 14078 14078 output_index: number; 14079 14079 /** 14080 - * The sequence number of this event. 14080 + * The index of the summary part within the reasoning summary. 14081 14081 * 14082 14082 */ 14083 - sequence_number: number; 14083 + summary_index: number; 14084 14084 /** 14085 - * The index of the summary part within the reasoning summary. 14085 + * The text delta that was added to the summary. 14086 14086 * 14087 14087 */ 14088 - summary_index: number; 14088 + delta: string; 14089 14089 /** 14090 - * The type of the event. Always `response.reasoning_summary_text.delta`. 14090 + * The sequence number of this event. 14091 14091 * 14092 14092 */ 14093 - type: 'response.reasoning_summary_text.delta'; 14093 + sequence_number: number; 14094 14094 }; 14095 14095 14096 14096 /** ··· 14098 14098 */ 14099 14099 export type ResponseReasoningSummaryTextDoneEvent = { 14100 14100 /** 14101 + * The type of the event. Always `response.reasoning_summary_text.done`. 14102 + * 14103 + */ 14104 + type: 'response.reasoning_summary_text.done'; 14105 + /** 14101 14106 * The ID of the item this summary text is associated with. 14102 14107 * 14103 14108 */ ··· 14108 14113 */ 14109 14114 output_index: number; 14110 14115 /** 14111 - * The sequence number of this event. 14112 - * 14113 - */ 14114 - sequence_number: number; 14115 - /** 14116 14116 * The index of the summary part within the reasoning summary. 14117 14117 * 14118 14118 */ ··· 14123 14123 */ 14124 14124 text: string; 14125 14125 /** 14126 - * The type of the event. Always `response.reasoning_summary_text.done`. 14126 + * The sequence number of this event. 14127 14127 * 14128 14128 */ 14129 - type: 'response.reasoning_summary_text.done'; 14129 + sequence_number: number; 14130 14130 }; 14131 14131 14132 14132 /** ··· 14134 14134 */ 14135 14135 export type ResponseReasoningTextDeltaEvent = { 14136 14136 /** 14137 - * The index of the reasoning content part this delta is associated with. 14137 + * The type of the event. Always `response.reasoning_text.delta`. 14138 14138 * 14139 14139 */ 14140 - content_index: number; 14141 - /** 14142 - * The text delta that was added to the reasoning content. 14143 - * 14144 - */ 14145 - delta: string; 14140 + type: 'response.reasoning_text.delta'; 14146 14141 /** 14147 14142 * The ID of the item this reasoning text delta is associated with. 14148 14143 * ··· 14154 14149 */ 14155 14150 output_index: number; 14156 14151 /** 14157 - * The sequence number of this event. 14152 + * The index of the reasoning content part this delta is associated with. 14158 14153 * 14159 14154 */ 14160 - sequence_number: number; 14155 + content_index: number; 14161 14156 /** 14162 - * The type of the event. Always `response.reasoning_text.delta`. 14157 + * The text delta that was added to the reasoning content. 14163 14158 * 14164 14159 */ 14165 - type: 'response.reasoning_text.delta'; 14160 + delta: string; 14161 + /** 14162 + * The sequence number of this event. 14163 + * 14164 + */ 14165 + sequence_number: number; 14166 14166 }; 14167 14167 14168 14168 /** ··· 14170 14170 */ 14171 14171 export type ResponseReasoningTextDoneEvent = { 14172 14172 /** 14173 - * The index of the reasoning content part. 14173 + * The type of the event. Always `response.reasoning_text.done`. 14174 14174 * 14175 14175 */ 14176 - content_index: number; 14176 + type: 'response.reasoning_text.done'; 14177 14177 /** 14178 14178 * The ID of the item this reasoning text is associated with. 14179 14179 * ··· 14185 14185 */ 14186 14186 output_index: number; 14187 14187 /** 14188 - * The sequence number of this event. 14188 + * The index of the reasoning content part. 14189 14189 * 14190 14190 */ 14191 - sequence_number: number; 14191 + content_index: number; 14192 14192 /** 14193 14193 * The full text of the completed reasoning content. 14194 14194 * 14195 14195 */ 14196 14196 text: string; 14197 14197 /** 14198 - * The type of the event. Always `response.reasoning_text.done`. 14198 + * The sequence number of this event. 14199 14199 * 14200 14200 */ 14201 - type: 'response.reasoning_text.done'; 14201 + sequence_number: number; 14202 14202 }; 14203 14203 14204 14204 /** ··· 14206 14206 */ 14207 14207 export type ResponseRefusalDeltaEvent = { 14208 14208 /** 14209 - * The index of the content part that the refusal text is added to. 14209 + * The type of the event. Always `response.refusal.delta`. 14210 14210 * 14211 14211 */ 14212 - content_index: number; 14213 - /** 14214 - * The refusal text that is added. 14215 - * 14216 - */ 14217 - delta: string; 14212 + type: 'response.refusal.delta'; 14218 14213 /** 14219 14214 * The ID of the output item that the refusal text is added to. 14220 14215 * ··· 14226 14221 */ 14227 14222 output_index: number; 14228 14223 /** 14229 - * The sequence number of this event. 14224 + * The index of the content part that the refusal text is added to. 14230 14225 * 14231 14226 */ 14232 - sequence_number: number; 14227 + content_index: number; 14233 14228 /** 14234 - * The type of the event. Always `response.refusal.delta`. 14229 + * The refusal text that is added. 14235 14230 * 14236 14231 */ 14237 - type: 'response.refusal.delta'; 14232 + delta: string; 14233 + /** 14234 + * The sequence number of this event. 14235 + * 14236 + */ 14237 + sequence_number: number; 14238 14238 }; 14239 14239 14240 14240 /** ··· 14242 14242 */ 14243 14243 export type ResponseRefusalDoneEvent = { 14244 14244 /** 14245 - * The index of the content part that the refusal text is finalized. 14245 + * The type of the event. Always `response.refusal.done`. 14246 14246 * 14247 14247 */ 14248 - content_index: number; 14248 + type: 'response.refusal.done'; 14249 14249 /** 14250 14250 * The ID of the output item that the refusal text is finalized. 14251 14251 * ··· 14256 14256 * 14257 14257 */ 14258 14258 output_index: number; 14259 + /** 14260 + * The index of the content part that the refusal text is finalized. 14261 + * 14262 + */ 14263 + content_index: number; 14259 14264 /** 14260 14265 * The refusal text that is finalized. 14261 14266 * ··· 14266 14271 * 14267 14272 */ 14268 14273 sequence_number: number; 14269 - /** 14270 - * The type of the event. Always `response.refusal.done`. 14271 - * 14272 - */ 14273 - type: 'response.refusal.done'; 14274 14274 }; 14275 14275 14276 14276 export type ResponseStreamEvent = ··· 14457 14457 */ 14458 14458 export type ResponseTextDeltaEvent = { 14459 14459 /** 14460 - * The index of the content part that the text delta was added to. 14460 + * The type of the event. Always `response.output_text.delta`. 14461 14461 * 14462 14462 */ 14463 - content_index: number; 14463 + type: 'response.output_text.delta'; 14464 14464 /** 14465 - * The text delta that was added. 14465 + * The ID of the output item that the text delta was added to. 14466 14466 * 14467 14467 */ 14468 - delta: string; 14468 + item_id: string; 14469 14469 /** 14470 - * The ID of the output item that the text delta was added to. 14470 + * The index of the output item that the text delta was added to. 14471 14471 * 14472 14472 */ 14473 - item_id: string; 14473 + output_index: number; 14474 14474 /** 14475 - * The log probabilities of the tokens in the delta. 14475 + * The index of the content part that the text delta was added to. 14476 14476 * 14477 14477 */ 14478 - logprobs: Array<ResponseLogProb>; 14478 + content_index: number; 14479 14479 /** 14480 - * The index of the output item that the text delta was added to. 14480 + * The text delta that was added. 14481 14481 * 14482 14482 */ 14483 - output_index: number; 14483 + delta: string; 14484 14484 /** 14485 14485 * The sequence number for this event. 14486 14486 */ 14487 14487 sequence_number: number; 14488 14488 /** 14489 - * The type of the event. Always `response.output_text.delta`. 14489 + * The log probabilities of the tokens in the delta. 14490 14490 * 14491 14491 */ 14492 - type: 'response.output_text.delta'; 14492 + logprobs: Array<ResponseLogProb>; 14493 14493 }; 14494 14494 14495 14495 /** ··· 14497 14497 */ 14498 14498 export type ResponseTextDoneEvent = { 14499 14499 /** 14500 - * The index of the content part that the text content is finalized. 14500 + * The type of the event. Always `response.output_text.done`. 14501 14501 * 14502 14502 */ 14503 - content_index: number; 14503 + type: 'response.output_text.done'; 14504 14504 /** 14505 14505 * The ID of the output item that the text content is finalized. 14506 14506 * 14507 14507 */ 14508 14508 item_id: string; 14509 14509 /** 14510 - * The log probabilities of the tokens in the delta. 14511 - * 14512 - */ 14513 - logprobs: Array<ResponseLogProb>; 14514 - /** 14515 14510 * The index of the output item that the text content is finalized. 14516 14511 * 14517 14512 */ 14518 14513 output_index: number; 14519 14514 /** 14520 - * The sequence number for this event. 14515 + * The index of the content part that the text content is finalized. 14516 + * 14521 14517 */ 14522 - sequence_number: number; 14518 + content_index: number; 14523 14519 /** 14524 14520 * The text content that is finalized. 14525 14521 * 14526 14522 */ 14527 14523 text: string; 14528 14524 /** 14529 - * The type of the event. Always `response.output_text.done`. 14525 + * The sequence number for this event. 14526 + */ 14527 + sequence_number: number; 14528 + /** 14529 + * The log probabilities of the tokens in the delta. 14530 14530 * 14531 14531 */ 14532 - type: 'response.output_text.done'; 14532 + logprobs: Array<ResponseLogProb>; 14533 14533 }; 14534 14534 14535 14535 /** ··· 14577 14577 */ 14578 14578 export type ResponseWebSearchCallCompletedEvent = { 14579 14579 /** 14580 - * Unique ID for the output item associated with the web search call. 14580 + * The type of the event. Always `response.web_search_call.completed`. 14581 14581 * 14582 14582 */ 14583 - item_id: string; 14583 + type: 'response.web_search_call.completed'; 14584 14584 /** 14585 14585 * The index of the output item that the web search call is associated with. 14586 14586 * 14587 14587 */ 14588 14588 output_index: number; 14589 14589 /** 14590 + * Unique ID for the output item associated with the web search call. 14591 + * 14592 + */ 14593 + item_id: string; 14594 + /** 14590 14595 * The sequence number of the web search call being processed. 14591 14596 */ 14592 14597 sequence_number: number; 14593 - /** 14594 - * The type of the event. Always `response.web_search_call.completed`. 14595 - * 14596 - */ 14597 - type: 'response.web_search_call.completed'; 14598 14598 }; 14599 14599 14600 14600 /** ··· 14602 14602 */ 14603 14603 export type ResponseWebSearchCallInProgressEvent = { 14604 14604 /** 14605 - * Unique ID for the output item associated with the web search call. 14605 + * The type of the event. Always `response.web_search_call.in_progress`. 14606 14606 * 14607 14607 */ 14608 - item_id: string; 14608 + type: 'response.web_search_call.in_progress'; 14609 14609 /** 14610 14610 * The index of the output item that the web search call is associated with. 14611 14611 * 14612 14612 */ 14613 14613 output_index: number; 14614 14614 /** 14615 - * The sequence number of the web search call being processed. 14615 + * Unique ID for the output item associated with the web search call. 14616 + * 14616 14617 */ 14617 - sequence_number: number; 14618 + item_id: string; 14618 14619 /** 14619 - * The type of the event. Always `response.web_search_call.in_progress`. 14620 - * 14620 + * The sequence number of the web search call being processed. 14621 14621 */ 14622 - type: 'response.web_search_call.in_progress'; 14622 + sequence_number: number; 14623 14623 }; 14624 14624 14625 14625 /** ··· 14627 14627 */ 14628 14628 export type ResponseWebSearchCallSearchingEvent = { 14629 14629 /** 14630 - * Unique ID for the output item associated with the web search call. 14630 + * The type of the event. Always `response.web_search_call.searching`. 14631 14631 * 14632 14632 */ 14633 - item_id: string; 14633 + type: 'response.web_search_call.searching'; 14634 14634 /** 14635 14635 * The index of the output item that the web search call is associated with. 14636 14636 * 14637 14637 */ 14638 14638 output_index: number; 14639 + /** 14640 + * Unique ID for the output item associated with the web search call. 14641 + * 14642 + */ 14643 + item_id: string; 14639 14644 /** 14640 14645 * The sequence number of the web search call being processed. 14641 14646 */ 14642 14647 sequence_number: number; 14643 - /** 14644 - * The type of the event. Always `response.web_search_call.searching`. 14645 - * 14646 - */ 14647 - type: 'response.web_search_call.searching'; 14648 14648 }; 14649 14649 14650 14650 /** ··· 14707 14707 }; 14708 14708 14709 14709 export type RunGraderResponse = { 14710 + reward: number; 14710 14711 metadata: { 14712 + name: string; 14713 + type: string; 14711 14714 errors: { 14712 14715 formula_parse_error: boolean; 14716 + sample_parse_error: boolean; 14717 + truncated_observation_error: boolean; 14718 + unresponsive_reward_error: boolean; 14713 14719 invalid_variable_error: boolean; 14714 - model_grader_parse_error: boolean; 14715 - model_grader_refusal_error: boolean; 14716 - model_grader_server_error: boolean; 14717 - model_grader_server_error_details: string; 14718 14720 other_error: boolean; 14719 - python_grader_runtime_error: boolean; 14720 - python_grader_runtime_error_details: string; 14721 14721 python_grader_server_error: boolean; 14722 14722 python_grader_server_error_type: string; 14723 - sample_parse_error: boolean; 14724 - truncated_observation_error: boolean; 14725 - unresponsive_reward_error: boolean; 14723 + python_grader_runtime_error: boolean; 14724 + python_grader_runtime_error_details: string; 14725 + model_grader_server_error: boolean; 14726 + model_grader_refusal_error: boolean; 14727 + model_grader_parse_error: boolean; 14728 + model_grader_server_error_details: string; 14726 14729 }; 14727 14730 execution_time: number; 14728 - name: string; 14729 - sampled_model_name: string; 14730 14731 scores: { 14731 14732 [key: string]: unknown; 14732 14733 }; 14733 14734 token_usage: number; 14734 - type: string; 14735 + sampled_model_name: string; 14735 14736 }; 14736 - model_grader_token_usage_per_model: { 14737 + sub_rewards: { 14737 14738 [key: string]: unknown; 14738 14739 }; 14739 - reward: number; 14740 - sub_rewards: { 14740 + model_grader_token_usage_per_model: { 14741 14741 [key: string]: unknown; 14742 14742 }; 14743 14743 }; ··· 14749 14749 */ 14750 14750 export type RunObject = { 14751 14751 /** 14752 - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for execution of this run. 14752 + * The identifier, which can be referenced in API endpoints. 14753 14753 */ 14754 - assistant_id: string; 14754 + id: string; 14755 14755 /** 14756 - * The Unix timestamp (in seconds) for when the run was cancelled. 14756 + * The object type, which is always `thread.run`. 14757 14757 */ 14758 - cancelled_at: number; 14759 - /** 14760 - * The Unix timestamp (in seconds) for when the run was completed. 14761 - */ 14762 - completed_at: number; 14758 + object: 'thread.run'; 14763 14759 /** 14764 14760 * The Unix timestamp (in seconds) for when the run was created. 14765 14761 */ 14766 14762 created_at: number; 14767 14763 /** 14768 - * The Unix timestamp (in seconds) for when the run will expire. 14764 + * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run. 14769 14765 */ 14770 - expires_at: number; 14766 + thread_id: string; 14771 14767 /** 14772 - * The Unix timestamp (in seconds) for when the run failed. 14768 + * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for execution of this run. 14773 14769 */ 14774 - failed_at: number; 14770 + assistant_id: string; 14771 + status: RunStatus; 14775 14772 /** 14776 - * The identifier, which can be referenced in API endpoints. 14777 - */ 14778 - id: string; 14779 - /** 14780 - * Details on why the run is incomplete. Will be `null` if the run is not incomplete. 14773 + * Details on the action required to continue the run. Will be `null` if no action is required. 14781 14774 */ 14782 - incomplete_details: { 14775 + required_action: { 14783 14776 /** 14784 - * The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run. 14777 + * For now, this is always `submit_tool_outputs`. 14785 14778 */ 14786 - reason?: 'max_completion_tokens' | 'max_prompt_tokens'; 14779 + type: 'submit_tool_outputs'; 14780 + /** 14781 + * Details on the tool outputs needed for this run to continue. 14782 + */ 14783 + submit_tool_outputs: { 14784 + /** 14785 + * A list of the relevant tool calls. 14786 + */ 14787 + tool_calls: Array<RunToolCallObject>; 14788 + }; 14787 14789 }; 14788 - /** 14789 - * The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. 14790 - */ 14791 - instructions: string; 14792 14790 /** 14793 14791 * The last error associated with this run. Will be `null` if there are no errors. 14794 14792 */ ··· 14803 14801 message: string; 14804 14802 }; 14805 14803 /** 14806 - * The maximum number of completion tokens specified to have been used over the course of the run. 14807 - * 14804 + * The Unix timestamp (in seconds) for when the run will expire. 14805 + */ 14806 + expires_at: number; 14807 + /** 14808 + * The Unix timestamp (in seconds) for when the run was started. 14808 14809 */ 14809 - max_completion_tokens: number; 14810 + started_at: number; 14810 14811 /** 14811 - * The maximum number of prompt tokens specified to have been used over the course of the run. 14812 - * 14812 + * The Unix timestamp (in seconds) for when the run was cancelled. 14813 14813 */ 14814 - max_prompt_tokens: number; 14815 - metadata: Metadata; 14814 + cancelled_at: number; 14816 14815 /** 14817 - * The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. 14816 + * The Unix timestamp (in seconds) for when the run failed. 14818 14817 */ 14819 - model: string; 14818 + failed_at: number; 14820 14819 /** 14821 - * The object type, which is always `thread.run`. 14820 + * The Unix timestamp (in seconds) for when the run was completed. 14822 14821 */ 14823 - object: 'thread.run'; 14824 - parallel_tool_calls: ParallelToolCalls; 14822 + completed_at: number; 14825 14823 /** 14826 - * Details on the action required to continue the run. Will be `null` if no action is required. 14824 + * Details on why the run is incomplete. Will be `null` if the run is not incomplete. 14827 14825 */ 14828 - required_action: { 14826 + incomplete_details: { 14829 14827 /** 14830 - * Details on the tool outputs needed for this run to continue. 14828 + * The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run. 14831 14829 */ 14832 - submit_tool_outputs: { 14833 - /** 14834 - * A list of the relevant tool calls. 14835 - */ 14836 - tool_calls: Array<RunToolCallObject>; 14837 - }; 14838 - /** 14839 - * For now, this is always `submit_tool_outputs`. 14840 - */ 14841 - type: 'submit_tool_outputs'; 14830 + reason?: 'max_completion_tokens' | 'max_prompt_tokens'; 14842 14831 }; 14843 - response_format: AssistantsApiResponseFormatOption; 14844 14832 /** 14845 - * The Unix timestamp (in seconds) for when the run was started. 14833 + * The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. 14846 14834 */ 14847 - started_at: number; 14848 - status: RunStatus; 14835 + model: string; 14849 14836 /** 14850 - * The sampling temperature used for this run. If not set, defaults to 1. 14851 - */ 14852 - temperature?: number; 14853 - /** 14854 - * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run. 14837 + * The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. 14855 14838 */ 14856 - thread_id: string; 14857 - tool_choice: AssistantsApiToolChoiceOption & unknown; 14839 + instructions: string; 14858 14840 /** 14859 14841 * The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. 14860 14842 */ 14861 14843 tools: Array<AssistantTool>; 14844 + metadata: Metadata; 14845 + usage: RunCompletionUsage; 14846 + /** 14847 + * The sampling temperature used for this run. If not set, defaults to 1. 14848 + */ 14849 + temperature?: number; 14862 14850 /** 14863 14851 * The nucleus sampling value used for this run. If not set, defaults to 1. 14864 14852 */ 14865 14853 top_p?: number; 14854 + /** 14855 + * The maximum number of prompt tokens specified to have been used over the course of the run. 14856 + * 14857 + */ 14858 + max_prompt_tokens: number; 14859 + /** 14860 + * The maximum number of completion tokens specified to have been used over the course of the run. 14861 + * 14862 + */ 14863 + max_completion_tokens: number; 14866 14864 truncation_strategy: TruncationObject & unknown; 14867 - usage: RunCompletionUsage; 14865 + tool_choice: AssistantsApiToolChoiceOption & unknown; 14866 + parallel_tool_calls: ParallelToolCalls; 14867 + response_format: AssistantsApiResponseFormatOption; 14868 14868 }; 14869 14869 14870 14870 /** ··· 14892 14892 * 14893 14893 */ 14894 14894 export type RunStepDeltaObject = { 14895 - delta: RunStepDeltaObjectDelta; 14896 14895 /** 14897 14896 * The identifier of the run step, which can be referenced in API endpoints. 14898 14897 */ ··· 14901 14900 * The object type, which is always `thread.run.step.delta`. 14902 14901 */ 14903 14902 object: 'thread.run.step.delta'; 14903 + delta: RunStepDeltaObjectDelta; 14904 14904 }; 14905 14905 14906 14906 /** ··· 14909 14909 * Details of the message creation by the run step. 14910 14910 */ 14911 14911 export type RunStepDeltaStepDetailsMessageCreationObject = { 14912 + /** 14913 + * Always `message_creation`. 14914 + */ 14915 + type: 'message_creation'; 14912 14916 message_creation?: { 14913 14917 /** 14914 14918 * The ID of the message that was created by this run step. 14915 14919 */ 14916 14920 message_id?: string; 14917 14921 }; 14918 - /** 14919 - * Always `message_creation`. 14920 - */ 14921 - type: 'message_creation'; 14922 14922 }; 14923 14923 14924 14924 /** ··· 14928 14928 */ 14929 14929 export type RunStepDeltaStepDetailsToolCallsCodeObject = { 14930 14930 /** 14931 + * The index of the tool call in the tool calls array. 14932 + */ 14933 + index: number; 14934 + /** 14935 + * The ID of the tool call. 14936 + */ 14937 + id?: string; 14938 + /** 14939 + * The type of tool call. This is always going to be `code_interpreter` for this type of tool call. 14940 + */ 14941 + type: 'code_interpreter'; 14942 + /** 14931 14943 * The Code Interpreter tool call definition. 14932 14944 */ 14933 14945 code_interpreter?: { ··· 14947 14959 } & RunStepDeltaStepDetailsToolCallsCodeOutputImageObject) 14948 14960 >; 14949 14961 }; 14950 - /** 14951 - * The ID of the tool call. 14952 - */ 14953 - id?: string; 14954 - /** 14955 - * The index of the tool call in the tool calls array. 14956 - */ 14957 - index: number; 14958 - /** 14959 - * The type of tool call. This is always going to be `code_interpreter` for this type of tool call. 14960 - */ 14961 - type: 'code_interpreter'; 14962 14962 }; 14963 14963 14964 14964 /** 14965 14965 * Code interpreter image output 14966 14966 */ 14967 14967 export type RunStepDeltaStepDetailsToolCallsCodeOutputImageObject = { 14968 - image?: { 14969 - /** 14970 - * The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. 14971 - */ 14972 - file_id?: string; 14973 - }; 14974 14968 /** 14975 14969 * The index of the output in the outputs array. 14976 14970 */ ··· 14979 14973 * Always `image`. 14980 14974 */ 14981 14975 type: 'image'; 14976 + image?: { 14977 + /** 14978 + * The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. 14979 + */ 14980 + file_id?: string; 14981 + }; 14982 14982 }; 14983 14983 14984 14984 /** ··· 14992 14992 */ 14993 14993 index: number; 14994 14994 /** 14995 - * The text output from the Code Interpreter tool call. 14996 - */ 14997 - logs?: string; 14998 - /** 14999 14995 * Always `logs`. 15000 14996 */ 15001 14997 type: 'logs'; 14998 + /** 14999 + * The text output from the Code Interpreter tool call. 15000 + */ 15001 + logs?: string; 15002 15002 }; 15003 15003 15004 15004 /** ··· 15006 15006 */ 15007 15007 export type RunStepDeltaStepDetailsToolCallsFileSearchObject = { 15008 15008 /** 15009 - * For now, this is always going to be an empty object. 15009 + * The index of the tool call in the tool calls array. 15010 15010 */ 15011 - file_search: { 15012 - [key: string]: unknown; 15013 - }; 15011 + index: number; 15014 15012 /** 15015 15013 * The ID of the tool call object. 15016 15014 */ 15017 15015 id?: string; 15018 15016 /** 15019 - * The index of the tool call in the tool calls array. 15017 + * The type of tool call. This is always going to be `file_search` for this type of tool call. 15020 15018 */ 15021 - index: number; 15019 + type: 'file_search'; 15022 15020 /** 15023 - * The type of tool call. This is always going to be `file_search` for this type of tool call. 15021 + * For now, this is always going to be an empty object. 15024 15022 */ 15025 - type: 'file_search'; 15023 + file_search: { 15024 + [key: string]: unknown; 15025 + }; 15026 15026 }; 15027 15027 15028 15028 /** ··· 15030 15030 */ 15031 15031 export type RunStepDeltaStepDetailsToolCallsFunctionObject = { 15032 15032 /** 15033 + * The index of the tool call in the tool calls array. 15034 + */ 15035 + index: number; 15036 + /** 15037 + * The ID of the tool call object. 15038 + */ 15039 + id?: string; 15040 + /** 15041 + * The type of tool call. This is always going to be `function` for this type of tool call. 15042 + */ 15043 + type: 'function'; 15044 + /** 15033 15045 * The definition of the function that was called. 15034 15046 */ 15035 15047 function?: { 15036 15048 /** 15037 - * The arguments passed to the function. 15038 - */ 15039 - arguments?: string; 15040 - /** 15041 15049 * The name of the function. 15042 15050 */ 15043 15051 name?: string; 15052 + /** 15053 + * The arguments passed to the function. 15054 + */ 15055 + arguments?: string; 15044 15056 /** 15045 15057 * The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. 15046 15058 */ 15047 15059 output?: string; 15048 15060 }; 15049 - /** 15050 - * The ID of the tool call object. 15051 - */ 15052 - id?: string; 15053 - /** 15054 - * The index of the tool call in the tool calls array. 15055 - */ 15056 - index: number; 15057 - /** 15058 - * The type of tool call. This is always going to be `function` for this type of tool call. 15059 - */ 15060 - type: 'function'; 15061 15061 }; 15062 15062 15063 15063 /** ··· 15067 15067 */ 15068 15068 export type RunStepDeltaStepDetailsToolCallsObject = { 15069 15069 /** 15070 + * Always `tool_calls`. 15071 + */ 15072 + type: 'tool_calls'; 15073 + /** 15070 15074 * An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`. 15071 15075 * 15072 15076 */ 15073 15077 tool_calls?: Array<RunStepDeltaStepDetailsToolCall>; 15074 - /** 15075 - * Always `tool_calls`. 15076 - */ 15077 - type: 'tool_calls'; 15078 15078 }; 15079 15079 15080 15080 /** ··· 15083 15083 * Details of the message creation by the run step. 15084 15084 */ 15085 15085 export type RunStepDetailsMessageCreationObject = { 15086 + /** 15087 + * Always `message_creation`. 15088 + */ 15089 + type: 'message_creation'; 15086 15090 message_creation: { 15087 15091 /** 15088 15092 * The ID of the message that was created by this run step. 15089 15093 */ 15090 15094 message_id: string; 15091 15095 }; 15092 - /** 15093 - * Always `message_creation`. 15094 - */ 15095 - type: 'message_creation'; 15096 15096 }; 15097 15097 15098 15098 /** ··· 15102 15102 */ 15103 15103 export type RunStepDetailsToolCallsCodeObject = { 15104 15104 /** 15105 + * The ID of the tool call. 15106 + */ 15107 + id: string; 15108 + /** 15109 + * The type of tool call. This is always going to be `code_interpreter` for this type of tool call. 15110 + */ 15111 + type: 'code_interpreter'; 15112 + /** 15105 15113 * The Code Interpreter tool call definition. 15106 15114 */ 15107 15115 code_interpreter: { ··· 15121 15129 } & RunStepDetailsToolCallsCodeOutputImageObject) 15122 15130 >; 15123 15131 }; 15124 - /** 15125 - * The ID of the tool call. 15126 - */ 15127 - id: string; 15128 - /** 15129 - * The type of tool call. This is always going to be `code_interpreter` for this type of tool call. 15130 - */ 15131 - type: 'code_interpreter'; 15132 15132 }; 15133 15133 15134 15134 /** 15135 15135 * Code Interpreter image output 15136 15136 */ 15137 15137 export type RunStepDetailsToolCallsCodeOutputImageObject = { 15138 + /** 15139 + * Always `image`. 15140 + */ 15141 + type: 'image'; 15138 15142 image: { 15139 15143 /** 15140 15144 * The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. 15141 15145 */ 15142 15146 file_id: string; 15143 15147 }; 15144 - /** 15145 - * Always `image`. 15146 - */ 15147 - type: 'image'; 15148 15148 }; 15149 15149 15150 15150 /** ··· 15153 15153 * Text output from the Code Interpreter tool call as part of a run step. 15154 15154 */ 15155 15155 export type RunStepDetailsToolCallsCodeOutputLogsObject = { 15156 - /** 15157 - * The text output from the Code Interpreter tool call. 15158 - */ 15159 - logs: string; 15160 15156 /** 15161 15157 * Always `logs`. 15162 15158 */ 15163 15159 type: 'logs'; 15160 + /** 15161 + * The text output from the Code Interpreter tool call. 15162 + */ 15163 + logs: string; 15164 15164 }; 15165 15165 15166 15166 /** ··· 15168 15168 */ 15169 15169 export type RunStepDetailsToolCallsFileSearchObject = { 15170 15170 /** 15171 + * The ID of the tool call object. 15172 + */ 15173 + id: string; 15174 + /** 15175 + * The type of tool call. This is always going to be `file_search` for this type of tool call. 15176 + */ 15177 + type: 'file_search'; 15178 + /** 15171 15179 * For now, this is always going to be an empty object. 15172 15180 */ 15173 15181 file_search: { ··· 15177 15185 */ 15178 15186 results?: Array<RunStepDetailsToolCallsFileSearchResultObject>; 15179 15187 }; 15180 - /** 15181 - * The ID of the tool call object. 15182 - */ 15183 - id: string; 15184 - /** 15185 - * The type of tool call. This is always going to be `file_search` for this type of tool call. 15186 - */ 15187 - type: 'file_search'; 15188 15188 }; 15189 15189 15190 15190 /** ··· 15207 15207 */ 15208 15208 export type RunStepDetailsToolCallsFileSearchResultObject = { 15209 15209 /** 15210 - * The content of the result that was found. The content is only included if requested via the include query parameter. 15211 - */ 15212 - content?: Array<{ 15213 - /** 15214 - * The text content of the file. 15215 - */ 15216 - text?: string; 15217 - /** 15218 - * The type of the content. 15219 - */ 15220 - type?: 'text'; 15221 - }>; 15222 - /** 15223 15210 * The ID of the file that result was found in. 15224 15211 */ 15225 15212 file_id: string; ··· 15231 15218 * The score of the result. All values must be a floating point number between 0 and 1. 15232 15219 */ 15233 15220 score: number; 15221 + /** 15222 + * The content of the result that was found. The content is only included if requested via the include query parameter. 15223 + */ 15224 + content?: Array<{ 15225 + /** 15226 + * The type of the content. 15227 + */ 15228 + type?: 'text'; 15229 + /** 15230 + * The text content of the file. 15231 + */ 15232 + text?: string; 15233 + }>; 15234 15234 }; 15235 15235 15236 15236 /** ··· 15238 15238 */ 15239 15239 export type RunStepDetailsToolCallsFunctionObject = { 15240 15240 /** 15241 + * The ID of the tool call object. 15242 + */ 15243 + id: string; 15244 + /** 15245 + * The type of tool call. This is always going to be `function` for this type of tool call. 15246 + */ 15247 + type: 'function'; 15248 + /** 15241 15249 * The definition of the function that was called. 15242 15250 */ 15243 15251 function: { 15244 15252 /** 15245 - * The arguments passed to the function. 15246 - */ 15247 - arguments: string; 15248 - /** 15249 15253 * The name of the function. 15250 15254 */ 15251 15255 name: string; 15256 + /** 15257 + * The arguments passed to the function. 15258 + */ 15259 + arguments: string; 15252 15260 /** 15253 15261 * The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. 15254 15262 */ 15255 15263 output: string; 15256 15264 }; 15257 - /** 15258 - * The ID of the tool call object. 15259 - */ 15260 - id: string; 15261 - /** 15262 - * The type of tool call. This is always going to be `function` for this type of tool call. 15263 - */ 15264 - type: 'function'; 15265 15265 }; 15266 15266 15267 15267 /** ··· 15271 15271 */ 15272 15272 export type RunStepDetailsToolCallsObject = { 15273 15273 /** 15274 + * Always `tool_calls`. 15275 + */ 15276 + type: 'tool_calls'; 15277 + /** 15274 15278 * An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`. 15275 15279 * 15276 15280 */ 15277 15281 tool_calls: Array<RunStepDetailsToolCall>; 15278 - /** 15279 - * Always `tool_calls`. 15280 - */ 15281 - type: 'tool_calls'; 15282 15282 }; 15283 15283 15284 15284 /** ··· 15289 15289 */ 15290 15290 export type RunStepObject = { 15291 15291 /** 15292 - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated with the run step. 15292 + * The identifier of the run step, which can be referenced in API endpoints. 15293 15293 */ 15294 - assistant_id: string; 15294 + id: string; 15295 15295 /** 15296 - * The Unix timestamp (in seconds) for when the run step was cancelled. 15297 - */ 15298 - cancelled_at: number; 15299 - /** 15300 - * The Unix timestamp (in seconds) for when the run step completed. 15296 + * The object type, which is always `thread.run.step`. 15301 15297 */ 15302 - completed_at: number; 15298 + object: 'thread.run.step'; 15303 15299 /** 15304 15300 * The Unix timestamp (in seconds) for when the run step was created. 15305 15301 */ 15306 15302 created_at: number; 15307 15303 /** 15308 - * The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired. 15304 + * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated with the run step. 15309 15305 */ 15310 - expired_at: number; 15306 + assistant_id: string; 15311 15307 /** 15312 - * The Unix timestamp (in seconds) for when the run step failed. 15308 + * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. 15313 15309 */ 15314 - failed_at: number; 15310 + thread_id: string; 15315 15311 /** 15316 - * The identifier of the run step, which can be referenced in API endpoints. 15312 + * The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a part of. 15317 15313 */ 15318 - id: string; 15314 + run_id: string; 15315 + /** 15316 + * The type of run step, which can be either `message_creation` or `tool_calls`. 15317 + */ 15318 + type: 'message_creation' | 'tool_calls'; 15319 + /** 15320 + * The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. 15321 + */ 15322 + status: 'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired'; 15323 + /** 15324 + * The details of the run step. 15325 + */ 15326 + step_details: 15327 + | ({ 15328 + type?: 'RunStepDetailsMessageCreationObject'; 15329 + } & RunStepDetailsMessageCreationObject) 15330 + | ({ 15331 + type?: 'RunStepDetailsToolCallsObject'; 15332 + } & RunStepDetailsToolCallsObject); 15319 15333 /** 15320 15334 * The last error associated with this run step. Will be `null` if there are no errors. 15321 15335 */ ··· 15329 15343 */ 15330 15344 message: string; 15331 15345 }; 15332 - metadata: Metadata; 15333 15346 /** 15334 - * The object type, which is always `thread.run.step`. 15347 + * The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired. 15335 15348 */ 15336 - object: 'thread.run.step'; 15349 + expired_at: number; 15337 15350 /** 15338 - * The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a part of. 15351 + * The Unix timestamp (in seconds) for when the run step was cancelled. 15339 15352 */ 15340 - run_id: string; 15353 + cancelled_at: number; 15341 15354 /** 15342 - * The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. 15355 + * The Unix timestamp (in seconds) for when the run step failed. 15343 15356 */ 15344 - status: 'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired'; 15357 + failed_at: number; 15345 15358 /** 15346 - * The details of the run step. 15359 + * The Unix timestamp (in seconds) for when the run step completed. 15347 15360 */ 15348 - step_details: 15349 - | ({ 15350 - type?: 'RunStepDetailsMessageCreationObject'; 15351 - } & RunStepDetailsMessageCreationObject) 15352 - | ({ 15353 - type?: 'RunStepDetailsToolCallsObject'; 15354 - } & RunStepDetailsToolCallsObject); 15355 - /** 15356 - * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. 15357 - */ 15358 - thread_id: string; 15359 - /** 15360 - * The type of run step, which can be either `message_creation` or `tool_calls`. 15361 - */ 15362 - type: 'message_creation' | 'tool_calls'; 15361 + completed_at: number; 15362 + metadata: Metadata; 15363 15363 usage: RunStepCompletionUsage; 15364 15364 }; 15365 15365 15366 15366 export type RunStepStreamEvent = 15367 15367 | { 15368 + event: 'thread.run.step.created'; 15368 15369 data: RunStepObject; 15369 - event: 'thread.run.step.created'; 15370 15370 } 15371 15371 | { 15372 + event: 'thread.run.step.in_progress'; 15372 15373 data: RunStepObject; 15373 - event: 'thread.run.step.in_progress'; 15374 15374 } 15375 15375 | { 15376 + event: 'thread.run.step.delta'; 15376 15377 data: RunStepDeltaObject; 15377 - event: 'thread.run.step.delta'; 15378 15378 } 15379 15379 | { 15380 - data: RunStepObject; 15381 15380 event: 'thread.run.step.completed'; 15381 + data: RunStepObject; 15382 15382 } 15383 15383 | { 15384 - data: RunStepObject; 15385 15384 event: 'thread.run.step.failed'; 15385 + data: RunStepObject; 15386 15386 } 15387 15387 | { 15388 + event: 'thread.run.step.cancelled'; 15388 15389 data: RunStepObject; 15389 - event: 'thread.run.step.cancelled'; 15390 15390 } 15391 15391 | { 15392 - data: RunStepObject; 15393 15392 event: 'thread.run.step.expired'; 15393 + data: RunStepObject; 15394 15394 }; 15395 15395 15396 15396 export type RunStreamEvent = 15397 15397 | { 15398 - data: RunObject; 15399 15398 event: 'thread.run.created'; 15399 + data: RunObject; 15400 15400 } 15401 15401 | { 15402 - data: RunObject; 15403 15402 event: 'thread.run.queued'; 15403 + data: RunObject; 15404 15404 } 15405 15405 | { 15406 + event: 'thread.run.in_progress'; 15406 15407 data: RunObject; 15407 - event: 'thread.run.in_progress'; 15408 15408 } 15409 15409 | { 15410 + event: 'thread.run.requires_action'; 15410 15411 data: RunObject; 15411 - event: 'thread.run.requires_action'; 15412 15412 } 15413 15413 | { 15414 - data: RunObject; 15415 15414 event: 'thread.run.completed'; 15415 + data: RunObject; 15416 15416 } 15417 15417 | { 15418 - data: RunObject; 15419 15418 event: 'thread.run.incomplete'; 15419 + data: RunObject; 15420 15420 } 15421 15421 | { 15422 + event: 'thread.run.failed'; 15422 15423 data: RunObject; 15423 - event: 'thread.run.failed'; 15424 15424 } 15425 15425 | { 15426 - data: RunObject; 15427 15426 event: 'thread.run.cancelling'; 15427 + data: RunObject; 15428 15428 } 15429 15429 | { 15430 + event: 'thread.run.cancelled'; 15430 15431 data: RunObject; 15431 - event: 'thread.run.cancelled'; 15432 15432 } 15433 15433 | { 15434 - data: RunObject; 15435 15434 event: 'thread.run.expired'; 15435 + data: RunObject; 15436 15436 }; 15437 15437 15438 15438 /** ··· 15440 15440 */ 15441 15441 export type RunToolCallObject = { 15442 15442 /** 15443 + * The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint. 15444 + */ 15445 + id: string; 15446 + /** 15447 + * The type of tool call the output is required for. For now, this is always `function`. 15448 + */ 15449 + type: 'function'; 15450 + /** 15443 15451 * The function definition. 15444 15452 */ 15445 15453 function: { 15446 15454 /** 15455 + * The name of the function. 15456 + */ 15457 + name: string; 15458 + /** 15447 15459 * The arguments that the model expects you to pass to the function. 15448 15460 */ 15449 15461 arguments: string; 15450 - /** 15451 - * The name of the function. 15452 - */ 15453 - name: string; 15454 15462 }; 15455 - /** 15456 - * The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint. 15457 - */ 15458 - id: string; 15459 - /** 15460 - * The type of tool call the output is required for. For now, this is always `function`. 15461 - */ 15462 - type: 'function'; 15463 15463 }; 15464 15464 15465 15465 /** ··· 15485 15485 */ 15486 15486 export type Scroll = { 15487 15487 /** 15488 - * The horizontal scroll distance. 15489 - * 15490 - */ 15491 - scroll_x: number; 15492 - /** 15493 - * The vertical scroll distance. 15494 - * 15495 - */ 15496 - scroll_y: number; 15497 - /** 15498 15488 * Specifies the event type. For a scroll action, this property is 15499 15489 * always set to `scroll`. 15500 15490 * ··· 15510 15500 * 15511 15501 */ 15512 15502 y: number; 15503 + /** 15504 + * The horizontal scroll distance. 15505 + * 15506 + */ 15507 + scroll_x: number; 15508 + /** 15509 + * The vertical scroll distance. 15510 + * 15511 + */ 15512 + scroll_y: number; 15513 15513 }; 15514 15514 15515 15515 /** ··· 15526 15526 AUTO: 'auto', 15527 15527 DEFAULT: 'default', 15528 15528 FLEX: 'flex', 15529 - PRIORITY: 'priority', 15530 15529 SCALE: 'scale', 15530 + PRIORITY: 'priority', 15531 15531 } as const; 15532 15532 15533 15533 /** ··· 15547 15547 */ 15548 15548 export type SpeechAudioDeltaEvent = { 15549 15549 /** 15550 - * A chunk of Base64-encoded audio data. 15550 + * The type of the event. Always `speech.audio.delta`. 15551 15551 * 15552 15552 */ 15553 - audio: string; 15553 + type: 'speech.audio.delta'; 15554 15554 /** 15555 - * The type of the event. Always `speech.audio.delta`. 15555 + * A chunk of Base64-encoded audio data. 15556 15556 * 15557 15557 */ 15558 - type: 'speech.audio.delta'; 15558 + audio: string; 15559 15559 }; 15560 15560 15561 15561 /** ··· 15589 15589 15590 15590 export type StaticChunkingStrategy = { 15591 15591 /** 15592 + * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. 15593 + */ 15594 + max_chunk_size_tokens: number; 15595 + /** 15592 15596 * The number of tokens that overlap between chunks. The default value is `400`. 15593 15597 * 15594 15598 * Note that the overlap must not exceed half of `max_chunk_size_tokens`. 15595 15599 * 15596 15600 */ 15597 15601 chunk_overlap_tokens: number; 15598 - /** 15599 - * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. 15600 - */ 15601 - max_chunk_size_tokens: number; 15602 15602 }; 15603 15603 15604 15604 /** ··· 15607 15607 * Customize your own chunking strategy by setting chunk size and chunk overlap. 15608 15608 */ 15609 15609 export type StaticChunkingStrategyRequestParam = { 15610 - static: StaticChunkingStrategy; 15611 15610 /** 15612 15611 * Always `static`. 15613 15612 */ 15614 15613 type: 'static'; 15614 + static: StaticChunkingStrategy; 15615 15615 }; 15616 15616 15617 15617 /** 15618 15618 * Static Chunking Strategy 15619 15619 */ 15620 15620 export type StaticChunkingStrategyResponseParam = { 15621 - static: StaticChunkingStrategy; 15622 15621 /** 15623 15622 * Always `static`. 15624 15623 */ 15625 15624 type: 'static'; 15625 + static: StaticChunkingStrategy; 15626 15626 }; 15627 15627 15628 15628 /** ··· 15636 15636 15637 15637 export type SubmitToolOutputsRunRequest = { 15638 15638 /** 15639 - * If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. 15640 - * 15641 - */ 15642 - stream?: boolean; 15643 - /** 15644 15639 * A list of tools for which the outputs are being submitted. 15645 15640 */ 15646 15641 tool_outputs: Array<{ 15647 15642 /** 15648 - * The output of the tool call to be submitted to continue the run. 15649 - */ 15650 - output?: string; 15651 - /** 15652 15643 * The ID of the tool call in the `required_action` object within the run object the output is being submitted for. 15653 15644 */ 15654 15645 tool_call_id?: string; 15646 + /** 15647 + * The output of the tool call to be submitted to continue the run. 15648 + */ 15649 + output?: string; 15655 15650 }>; 15651 + /** 15652 + * If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. 15653 + * 15654 + */ 15655 + stream?: boolean; 15656 15656 }; 15657 15657 15658 15658 /** ··· 15691 15691 */ 15692 15692 export type TextResponseFormatJsonSchema = { 15693 15693 /** 15694 + * The type of response format being defined. Always `json_schema`. 15695 + */ 15696 + type: 'json_schema'; 15697 + /** 15694 15698 * A description of what the response format is for, used by the model to 15695 15699 * determine how to respond in the format. 15696 15700 * ··· 15712 15716 * 15713 15717 */ 15714 15718 strict?: boolean; 15715 - /** 15716 - * The type of response format being defined. Always `json_schema`. 15717 - */ 15718 - type: 'json_schema'; 15719 15719 }; 15720 15720 15721 15721 /** ··· 15725 15725 */ 15726 15726 export type ThreadObject = { 15727 15727 /** 15728 - * The Unix timestamp (in seconds) for when the thread was created. 15729 - */ 15730 - created_at: number; 15731 - /** 15732 15728 * The identifier, which can be referenced in API endpoints. 15733 15729 */ 15734 15730 id: string; 15735 - metadata: Metadata; 15736 15731 /** 15737 15732 * The object type, which is always `thread`. 15738 15733 */ 15739 15734 object: 'thread'; 15735 + /** 15736 + * The Unix timestamp (in seconds) for when the thread was created. 15737 + */ 15738 + created_at: number; 15740 15739 /** 15741 15740 * A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. 15742 15741 * ··· 15757 15756 vector_store_ids?: Array<string>; 15758 15757 }; 15759 15758 }; 15759 + metadata: Metadata; 15760 15760 }; 15761 15761 15762 15762 /** 15763 15763 * Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. 15764 15764 */ 15765 15765 export type ThreadStreamEvent = { 15766 - data: ThreadObject; 15767 15766 /** 15768 15767 * Whether to enable input audio transcription. 15769 15768 */ 15770 15769 enabled?: boolean; 15771 15770 event: 'thread.created'; 15771 + data: ThreadObject; 15772 15772 }; 15773 15773 15774 15774 export type ToggleCertificatesRequest = { ··· 15816 15816 */ 15817 15817 export type ToolChoiceAllowed = { 15818 15818 /** 15819 + * Allowed tool configuration type. Always `allowed_tools`. 15820 + */ 15821 + type: 'allowed_tools'; 15822 + /** 15819 15823 * Constrains the tools available to the model to a pre-defined set. 15820 15824 * 15821 15825 * `auto` allows the model to pick from among the allowed tools and generate a ··· 15841 15845 tools: Array<{ 15842 15846 [key: string]: unknown; 15843 15847 }>; 15844 - /** 15845 - * Allowed tool configuration type. Always `allowed_tools`. 15846 - */ 15847 - type: 'allowed_tools'; 15848 15848 }; 15849 15849 15850 15850 /** ··· 15855 15855 */ 15856 15856 export type ToolChoiceCustom = { 15857 15857 /** 15858 - * The name of the custom tool to call. 15858 + * For custom tool calling, the type is always `custom`. 15859 15859 */ 15860 - name: string; 15860 + type: 'custom'; 15861 15861 /** 15862 - * For custom tool calling, the type is always `custom`. 15862 + * The name of the custom tool to call. 15863 15863 */ 15864 - type: 'custom'; 15864 + name: string; 15865 15865 }; 15866 15866 15867 15867 /** ··· 15872 15872 */ 15873 15873 export type ToolChoiceFunction = { 15874 15874 /** 15875 + * For function calling, the type is always `function`. 15876 + */ 15877 + type: 'function'; 15878 + /** 15875 15879 * The name of the function to call. 15876 15880 */ 15877 15881 name: string; 15878 - /** 15879 - * For function calling, the type is always `function`. 15880 - */ 15881 - type: 'function'; 15882 15882 }; 15883 15883 15884 15884 /** ··· 15889 15889 */ 15890 15890 export type ToolChoiceMcp = { 15891 15891 /** 15892 - * The name of the tool to call on the server. 15893 - * 15892 + * For MCP tools, the type is always `mcp`. 15894 15893 */ 15895 - name?: string; 15894 + type: 'mcp'; 15896 15895 /** 15897 15896 * The label of the MCP server to use. 15898 15897 * 15899 15898 */ 15900 15899 server_label: string; 15901 15900 /** 15902 - * For MCP tools, the type is always `mcp`. 15901 + * The name of the tool to call on the server. 15902 + * 15903 15903 */ 15904 - type: 'mcp'; 15904 + name?: string; 15905 15905 }; 15906 15906 15907 15907 /** ··· 15918 15918 * 15919 15919 */ 15920 15920 export const ToolChoiceOptions = { 15921 - AUTO: 'auto', 15922 15921 NONE: 'none', 15922 + AUTO: 'auto', 15923 15923 REQUIRED: 'required', 15924 15924 } as const; 15925 15925 ··· 15973 15973 */ 15974 15974 export type TranscriptTextDeltaEvent = { 15975 15975 /** 15976 + * The type of the event. Always `transcript.text.delta`. 15977 + * 15978 + */ 15979 + type: 'transcript.text.delta'; 15980 + /** 15976 15981 * The text delta that was additionally transcribed. 15977 15982 * 15978 15983 */ ··· 15983 15988 */ 15984 15989 logprobs?: Array<{ 15985 15990 /** 15986 - * The bytes that were used to generate the log probability. 15991 + * The token that was used to generate the log probability. 15987 15992 * 15988 15993 */ 15989 - bytes?: Array<number>; 15994 + token?: string; 15990 15995 /** 15991 15996 * The log probability of the token. 15992 15997 * 15993 15998 */ 15994 15999 logprob?: number; 15995 16000 /** 15996 - * The token that was used to generate the log probability. 16001 + * The bytes that were used to generate the log probability. 15997 16002 * 15998 16003 */ 15999 - token?: string; 16004 + bytes?: Array<number>; 16000 16005 }>; 16001 - /** 16002 - * The type of the event. Always `transcript.text.delta`. 16003 - * 16004 - */ 16005 - type: 'transcript.text.delta'; 16006 16006 }; 16007 16007 16008 16008 /** ··· 16010 16010 */ 16011 16011 export type TranscriptTextDoneEvent = { 16012 16012 /** 16013 + * The type of the event. Always `transcript.text.done`. 16014 + * 16015 + */ 16016 + type: 'transcript.text.done'; 16017 + /** 16018 + * The text that was transcribed. 16019 + * 16020 + */ 16021 + text: string; 16022 + /** 16013 16023 * The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. 16014 16024 * 16015 16025 */ 16016 16026 logprobs?: Array<{ 16017 16027 /** 16018 - * The bytes that were used to generate the log probability. 16028 + * The token that was used to generate the log probability. 16019 16029 * 16020 16030 */ 16021 - bytes?: Array<number>; 16031 + token?: string; 16022 16032 /** 16023 16033 * The log probability of the token. 16024 16034 * 16025 16035 */ 16026 16036 logprob?: number; 16027 16037 /** 16028 - * The token that was used to generate the log probability. 16038 + * The bytes that were used to generate the log probability. 16029 16039 * 16030 16040 */ 16031 - token?: string; 16041 + bytes?: Array<number>; 16032 16042 }>; 16033 - /** 16034 - * The text that was transcribed. 16035 - * 16036 - */ 16037 - text: string; 16038 - /** 16039 - * The type of the event. Always `transcript.text.done`. 16040 - * 16041 - */ 16042 - type: 'transcript.text.done'; 16043 16043 usage?: TranscriptTextUsageTokens; 16044 16044 }; 16045 16045 ··· 16049 16049 * Usage statistics for models billed by audio input duration. 16050 16050 */ 16051 16051 export type TranscriptTextUsageDuration = { 16052 - /** 16053 - * Duration of the input audio in seconds. 16054 - */ 16055 - seconds: number; 16056 16052 /** 16057 16053 * The type of the usage object. Always `duration` for this variant. 16058 16054 */ 16059 16055 type: 'duration'; 16056 + /** 16057 + * Duration of the input audio in seconds. 16058 + */ 16059 + seconds: number; 16060 16060 }; 16061 16061 16062 16062 /** ··· 16066 16066 */ 16067 16067 export type TranscriptTextUsageTokens = { 16068 16068 /** 16069 + * The type of the usage object. Always `tokens` for this variant. 16070 + */ 16071 + type: 'tokens'; 16072 + /** 16073 + * Number of input tokens billed for this request. 16074 + */ 16075 + input_tokens: number; 16076 + /** 16069 16077 * Details about the input tokens billed for this request. 16070 16078 */ 16071 16079 input_token_details?: { 16072 16080 /** 16073 - * Number of audio tokens billed for this request. 16074 - */ 16075 - audio_tokens?: number; 16076 - /** 16077 16081 * Number of text tokens billed for this request. 16078 16082 */ 16079 16083 text_tokens?: number; 16084 + /** 16085 + * Number of audio tokens billed for this request. 16086 + */ 16087 + audio_tokens?: number; 16080 16088 }; 16081 16089 /** 16082 - * Number of input tokens billed for this request. 16083 - */ 16084 - input_tokens: number; 16085 - /** 16086 16090 * Number of output tokens generated. 16087 16091 */ 16088 16092 output_tokens: number; ··· 16090 16094 * Total number of tokens used (input + output). 16091 16095 */ 16092 16096 total_tokens: number; 16093 - /** 16094 - * The type of the usage object. Always `tokens` for this variant. 16095 - */ 16096 - type: 'tokens'; 16097 16097 }; 16098 16098 16099 16099 /** ··· 16110 16110 16111 16111 export type TranscriptionSegment = { 16112 16112 /** 16113 - * Average logprob of the segment. If the value is lower than -1, consider the logprobs failed. 16114 - */ 16115 - avg_logprob: number; 16116 - /** 16117 - * Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed. 16118 - */ 16119 - compression_ratio: number; 16120 - /** 16121 - * End time of the segment in seconds. 16122 - */ 16123 - end: number; 16124 - /** 16125 16113 * Unique identifier of the segment. 16126 16114 */ 16127 16115 id: number; 16128 16116 /** 16129 - * Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent. 16130 - */ 16131 - no_speech_prob: number; 16132 - /** 16133 16117 * Seek offset of the segment. 16134 16118 */ 16135 16119 seek: number; ··· 16138 16122 */ 16139 16123 start: number; 16140 16124 /** 16141 - * Temperature parameter used for generating the segment. 16125 + * End time of the segment in seconds. 16142 16126 */ 16143 - temperature: number; 16127 + end: number; 16144 16128 /** 16145 16129 * Text content of the segment. 16146 16130 */ ··· 16149 16133 * Array of token IDs for the text content. 16150 16134 */ 16151 16135 tokens: Array<number>; 16136 + /** 16137 + * Temperature parameter used for generating the segment. 16138 + */ 16139 + temperature: number; 16140 + /** 16141 + * Average logprob of the segment. If the value is lower than -1, consider the logprobs failed. 16142 + */ 16143 + avg_logprob: number; 16144 + /** 16145 + * Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed. 16146 + */ 16147 + compression_ratio: number; 16148 + /** 16149 + * Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent. 16150 + */ 16151 + no_speech_prob: number; 16152 16152 }; 16153 16153 16154 16154 export type TranscriptionWord = { 16155 16155 /** 16156 - * End time of the word in seconds. 16156 + * The text content of the word. 16157 16157 */ 16158 - end: number; 16158 + word: string; 16159 16159 /** 16160 16160 * Start time of the word in seconds. 16161 16161 */ 16162 16162 start: number; 16163 16163 /** 16164 - * The text content of the word. 16164 + * End time of the word in seconds. 16165 16165 */ 16166 - word: string; 16166 + end: number; 16167 16167 }; 16168 16168 16169 16169 /** ··· 16173 16173 */ 16174 16174 export type TruncationObject = { 16175 16175 /** 16176 + * The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`. 16177 + */ 16178 + type: 'auto' | 'last_messages'; 16179 + /** 16176 16180 * The number of most recent messages from the thread when constructing the context for the run. 16177 16181 */ 16178 16182 last_messages?: number; 16179 - /** 16180 - * The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`. 16181 - */ 16182 - type: 'auto' | 'last_messages'; 16183 16183 }; 16184 16184 16185 16185 /** ··· 16190 16190 */ 16191 16191 export type Type = { 16192 16192 /** 16193 - * The text to type. 16194 - * 16195 - */ 16196 - text: string; 16197 - /** 16198 16193 * Specifies the event type. For a type action, this property is 16199 16194 * always set to `type`. 16200 16195 * 16201 16196 */ 16202 16197 type: 'type'; 16198 + /** 16199 + * The text to type. 16200 + * 16201 + */ 16202 + text: string; 16203 16203 }; 16204 16204 16205 16205 export type UpdateVectorStoreFileAttributesRequest = { ··· 16207 16207 }; 16208 16208 16209 16209 export type UpdateVectorStoreRequest = { 16210 - expires_after?: VectorStoreExpirationAfter & unknown; 16211 - metadata?: Metadata; 16212 16210 /** 16213 16211 * The name of the vector store. 16214 16212 */ 16215 16213 name?: string; 16214 + expires_after?: VectorStoreExpirationAfter & unknown; 16215 + metadata?: Metadata; 16216 16216 }; 16217 16217 16218 16218 /** ··· 16223 16223 */ 16224 16224 export type Upload = { 16225 16225 /** 16226 - * The intended number of bytes to be uploaded. 16226 + * The Upload unique identifier, which can be referenced in API endpoints. 16227 16227 */ 16228 - bytes: number; 16228 + id: string; 16229 16229 /** 16230 16230 * The Unix timestamp (in seconds) for when the Upload was created. 16231 16231 */ 16232 16232 created_at: number; 16233 - /** 16234 - * The Unix timestamp (in seconds) for when the Upload will expire. 16235 - */ 16236 - expires_at: number; 16237 - file?: OpenAiFile & unknown; 16238 16233 /** 16239 16234 * The name of the file to be uploaded. 16240 16235 */ 16241 16236 filename: string; 16242 16237 /** 16243 - * The Upload unique identifier, which can be referenced in API endpoints. 16238 + * The intended number of bytes to be uploaded. 16244 16239 */ 16245 - id: string; 16246 - /** 16247 - * The object type, which is always "upload". 16248 - */ 16249 - object: 'upload'; 16240 + bytes: number; 16250 16241 /** 16251 16242 * The intended purpose of the file. [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) for acceptable values. 16252 16243 */ ··· 16255 16246 * The status of the Upload. 16256 16247 */ 16257 16248 status: 'pending' | 'completed' | 'cancelled' | 'expired'; 16249 + /** 16250 + * The Unix timestamp (in seconds) for when the Upload will expire. 16251 + */ 16252 + expires_at: number; 16253 + /** 16254 + * The object type, which is always "upload". 16255 + */ 16256 + object: 'upload'; 16257 + file?: OpenAiFile & unknown; 16258 16258 }; 16259 16259 16260 16260 export type UploadCertificateRequest = { 16261 + /** 16262 + * An optional name for the certificate 16263 + */ 16264 + name?: string; 16261 16265 /** 16262 16266 * The certificate content in PEM format 16263 16267 */ 16264 16268 content: string; 16265 - /** 16266 - * An optional name for the certificate 16267 - */ 16268 - name?: string; 16269 16269 }; 16270 16270 16271 16271 /** ··· 16276 16276 */ 16277 16277 export type UploadPart = { 16278 16278 /** 16279 + * The upload Part unique identifier, which can be referenced in API endpoints. 16280 + */ 16281 + id: string; 16282 + /** 16279 16283 * The Unix timestamp (in seconds) for when the Part was created. 16280 16284 */ 16281 16285 created_at: number; 16282 16286 /** 16283 - * The upload Part unique identifier, which can be referenced in API endpoints. 16287 + * The ID of the Upload object that this Part was added to. 16284 16288 */ 16285 - id: string; 16289 + upload_id: string; 16286 16290 /** 16287 16291 * The object type, which is always `upload.part`. 16288 16292 */ 16289 16293 object: 'upload.part'; 16290 - /** 16291 - * The ID of the Upload object that this Part was added to. 16292 - */ 16293 - upload_id: string; 16294 16294 }; 16295 16295 16296 16296 /** 16297 16297 * The aggregated audio speeches usage details of the specific time bucket. 16298 16298 */ 16299 16299 export type UsageAudioSpeechesResult = { 16300 - /** 16301 - * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16302 - */ 16303 - api_key_id?: string; 16300 + object: 'organization.usage.audio_speeches.result'; 16304 16301 /** 16305 16302 * The number of characters processed. 16306 16303 */ 16307 16304 characters: number; 16308 16305 /** 16309 - * When `group_by=model`, this field provides the model name of the grouped usage result. 16310 - */ 16311 - model?: string; 16312 - /** 16313 16306 * The count of requests made to the model. 16314 16307 */ 16315 16308 num_model_requests: number; 16316 - object: 'organization.usage.audio_speeches.result'; 16317 16309 /** 16318 16310 * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16319 16311 */ ··· 16322 16314 * When `group_by=user_id`, this field provides the user ID of the grouped usage result. 16323 16315 */ 16324 16316 user_id?: string; 16317 + /** 16318 + * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16319 + */ 16320 + api_key_id?: string; 16321 + /** 16322 + * When `group_by=model`, this field provides the model name of the grouped usage result. 16323 + */ 16324 + model?: string; 16325 16325 }; 16326 16326 16327 16327 /** 16328 16328 * The aggregated audio transcriptions usage details of the specific time bucket. 16329 16329 */ 16330 16330 export type UsageAudioTranscriptionsResult = { 16331 + object: 'organization.usage.audio_transcriptions.result'; 16331 16332 /** 16332 - * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16333 - */ 16334 - api_key_id?: string; 16335 - /** 16336 - * When `group_by=model`, this field provides the model name of the grouped usage result. 16333 + * The number of seconds processed. 16337 16334 */ 16338 - model?: string; 16335 + seconds: number; 16339 16336 /** 16340 16337 * The count of requests made to the model. 16341 16338 */ 16342 16339 num_model_requests: number; 16343 - object: 'organization.usage.audio_transcriptions.result'; 16344 16340 /** 16345 16341 * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16346 16342 */ 16347 16343 project_id?: string; 16348 16344 /** 16349 - * The number of seconds processed. 16350 - */ 16351 - seconds: number; 16352 - /** 16353 16345 * When `group_by=user_id`, this field provides the user ID of the grouped usage result. 16354 16346 */ 16355 16347 user_id?: string; 16348 + /** 16349 + * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16350 + */ 16351 + api_key_id?: string; 16352 + /** 16353 + * When `group_by=model`, this field provides the model name of the grouped usage result. 16354 + */ 16355 + model?: string; 16356 16356 }; 16357 16357 16358 16358 /** 16359 16359 * The aggregated code interpreter sessions usage details of the specific time bucket. 16360 16360 */ 16361 16361 export type UsageCodeInterpreterSessionsResult = { 16362 + object: 'organization.usage.code_interpreter_sessions.result'; 16362 16363 /** 16363 16364 * The number of code interpreter sessions. 16364 16365 */ 16365 16366 num_sessions?: number; 16366 - object: 'organization.usage.code_interpreter_sessions.result'; 16367 16367 /** 16368 16368 * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16369 16369 */ ··· 16374 16374 * The aggregated completions usage details of the specific time bucket. 16375 16375 */ 16376 16376 export type UsageCompletionsResult = { 16377 + object: 'organization.usage.completions.result'; 16377 16378 /** 16378 - * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16379 + * The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens. 16379 16380 */ 16380 - api_key_id?: string; 16381 - /** 16382 - * When `group_by=batch`, this field tells whether the grouped usage result is batch or not. 16383 - */ 16384 - batch?: boolean; 16385 - /** 16386 - * The aggregated number of audio input tokens used, including cached tokens. 16387 - */ 16388 - input_audio_tokens?: number; 16381 + input_tokens: number; 16389 16382 /** 16390 16383 * The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens. 16391 16384 */ 16392 16385 input_cached_tokens?: number; 16393 16386 /** 16394 - * The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens. 16387 + * The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens. 16395 16388 */ 16396 - input_tokens: number; 16389 + output_tokens: number; 16397 16390 /** 16398 - * When `group_by=model`, this field provides the model name of the grouped usage result. 16391 + * The aggregated number of audio input tokens used, including cached tokens. 16399 16392 */ 16400 - model?: string; 16401 - /** 16402 - * The count of requests made to the model. 16403 - */ 16404 - num_model_requests: number; 16405 - object: 'organization.usage.completions.result'; 16393 + input_audio_tokens?: number; 16406 16394 /** 16407 16395 * The aggregated number of audio output tokens used. 16408 16396 */ 16409 16397 output_audio_tokens?: number; 16410 16398 /** 16411 - * The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens. 16399 + * The count of requests made to the model. 16412 16400 */ 16413 - output_tokens: number; 16401 + num_model_requests: number; 16414 16402 /** 16415 16403 * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16416 16404 */ ··· 16419 16407 * When `group_by=user_id`, this field provides the user ID of the grouped usage result. 16420 16408 */ 16421 16409 user_id?: string; 16410 + /** 16411 + * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16412 + */ 16413 + api_key_id?: string; 16414 + /** 16415 + * When `group_by=model`, this field provides the model name of the grouped usage result. 16416 + */ 16417 + model?: string; 16418 + /** 16419 + * When `group_by=batch`, this field tells whether the grouped usage result is batch or not. 16420 + */ 16421 + batch?: boolean; 16422 16422 }; 16423 16423 16424 16424 /** 16425 16425 * The aggregated embeddings usage details of the specific time bucket. 16426 16426 */ 16427 16427 export type UsageEmbeddingsResult = { 16428 - /** 16429 - * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16430 - */ 16431 - api_key_id?: string; 16428 + object: 'organization.usage.embeddings.result'; 16432 16429 /** 16433 16430 * The aggregated number of input tokens used. 16434 16431 */ 16435 16432 input_tokens: number; 16436 16433 /** 16437 - * When `group_by=model`, this field provides the model name of the grouped usage result. 16438 - */ 16439 - model?: string; 16440 - /** 16441 16434 * The count of requests made to the model. 16442 16435 */ 16443 16436 num_model_requests: number; 16444 - object: 'organization.usage.embeddings.result'; 16445 16437 /** 16446 16438 * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16447 16439 */ ··· 16450 16442 * When `group_by=user_id`, this field provides the user ID of the grouped usage result. 16451 16443 */ 16452 16444 user_id?: string; 16445 + /** 16446 + * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16447 + */ 16448 + api_key_id?: string; 16449 + /** 16450 + * When `group_by=model`, this field provides the model name of the grouped usage result. 16451 + */ 16452 + model?: string; 16453 16453 }; 16454 16454 16455 16455 /** 16456 16456 * The aggregated images usage details of the specific time bucket. 16457 16457 */ 16458 16458 export type UsageImagesResult = { 16459 - /** 16460 - * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16461 - */ 16462 - api_key_id?: string; 16459 + object: 'organization.usage.images.result'; 16463 16460 /** 16464 16461 * The number of images processed. 16465 16462 */ 16466 16463 images: number; 16467 16464 /** 16468 - * When `group_by=model`, this field provides the model name of the grouped usage result. 16469 - */ 16470 - model?: string; 16471 - /** 16472 16465 * The count of requests made to the model. 16473 16466 */ 16474 16467 num_model_requests: number; 16475 - object: 'organization.usage.images.result'; 16476 16468 /** 16477 - * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16469 + * When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`. 16478 16470 */ 16479 - project_id?: string; 16471 + source?: string; 16480 16472 /** 16481 16473 * When `group_by=size`, this field provides the image size of the grouped usage result. 16482 16474 */ 16483 16475 size?: string; 16484 16476 /** 16485 - * When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`. 16477 + * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16486 16478 */ 16487 - source?: string; 16479 + project_id?: string; 16488 16480 /** 16489 16481 * When `group_by=user_id`, this field provides the user ID of the grouped usage result. 16490 16482 */ 16491 16483 user_id?: string; 16484 + /** 16485 + * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16486 + */ 16487 + api_key_id?: string; 16488 + /** 16489 + * When `group_by=model`, this field provides the model name of the grouped usage result. 16490 + */ 16491 + model?: string; 16492 16492 }; 16493 16493 16494 16494 /** 16495 16495 * The aggregated moderations usage details of the specific time bucket. 16496 16496 */ 16497 16497 export type UsageModerationsResult = { 16498 - /** 16499 - * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16500 - */ 16501 - api_key_id?: string; 16498 + object: 'organization.usage.moderations.result'; 16502 16499 /** 16503 16500 * The aggregated number of input tokens used. 16504 16501 */ 16505 16502 input_tokens: number; 16506 16503 /** 16507 - * When `group_by=model`, this field provides the model name of the grouped usage result. 16508 - */ 16509 - model?: string; 16510 - /** 16511 16504 * The count of requests made to the model. 16512 16505 */ 16513 16506 num_model_requests: number; 16514 - object: 'organization.usage.moderations.result'; 16515 16507 /** 16516 16508 * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16517 16509 */ ··· 16520 16512 * When `group_by=user_id`, this field provides the user ID of the grouped usage result. 16521 16513 */ 16522 16514 user_id?: string; 16515 + /** 16516 + * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. 16517 + */ 16518 + api_key_id?: string; 16519 + /** 16520 + * When `group_by=model`, this field provides the model name of the grouped usage result. 16521 + */ 16522 + model?: string; 16523 16523 }; 16524 16524 16525 16525 export type UsageResponse = { 16526 + object: 'page'; 16526 16527 data: Array<UsageTimeBucket>; 16527 16528 has_more: boolean; 16528 16529 next_page: string; 16529 - object: 'page'; 16530 16530 }; 16531 16531 16532 16532 export type UsageTimeBucket = { 16533 + object: 'bucket'; 16534 + start_time: number; 16533 16535 end_time: number; 16534 - object: 'bucket'; 16535 16536 result: Array< 16536 16537 | ({ 16537 16538 object?: 'UsageCompletionsResult'; ··· 16561 16562 object?: 'CostsResult'; 16562 16563 } & CostsResult) 16563 16564 >; 16564 - start_time: number; 16565 16565 }; 16566 16566 16567 16567 /** ··· 16570 16570 export type UsageVectorStoresResult = { 16571 16571 object: 'organization.usage.vector_stores.result'; 16572 16572 /** 16573 + * The vector stores usage in bytes. 16574 + */ 16575 + usage_bytes: number; 16576 + /** 16573 16577 * When `group_by=project_id`, this field provides the project ID of the grouped usage result. 16574 16578 */ 16575 16579 project_id?: string; 16576 - /** 16577 - * The vector stores usage in bytes. 16578 - */ 16579 - usage_bytes: number; 16580 16580 }; 16581 16581 16582 16582 /** ··· 16584 16584 */ 16585 16585 export type User = { 16586 16586 /** 16587 - * The Unix timestamp (in seconds) of when the user was added. 16587 + * The object type, which is always `organization.user` 16588 16588 */ 16589 - added_at: number; 16590 - /** 16591 - * The email address of the user 16592 - */ 16593 - email: string; 16589 + object: 'organization.user'; 16594 16590 /** 16595 16591 * The identifier, which can be referenced in API endpoints 16596 16592 */ ··· 16600 16596 */ 16601 16597 name: string; 16602 16598 /** 16603 - * The object type, which is always `organization.user` 16599 + * The email address of the user 16604 16600 */ 16605 - object: 'organization.user'; 16601 + email: string; 16606 16602 /** 16607 16603 * `owner` or `reader` 16608 16604 */ 16609 16605 role: 'owner' | 'reader'; 16606 + /** 16607 + * The Unix timestamp (in seconds) of when the user was added. 16608 + */ 16609 + added_at: number; 16610 16610 }; 16611 16611 16612 16612 export type UserDeleteResponse = { 16613 + object: 'organization.user.deleted'; 16614 + id: string; 16613 16615 deleted: boolean; 16614 - id: string; 16615 - object: 'organization.user.deleted'; 16616 16616 }; 16617 16617 16618 16618 export type UserListResponse = { 16619 + object: 'list'; 16619 16620 data: Array<User>; 16620 16621 first_id: string; 16621 - has_more: boolean; 16622 16622 last_id: string; 16623 - object: 'list'; 16623 + has_more: boolean; 16624 16624 }; 16625 16625 16626 16626 export type UserRoleUpdateRequest = { ··· 16632 16632 16633 16633 export type VadConfig = { 16634 16634 /** 16635 + * Must be set to `server_vad` to enable manual chunking using server side VAD. 16636 + */ 16637 + type: 'server_vad'; 16638 + /** 16635 16639 * Amount of audio to include before the VAD detected speech (in 16636 16640 * milliseconds). 16637 16641 * ··· 16651 16655 * 16652 16656 */ 16653 16657 threshold?: number; 16654 - /** 16655 - * Must be set to `server_vad` to enable manual chunking using server side VAD. 16656 - */ 16657 - type: 'server_vad'; 16658 16658 }; 16659 16659 16660 16660 /** ··· 16722 16722 */ 16723 16723 export type VectorStoreFileBatchObject = { 16724 16724 /** 16725 + * The identifier, which can be referenced in API endpoints. 16726 + */ 16727 + id: string; 16728 + /** 16729 + * The object type, which is always `vector_store.file_batch`. 16730 + */ 16731 + object: 'vector_store.files_batch'; 16732 + /** 16725 16733 * The Unix timestamp (in seconds) for when the vector store files batch was created. 16726 16734 */ 16727 16735 created_at: number; 16736 + /** 16737 + * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. 16738 + */ 16739 + vector_store_id: string; 16740 + /** 16741 + * The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. 16742 + */ 16743 + status: 'in_progress' | 'completed' | 'cancelled' | 'failed'; 16728 16744 file_counts: { 16729 16745 /** 16730 - * The number of files that where cancelled. 16746 + * The number of files that are currently being processed. 16731 16747 */ 16732 - cancelled: number; 16748 + in_progress: number; 16733 16749 /** 16734 16750 * The number of files that have been processed. 16735 16751 */ ··· 16739 16755 */ 16740 16756 failed: number; 16741 16757 /** 16742 - * The number of files that are currently being processed. 16758 + * The number of files that where cancelled. 16743 16759 */ 16744 - in_progress: number; 16760 + cancelled: number; 16745 16761 /** 16746 16762 * The total number of files. 16747 16763 */ 16748 16764 total: number; 16749 16765 }; 16750 - /** 16751 - * The identifier, which can be referenced in API endpoints. 16752 - */ 16753 - id: string; 16754 - /** 16755 - * The object type, which is always `vector_store.file_batch`. 16756 - */ 16757 - object: 'vector_store.files_batch'; 16758 - /** 16759 - * The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. 16760 - */ 16761 - status: 'in_progress' | 'completed' | 'cancelled' | 'failed'; 16762 - /** 16763 - * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. 16764 - */ 16765 - vector_store_id: string; 16766 16766 }; 16767 16767 16768 16768 /** 16769 16769 * Represents the parsed content of a vector store file. 16770 16770 */ 16771 16771 export type VectorStoreFileContentResponse = { 16772 + /** 16773 + * The object type, which is always `vector_store.file_content.page` 16774 + */ 16775 + object: 'vector_store.file_content.page'; 16772 16776 /** 16773 16777 * Parsed content of the file. 16774 16778 */ 16775 16779 data: Array<{ 16776 16780 /** 16777 - * The text content 16778 - */ 16779 - text?: string; 16780 - /** 16781 16781 * The content type (currently only `"text"`) 16782 16782 */ 16783 16783 type?: string; 16784 + /** 16785 + * The text content 16786 + */ 16787 + text?: string; 16784 16788 }>; 16785 16789 /** 16786 16790 * Indicates if there are more content pages to fetch. ··· 16790 16794 * The token for the next page, if any. 16791 16795 */ 16792 16796 next_page: string; 16793 - /** 16794 - * The object type, which is always `vector_store.file_content.page` 16795 - */ 16796 - object: 'vector_store.file_content.page'; 16797 16797 }; 16798 16798 16799 16799 /** ··· 16802 16802 * A list of files attached to a vector store. 16803 16803 */ 16804 16804 export type VectorStoreFileObject = { 16805 - attributes?: VectorStoreFileAttributes; 16806 - chunking_strategy?: ChunkingStrategyResponse; 16805 + /** 16806 + * The identifier, which can be referenced in API endpoints. 16807 + */ 16808 + id: string; 16809 + /** 16810 + * The object type, which is always `vector_store.file`. 16811 + */ 16812 + object: 'vector_store.file'; 16813 + /** 16814 + * The total vector store usage in bytes. Note that this may be different from the original file size. 16815 + */ 16816 + usage_bytes: number; 16807 16817 /** 16808 16818 * The Unix timestamp (in seconds) for when the vector store file was created. 16809 16819 */ 16810 16820 created_at: number; 16811 16821 /** 16812 - * The identifier, which can be referenced in API endpoints. 16822 + * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. 16823 + */ 16824 + vector_store_id: string; 16825 + /** 16826 + * The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. 16813 16827 */ 16814 - id: string; 16828 + status: 'in_progress' | 'completed' | 'cancelled' | 'failed'; 16815 16829 /** 16816 16830 * The last error associated with this vector store file. Will be `null` if there are no errors. 16817 16831 */ ··· 16825 16839 */ 16826 16840 message: string; 16827 16841 }; 16828 - /** 16829 - * The object type, which is always `vector_store.file`. 16830 - */ 16831 - object: 'vector_store.file'; 16832 - /** 16833 - * The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. 16834 - */ 16835 - status: 'in_progress' | 'completed' | 'cancelled' | 'failed'; 16836 - /** 16837 - * The total vector store usage in bytes. Note that this may be different from the original file size. 16838 - */ 16839 - usage_bytes: number; 16840 - /** 16841 - * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. 16842 - */ 16843 - vector_store_id: string; 16842 + chunking_strategy?: ChunkingStrategyResponse; 16843 + attributes?: VectorStoreFileAttributes; 16844 16844 }; 16845 16845 16846 16846 /** ··· 16850 16850 */ 16851 16851 export type VectorStoreObject = { 16852 16852 /** 16853 + * The identifier, which can be referenced in API endpoints. 16854 + */ 16855 + id: string; 16856 + /** 16857 + * The object type, which is always `vector_store`. 16858 + */ 16859 + object: 'vector_store'; 16860 + /** 16853 16861 * The Unix timestamp (in seconds) for when the vector store was created. 16854 16862 */ 16855 16863 created_at: number; 16856 - expires_after?: VectorStoreExpirationAfter; 16864 + /** 16865 + * The name of the vector store. 16866 + */ 16867 + name: string; 16857 16868 /** 16858 - * The Unix timestamp (in seconds) for when the vector store will expire. 16869 + * The total number of bytes used by the files in the vector store. 16859 16870 */ 16860 - expires_at?: number; 16871 + usage_bytes: number; 16861 16872 file_counts: { 16862 16873 /** 16863 - * The number of files that were cancelled. 16874 + * The number of files that are currently being processed. 16864 16875 */ 16865 - cancelled: number; 16876 + in_progress: number; 16866 16877 /** 16867 16878 * The number of files that have been successfully processed. 16868 16879 */ ··· 16872 16883 */ 16873 16884 failed: number; 16874 16885 /** 16875 - * The number of files that are currently being processed. 16886 + * The number of files that were cancelled. 16876 16887 */ 16877 - in_progress: number; 16888 + cancelled: number; 16878 16889 /** 16879 16890 * The total number of files. 16880 16891 */ 16881 16892 total: number; 16882 16893 }; 16883 16894 /** 16884 - * The identifier, which can be referenced in API endpoints. 16895 + * The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. 16896 + */ 16897 + status: 'expired' | 'in_progress' | 'completed'; 16898 + expires_after?: VectorStoreExpirationAfter; 16899 + /** 16900 + * The Unix timestamp (in seconds) for when the vector store will expire. 16885 16901 */ 16886 - id: string; 16902 + expires_at?: number; 16887 16903 /** 16888 16904 * The Unix timestamp (in seconds) for when the vector store was last active. 16889 16905 */ 16890 16906 last_active_at: number; 16891 16907 metadata: Metadata; 16892 - /** 16893 - * The name of the vector store. 16894 - */ 16895 - name: string; 16896 - /** 16897 - * The object type, which is always `vector_store`. 16898 - */ 16899 - object: 'vector_store'; 16900 - /** 16901 - * The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. 16902 - */ 16903 - status: 'expired' | 'in_progress' | 'completed'; 16904 - /** 16905 - * The total number of bytes used by the files in the vector store. 16906 - */ 16907 - usage_bytes: number; 16908 16908 }; 16909 16909 16910 16910 export type VectorStoreSearchRequest = { 16911 16911 /** 16912 - * A filter to apply based on file attributes. 16912 + * A query string for a search 16913 + */ 16914 + query: string | Array<string>; 16915 + /** 16916 + * Whether to rewrite the natural language query for vector search. 16913 16917 */ 16914 - filters?: ComparisonFilter | CompoundFilter; 16918 + rewrite_query?: boolean; 16915 16919 /** 16916 16920 * The maximum number of results to return. This number should be between 1 and 50 inclusive. 16917 16921 */ 16918 16922 max_num_results?: number; 16919 16923 /** 16920 - * A query string for a search 16924 + * A filter to apply based on file attributes. 16921 16925 */ 16922 - query: string | Array<string>; 16926 + filters?: ComparisonFilter | CompoundFilter; 16923 16927 /** 16924 16928 * Ranking options for search. 16925 16929 */ ··· 16930 16934 ranker?: 'none' | 'auto' | 'default-2024-11-15'; 16931 16935 score_threshold?: number; 16932 16936 }; 16933 - /** 16934 - * Whether to rewrite the natural language query for vector search. 16935 - */ 16936 - rewrite_query?: boolean; 16937 16937 }; 16938 16938 16939 16939 export type VectorStoreSearchResultContentObject = { 16940 16940 /** 16941 - * The text content returned from search. 16942 - */ 16943 - text: string; 16944 - /** 16945 16941 * The type of content. 16946 16942 */ 16947 16943 type: 'text'; 16944 + /** 16945 + * The text content returned from search. 16946 + */ 16947 + text: string; 16948 16948 }; 16949 16949 16950 16950 export type VectorStoreSearchResultItem = { 16951 - attributes: VectorStoreFileAttributes; 16952 - /** 16953 - * Content chunks from the file. 16954 - */ 16955 - content: Array<VectorStoreSearchResultContentObject>; 16956 16951 /** 16957 16952 * The ID of the vector store file. 16958 16953 */ ··· 16965 16960 * The similarity score for the result. 16966 16961 */ 16967 16962 score: number; 16963 + attributes: VectorStoreFileAttributes; 16964 + /** 16965 + * Content chunks from the file. 16966 + */ 16967 + content: Array<VectorStoreSearchResultContentObject>; 16968 16968 }; 16969 16969 16970 16970 export type VectorStoreSearchResultsPage = { 16971 + /** 16972 + * The object type, which is always `vector_store.search_results.page` 16973 + */ 16974 + object: 'vector_store.search_results.page'; 16975 + search_query: Array<string>; 16971 16976 /** 16972 16977 * The list of search result items. 16973 16978 */ ··· 16980 16985 * The token for the next page, if any. 16981 16986 */ 16982 16987 next_page: string; 16983 - /** 16984 - * The object type, which is always `vector_store.search_results.page` 16985 - */ 16986 - object: 'vector_store.search_results.page'; 16987 - search_query: Array<string>; 16988 16988 }; 16989 16989 16990 16990 /** ··· 16994 16994 * 16995 16995 */ 16996 16996 export const Verbosity = { 16997 - HIGH: 'high', 16998 16997 LOW: 'low', 16999 16998 MEDIUM: 'medium', 16999 + HIGH: 'high', 17000 17000 } as const; 17001 17001 17002 17002 /** ··· 17041 17041 */ 17042 17042 export type WebSearchActionFind = { 17043 17043 /** 17044 - * The pattern or text to search for within the page. 17045 - * 17046 - */ 17047 - pattern: string; 17048 - /** 17049 17044 * The action type. 17050 17045 * 17051 17046 */ ··· 17055 17050 * 17056 17051 */ 17057 17052 url: string; 17053 + /** 17054 + * The pattern or text to search for within the page. 17055 + * 17056 + */ 17057 + pattern: string; 17058 17058 }; 17059 17059 17060 17060 /** ··· 17084 17084 */ 17085 17085 export type WebSearchActionSearch = { 17086 17086 /** 17087 - * The search query. 17087 + * The action type. 17088 17088 * 17089 17089 */ 17090 - query: string; 17090 + type: 'search'; 17091 17091 /** 17092 - * The action type. 17092 + * The search query. 17093 17093 * 17094 17094 */ 17095 - type: 'search'; 17095 + query: string; 17096 17096 }; 17097 17097 17098 17098 /** ··· 17101 17101 * 17102 17102 */ 17103 17103 export const WebSearchContextSize = { 17104 - HIGH: 'high', 17105 17104 LOW: 'low', 17106 17105 MEDIUM: 'medium', 17106 + HIGH: 'high', 17107 17107 } as const; 17108 17108 17109 17109 /** ··· 17121 17121 */ 17122 17122 export type WebSearchLocation = { 17123 17123 /** 17124 - * Free text input for the city of the user, e.g. `San Francisco`. 17125 - * 17126 - */ 17127 - city?: string; 17128 - /** 17129 17124 * The two-letter 17130 17125 * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, 17131 17126 * e.g. `US`. ··· 17138 17133 */ 17139 17134 region?: string; 17140 17135 /** 17136 + * Free text input for the city of the user, e.g. `San Francisco`. 17137 + * 17138 + */ 17139 + city?: string; 17140 + /** 17141 17141 * The [IANA timezone](https://timeapi.io/documentation/iana-timezones) 17142 17142 * of the user, e.g. `America/Los_Angeles`. 17143 17143 * ··· 17154 17154 */ 17155 17155 export type WebSearchToolCall = { 17156 17156 /** 17157 + * The unique ID of the web search tool call. 17158 + * 17159 + */ 17160 + id: string; 17161 + /** 17162 + * The type of the web search tool call. Always `web_search_call`. 17163 + * 17164 + */ 17165 + type: 'web_search_call'; 17166 + /** 17167 + * The status of the web search tool call. 17168 + * 17169 + */ 17170 + status: 'in_progress' | 'searching' | 'completed' | 'failed'; 17171 + /** 17157 17172 * An object describing the specific action taken in this web search call. 17158 17173 * Includes details on how the model used the web (search, open_page, find). 17159 17174 * ··· 17168 17183 | ({ 17169 17184 type?: 'WebSearchActionFind'; 17170 17185 } & WebSearchActionFind); 17171 - /** 17172 - * The unique ID of the web search tool call. 17173 - * 17174 - */ 17175 - id: string; 17176 - /** 17177 - * The status of the web search tool call. 17178 - * 17179 - */ 17180 - status: 'in_progress' | 'searching' | 'completed' | 'failed'; 17181 - /** 17182 - * The type of the web search tool call. Always `web_search_call`. 17183 - * 17184 - */ 17185 - type: 'web_search_call'; 17186 17186 }; 17187 17187 17188 17188 /** ··· 17198 17198 */ 17199 17199 created_at: number; 17200 17200 /** 17201 + * The unique ID of the event. 17202 + * 17203 + */ 17204 + id: string; 17205 + /** 17201 17206 * Event data payload. 17202 17207 * 17203 17208 */ ··· 17209 17214 id: string; 17210 17215 }; 17211 17216 /** 17212 - * The unique ID of the event. 17213 - * 17214 - */ 17215 - id: string; 17216 - /** 17217 17217 * The object of the event. Always `event`. 17218 17218 * 17219 17219 */ ··· 17238 17238 */ 17239 17239 created_at: number; 17240 17240 /** 17241 + * The unique ID of the event. 17242 + * 17243 + */ 17244 + id: string; 17245 + /** 17241 17246 * Event data payload. 17242 17247 * 17243 17248 */ ··· 17249 17254 id: string; 17250 17255 }; 17251 17256 /** 17252 - * The unique ID of the event. 17253 - * 17254 - */ 17255 - id: string; 17256 - /** 17257 17257 * The object of the event. Always `event`. 17258 17258 * 17259 17259 */ ··· 17278 17278 */ 17279 17279 created_at: number; 17280 17280 /** 17281 + * The unique ID of the event. 17282 + * 17283 + */ 17284 + id: string; 17285 + /** 17281 17286 * Event data payload. 17282 17287 * 17283 17288 */ ··· 17289 17294 id: string; 17290 17295 }; 17291 17296 /** 17292 - * The unique ID of the event. 17293 - * 17294 - */ 17295 - id: string; 17296 - /** 17297 17297 * The object of the event. Always `event`. 17298 17298 * 17299 17299 */ ··· 17318 17318 */ 17319 17319 created_at: number; 17320 17320 /** 17321 + * The unique ID of the event. 17322 + * 17323 + */ 17324 + id: string; 17325 + /** 17321 17326 * Event data payload. 17322 17327 * 17323 17328 */ ··· 17329 17334 id: string; 17330 17335 }; 17331 17336 /** 17332 - * The unique ID of the event. 17333 - * 17334 - */ 17335 - id: string; 17336 - /** 17337 17337 * The object of the event. Always `event`. 17338 17338 * 17339 17339 */ ··· 17358 17358 */ 17359 17359 created_at: number; 17360 17360 /** 17361 + * The unique ID of the event. 17362 + * 17363 + */ 17364 + id: string; 17365 + /** 17361 17366 * Event data payload. 17362 17367 * 17363 17368 */ ··· 17369 17374 id: string; 17370 17375 }; 17371 17376 /** 17372 - * The unique ID of the event. 17373 - * 17374 - */ 17375 - id: string; 17376 - /** 17377 17377 * The object of the event. Always `event`. 17378 17378 * 17379 17379 */ ··· 17398 17398 */ 17399 17399 created_at: number; 17400 17400 /** 17401 + * The unique ID of the event. 17402 + * 17403 + */ 17404 + id: string; 17405 + /** 17401 17406 * Event data payload. 17402 17407 * 17403 17408 */ ··· 17408 17413 */ 17409 17414 id: string; 17410 17415 }; 17411 - /** 17412 - * The unique ID of the event. 17413 - * 17414 - */ 17415 - id: string; 17416 17416 /** 17417 17417 * The object of the event. Always `event`. 17418 17418 * ··· 17438 17438 */ 17439 17439 created_at: number; 17440 17440 /** 17441 + * The unique ID of the event. 17442 + * 17443 + */ 17444 + id: string; 17445 + /** 17441 17446 * Event data payload. 17442 17447 * 17443 17448 */ ··· 17448 17453 */ 17449 17454 id: string; 17450 17455 }; 17451 - /** 17452 - * The unique ID of the event. 17453 - * 17454 - */ 17455 - id: string; 17456 17456 /** 17457 17457 * The object of the event. Always `event`. 17458 17458 * ··· 17478 17478 */ 17479 17479 created_at: number; 17480 17480 /** 17481 + * The unique ID of the event. 17482 + * 17483 + */ 17484 + id: string; 17485 + /** 17481 17486 * Event data payload. 17482 17487 * 17483 17488 */ ··· 17488 17493 */ 17489 17494 id: string; 17490 17495 }; 17491 - /** 17492 - * The unique ID of the event. 17493 - * 17494 - */ 17495 - id: string; 17496 17496 /** 17497 17497 * The object of the event. Always `event`. 17498 17498 * ··· 17518 17518 */ 17519 17519 created_at: number; 17520 17520 /** 17521 + * The unique ID of the event. 17522 + * 17523 + */ 17524 + id: string; 17525 + /** 17521 17526 * Event data payload. 17522 17527 * 17523 17528 */ ··· 17528 17533 */ 17529 17534 id: string; 17530 17535 }; 17531 - /** 17532 - * The unique ID of the event. 17533 - * 17534 - */ 17535 - id: string; 17536 17536 /** 17537 17537 * The object of the event. Always `event`. 17538 17538 * ··· 17558 17558 */ 17559 17559 created_at: number; 17560 17560 /** 17561 + * The unique ID of the event. 17562 + * 17563 + */ 17564 + id: string; 17565 + /** 17561 17566 * Event data payload. 17562 17567 * 17563 17568 */ ··· 17568 17573 */ 17569 17574 id: string; 17570 17575 }; 17571 - /** 17572 - * The unique ID of the event. 17573 - * 17574 - */ 17575 - id: string; 17576 17576 /** 17577 17577 * The object of the event. Always `event`. 17578 17578 * ··· 17598 17598 */ 17599 17599 created_at: number; 17600 17600 /** 17601 + * The unique ID of the event. 17602 + * 17603 + */ 17604 + id: string; 17605 + /** 17601 17606 * Event data payload. 17602 17607 * 17603 17608 */ ··· 17608 17613 */ 17609 17614 id: string; 17610 17615 }; 17611 - /** 17612 - * The unique ID of the event. 17613 - * 17614 - */ 17615 - id: string; 17616 17616 /** 17617 17617 * The object of the event. Always `event`. 17618 17618 * ··· 17638 17638 */ 17639 17639 created_at: number; 17640 17640 /** 17641 + * The unique ID of the event. 17642 + * 17643 + */ 17644 + id: string; 17645 + /** 17641 17646 * Event data payload. 17642 17647 * 17643 17648 */ ··· 17648 17653 */ 17649 17654 id: string; 17650 17655 }; 17651 - /** 17652 - * The unique ID of the event. 17653 - * 17654 - */ 17655 - id: string; 17656 17656 /** 17657 17657 * The object of the event. Always `event`. 17658 17658 * ··· 17678 17678 */ 17679 17679 created_at: number; 17680 17680 /** 17681 + * The unique ID of the event. 17682 + * 17683 + */ 17684 + id: string; 17685 + /** 17681 17686 * Event data payload. 17682 17687 * 17683 17688 */ ··· 17688 17693 */ 17689 17694 id: string; 17690 17695 }; 17691 - /** 17692 - * The unique ID of the event. 17693 - * 17694 - */ 17695 - id: string; 17696 17696 /** 17697 17697 * The object of the event. Always `event`. 17698 17698 * ··· 17718 17718 */ 17719 17719 created_at: number; 17720 17720 /** 17721 + * The unique ID of the event. 17722 + * 17723 + */ 17724 + id: string; 17725 + /** 17721 17726 * Event data payload. 17722 17727 * 17723 17728 */ ··· 17728 17733 */ 17729 17734 id: string; 17730 17735 }; 17731 - /** 17732 - * The unique ID of the event. 17733 - * 17734 - */ 17735 - id: string; 17736 17736 /** 17737 17737 * The object of the event. Always `event`. 17738 17738 * ··· 17752 17752 */ 17753 17753 export type InputTextContent = { 17754 17754 /** 17755 + * The type of the input item. Always `input_text`. 17756 + */ 17757 + type: 'input_text'; 17758 + /** 17755 17759 * The text input to the model. 17756 17760 */ 17757 17761 text: string; 17758 - /** 17759 - * The type of the input item. Always `input_text`. 17760 - */ 17761 - type: 'input_text'; 17762 17762 }; 17763 17763 17764 17764 /** ··· 17768 17768 */ 17769 17769 export type InputImageContent = { 17770 17770 /** 17771 - * The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`. 17771 + * The type of the input item. Always `input_image`. 17772 17772 */ 17773 - detail: 'low' | 'high' | 'auto'; 17773 + type: 'input_image'; 17774 + image_url?: string | null; 17774 17775 file_id?: string | null; 17775 - image_url?: string | null; 17776 17776 /** 17777 - * The type of the input item. Always `input_image`. 17777 + * The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`. 17778 17778 */ 17779 - type: 'input_image'; 17779 + detail: 'low' | 'high' | 'auto'; 17780 17780 }; 17781 17781 17782 17782 /** ··· 17786 17786 */ 17787 17787 export type InputFileContent = { 17788 17788 /** 17789 - * The content of the file to be sent to the model. 17790 - * 17789 + * The type of the input item. Always `input_file`. 17791 17790 */ 17792 - file_data?: string; 17791 + type: 'input_file'; 17793 17792 file_id?: string | null; 17794 - /** 17795 - * The URL of the file to be sent to the model. 17796 - */ 17797 - file_url?: string; 17798 17793 /** 17799 17794 * The name of the file to be sent to the model. 17800 17795 */ 17801 17796 filename?: string; 17802 17797 /** 17803 - * The type of the input item. Always `input_file`. 17798 + * The URL of the file to be sent to the model. 17804 17799 */ 17805 - type: 'input_file'; 17800 + file_url?: string; 17801 + /** 17802 + * The content of the file to be sent to the model. 17803 + * 17804 + */ 17805 + file_data?: string; 17806 17806 }; 17807 17807 17808 17808 /** ··· 17811 17811 * Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). 17812 17812 */ 17813 17813 export type FunctionTool = { 17814 - description?: string | null; 17814 + /** 17815 + * The type of the function tool. Always `function`. 17816 + */ 17817 + type: 'function'; 17815 17818 /** 17816 17819 * The name of the function to call. 17817 17820 */ 17818 17821 name: string; 17822 + description?: string | null; 17819 17823 parameters: { 17820 17824 [key: string]: unknown; 17821 17825 } | null; 17822 17826 strict: boolean | null; 17823 - /** 17824 - * The type of the function tool. Always `function`. 17825 - */ 17826 - type: 'function'; 17827 17827 }; 17828 17828 17829 17829 export type RankingOptions = { ··· 17845 17845 * A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). 17846 17846 */ 17847 17847 export type FileSearchTool = { 17848 - filters?: Filters | null; 17849 - /** 17850 - * The maximum number of results to return. This number should be between 1 and 50 inclusive. 17851 - */ 17852 - max_num_results?: number; 17853 - /** 17854 - * Ranking options for search. 17855 - */ 17856 - ranking_options?: RankingOptions; 17857 17848 /** 17858 17849 * The type of the file search tool. Always `file_search`. 17859 17850 */ ··· 17862 17853 * The IDs of the vector stores to search. 17863 17854 */ 17864 17855 vector_store_ids: Array<string>; 17856 + /** 17857 + * The maximum number of results to return. This number should be between 1 and 50 inclusive. 17858 + */ 17859 + max_num_results?: number; 17860 + /** 17861 + * Ranking options for search. 17862 + */ 17863 + ranking_options?: RankingOptions; 17864 + filters?: Filters | null; 17865 17865 }; 17866 17866 17867 17867 export type ApproximateLocation = { 17868 - city?: string | null; 17869 - country?: string | null; 17870 - region?: string | null; 17871 - timezone?: string | null; 17872 17868 /** 17873 17869 * The type of location approximation. Always `approximate`. 17874 17870 */ 17875 17871 type: 'approximate'; 17872 + country?: string | null; 17873 + region?: string | null; 17874 + city?: string | null; 17875 + timezone?: string | null; 17876 17876 }; 17877 17877 17878 17878 /** ··· 17882 17882 */ 17883 17883 export type WebSearchPreviewTool = { 17884 17884 /** 17885 - * High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. 17886 - */ 17887 - search_context_size?: 'low' | 'medium' | 'high'; 17888 - /** 17889 17885 * The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. 17890 17886 */ 17891 17887 type: 'web_search_preview' | 'web_search_preview_2025_03_11'; 17892 17888 user_location?: ApproximateLocation | null; 17889 + /** 17890 + * High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. 17891 + */ 17892 + search_context_size?: 'low' | 'medium' | 'high'; 17893 17893 }; 17894 17894 17895 17895 /** ··· 17899 17899 */ 17900 17900 export type ComputerUsePreviewTool = { 17901 17901 /** 17902 - * The height of the computer display. 17902 + * The type of the computer use tool. Always `computer_use_preview`. 17903 + */ 17904 + type: 'computer_use_preview'; 17905 + /** 17906 + * The type of computer environment to control. 17903 17907 */ 17904 - display_height: number; 17908 + environment: 'windows' | 'mac' | 'linux' | 'ubuntu' | 'browser'; 17905 17909 /** 17906 17910 * The width of the computer display. 17907 17911 */ 17908 17912 display_width: number; 17909 17913 /** 17910 - * The type of computer environment to control. 17911 - */ 17912 - environment: 'windows' | 'mac' | 'linux' | 'ubuntu' | 'browser'; 17913 - /** 17914 - * The type of the computer use tool. Always `computer_use_preview`. 17914 + * The height of the computer display. 17915 17915 */ 17916 - type: 'computer_use_preview'; 17916 + display_height: number; 17917 17917 }; 17918 17918 17919 17919 /** ··· 17922 17922 * The input tokens detailed information for the image generation. 17923 17923 */ 17924 17924 export type ImageGenInputUsageDetails = { 17925 - /** 17926 - * The number of image tokens in the input prompt. 17927 - */ 17928 - image_tokens: number; 17929 17925 /** 17930 17926 * The number of text tokens in the input prompt. 17931 17927 */ 17932 17928 text_tokens: number; 17929 + /** 17930 + * The number of image tokens in the input prompt. 17931 + */ 17932 + image_tokens: number; 17933 17933 }; 17934 17934 17935 17935 /** ··· 17942 17942 * The number of tokens (images and text) in the input prompt. 17943 17943 */ 17944 17944 input_tokens: number; 17945 - input_tokens_details: ImageGenInputUsageDetails; 17945 + /** 17946 + * The total number of tokens (images and text) used for the image generation. 17947 + */ 17948 + total_tokens: number; 17946 17949 /** 17947 17950 * The number of output tokens generated by the model. 17948 17951 */ 17949 17952 output_tokens: number; 17950 - /** 17951 - * The total number of tokens (images and text) used for the image generation. 17952 - */ 17953 - total_tokens: number; 17953 + input_tokens_details: ImageGenInputUsageDetails; 17954 17954 }; 17955 17955 17956 17956 /** ··· 17960 17960 */ 17961 17961 export type FileCitationBody = { 17962 17962 /** 17963 + * The type of the file citation. Always `file_citation`. 17964 + */ 17965 + type: 'file_citation'; 17966 + /** 17963 17967 * The ID of the file. 17964 17968 */ 17965 17969 file_id: string; 17966 17970 /** 17967 - * The filename of the file cited. 17968 - */ 17969 - filename: string; 17970 - /** 17971 17971 * The index of the file in the list of files. 17972 17972 */ 17973 17973 index: number; 17974 17974 /** 17975 - * The type of the file citation. Always `file_citation`. 17975 + * The filename of the file cited. 17976 17976 */ 17977 - type: 'file_citation'; 17977 + filename: string; 17978 17978 }; 17979 17979 17980 17980 /** ··· 17984 17984 */ 17985 17985 export type UrlCitationBody = { 17986 17986 /** 17987 - * The index of the last character of the URL citation in the message. 17987 + * The type of the URL citation. Always `url_citation`. 17988 17988 */ 17989 - end_index: number; 17989 + type: 'url_citation'; 17990 + /** 17991 + * The URL of the web resource. 17992 + */ 17993 + url: string; 17990 17994 /** 17991 17995 * The index of the first character of the URL citation in the message. 17992 17996 */ 17993 17997 start_index: number; 17994 17998 /** 17999 + * The index of the last character of the URL citation in the message. 18000 + */ 18001 + end_index: number; 18002 + /** 17995 18003 * The title of the web resource. 17996 18004 */ 17997 18005 title: string; 17998 - /** 17999 - * The type of the URL citation. Always `url_citation`. 18000 - */ 18001 - type: 'url_citation'; 18002 - /** 18003 - * The URL of the web resource. 18004 - */ 18005 - url: string; 18006 18006 }; 18007 18007 18008 18008 /** ··· 18012 18012 */ 18013 18013 export type ContainerFileCitationBody = { 18014 18014 /** 18015 - * The ID of the container file. 18015 + * The type of the container file citation. Always `container_file_citation`. 18016 18016 */ 18017 - container_id: string; 18017 + type: 'container_file_citation'; 18018 18018 /** 18019 - * The index of the last character of the container file citation in the message. 18019 + * The ID of the container file. 18020 18020 */ 18021 - end_index: number; 18021 + container_id: string; 18022 18022 /** 18023 18023 * The ID of the file. 18024 18024 */ 18025 18025 file_id: string; 18026 18026 /** 18027 - * The filename of the container file cited. 18028 - */ 18029 - filename: string; 18030 - /** 18031 18027 * The index of the first character of the container file citation in the message. 18032 18028 */ 18033 18029 start_index: number; 18034 18030 /** 18035 - * The type of the container file citation. Always `container_file_citation`. 18031 + * The index of the last character of the container file citation in the message. 18036 18032 */ 18037 - type: 'container_file_citation'; 18033 + end_index: number; 18034 + /** 18035 + * The filename of the container file cited. 18036 + */ 18037 + filename: string; 18038 18038 }; 18039 18039 18040 18040 export type Annotation = ··· 18057 18057 * The top log probability of a token. 18058 18058 */ 18059 18059 export type TopLogProb = { 18060 - bytes: Array<number>; 18060 + token: string; 18061 18061 logprob: number; 18062 - token: string; 18062 + bytes: Array<number>; 18063 18063 }; 18064 18064 18065 18065 /** ··· 18068 18068 * The log probability of a token. 18069 18069 */ 18070 18070 export type LogProb = { 18071 - bytes: Array<number>; 18072 - logprob: number; 18073 18071 token: string; 18072 + logprob: number; 18073 + bytes: Array<number>; 18074 18074 top_logprobs: Array<TopLogProb>; 18075 18075 }; 18076 18076 ··· 18081 18081 */ 18082 18082 export type OutputTextContent = { 18083 18083 /** 18084 - * The annotations of the text output. 18084 + * The type of the output text. Always `output_text`. 18085 18085 */ 18086 - annotations: Array<Annotation>; 18087 - logprobs?: Array<LogProb>; 18086 + type: 'output_text'; 18088 18087 /** 18089 18088 * The text output from the model. 18090 18089 */ 18091 18090 text: string; 18092 18091 /** 18093 - * The type of the output text. Always `output_text`. 18092 + * The annotations of the text output. 18094 18093 */ 18095 - type: 'output_text'; 18094 + annotations: Array<Annotation>; 18095 + logprobs?: Array<LogProb>; 18096 18096 }; 18097 18097 18098 18098 /** ··· 18102 18102 */ 18103 18103 export type RefusalContent = { 18104 18104 /** 18105 - * The refusal explanation from the model. 18106 - */ 18107 - refusal: string; 18108 - /** 18109 18105 * The type of the refusal. Always `refusal`. 18110 18106 */ 18111 18107 type: 'refusal'; 18108 + /** 18109 + * The refusal explanation from the model. 18110 + */ 18111 + refusal: string; 18112 18112 }; 18113 18113 18114 18114 /** 18115 18115 * A pending safety check for the computer call. 18116 18116 */ 18117 18117 export type ComputerCallSafetyCheckParam = { 18118 - code?: string | null; 18119 18118 /** 18120 18119 * The ID of the pending safety check. 18121 18120 */ 18122 18121 id: string; 18122 + code?: string | null; 18123 18123 message?: string | null; 18124 18124 }; 18125 18125 ··· 18129 18129 * The output of a computer tool call. 18130 18130 */ 18131 18131 export type ComputerCallOutputItemParam = { 18132 - acknowledged_safety_checks?: Array<ComputerCallSafetyCheckParam> | null; 18132 + id?: string | null; 18133 18133 /** 18134 18134 * The ID of the computer tool call that produced the output. 18135 18135 */ 18136 18136 call_id: string; 18137 - id?: string | null; 18138 - output: ComputerScreenshotImage; 18139 - status?: 'in_progress' | 'completed' | 'incomplete' | null; 18140 18137 /** 18141 18138 * The type of the computer tool call output. Always `computer_call_output`. 18142 18139 */ 18143 18140 type: 'computer_call_output'; 18141 + output: ComputerScreenshotImage; 18142 + acknowledged_safety_checks?: Array<ComputerCallSafetyCheckParam> | null; 18143 + status?: 'in_progress' | 'completed' | 'incomplete' | null; 18144 18144 }; 18145 18145 18146 18146 /** ··· 18149 18149 * The output of a function tool call. 18150 18150 */ 18151 18151 export type FunctionCallOutputItemParam = { 18152 + id?: string | null; 18152 18153 /** 18153 18154 * The unique ID of the function tool call generated by the model. 18154 18155 */ 18155 18156 call_id: string; 18156 - id?: string | null; 18157 + /** 18158 + * The type of the function tool call output. Always `function_call_output`. 18159 + */ 18160 + type: 'function_call_output'; 18157 18161 /** 18158 18162 * A JSON string of the output of the function tool call. 18159 18163 */ 18160 18164 output: string; 18161 18165 status?: 'in_progress' | 'completed' | 'incomplete' | null; 18162 - /** 18163 - * The type of the function tool call output. Always `function_call_output`. 18164 - */ 18165 - type: 'function_call_output'; 18166 18166 }; 18167 18167 18168 18168 /** ··· 18171 18171 * An internal identifier for an item to reference. 18172 18172 */ 18173 18173 export type ItemReferenceParam = { 18174 + type?: 'item_reference' | null; 18174 18175 /** 18175 18176 * The ID of the item to reference. 18176 18177 */ 18177 18178 id: string; 18178 - type?: 'item_reference' | null; 18179 18179 }; 18180 18180 18181 18181 export type RealtimeConversationItemContent = { 18182 18182 /** 18183 - * Base64-encoded audio bytes, used for `input_audio` content type. 18183 + * The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio`). 18184 18184 * 18185 18185 */ 18186 - audio?: string; 18186 + type?: 'input_text' | 'input_audio' | 'item_reference' | 'text' | 'audio'; 18187 + /** 18188 + * The text content, used for `input_text` and `text` content types. 18189 + * 18190 + */ 18191 + text?: string; 18187 18192 /** 18188 18193 * ID of a previous conversation item to reference (for `item_reference` 18189 18194 * content types in `response.create` events). These can reference both ··· 18192 18197 */ 18193 18198 id?: string; 18194 18199 /** 18195 - * The text content, used for `input_text` and `text` content types. 18200 + * Base64-encoded audio bytes, used for `input_audio` content type. 18196 18201 * 18197 18202 */ 18198 - text?: string; 18203 + audio?: string; 18199 18204 /** 18200 18205 * The transcript of the audio, used for `input_audio` and `audio` 18201 18206 * content types. 18202 18207 * 18203 18208 */ 18204 18209 transcript?: string; 18205 - /** 18206 - * The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio`). 18207 - * 18208 - */ 18209 - type?: 'input_text' | 'input_audio' | 'item_reference' | 'text' | 'audio'; 18210 18210 }; 18211 18211 18212 18212 export type RealtimeConnectParams = { ··· 18218 18218 */ 18219 18219 export type ModerationImageUrlInput = { 18220 18220 /** 18221 + * Always `image_url`. 18222 + */ 18223 + type: 'image_url'; 18224 + /** 18221 18225 * Contains either an image URL or a data URL for a base64 encoded image. 18222 18226 */ 18223 18227 image_url: { ··· 18226 18230 */ 18227 18231 url: string; 18228 18232 }; 18229 - /** 18230 - * Always `image_url`. 18231 - */ 18232 - type: 'image_url'; 18233 18233 }; 18234 18234 18235 18235 /** 18236 18236 * An object describing text to classify. 18237 18237 */ 18238 18238 export type ModerationTextInput = { 18239 + /** 18240 + * Always `text`. 18241 + */ 18242 + type: 'text'; 18239 18243 /** 18240 18244 * A string of text to classify. 18241 18245 */ 18242 18246 text: string; 18243 - /** 18244 - * Always `text`. 18245 - */ 18246 - type: 'text'; 18247 18247 }; 18248 18248 18249 18249 /** ··· 18264 18264 export const FilePurpose = { 18265 18265 ASSISTANTS: 'assistants', 18266 18266 BATCH: 'batch', 18267 - EVALS: 'evals', 18268 18267 FINE_TUNE: 'fine-tune', 18268 + VISION: 'vision', 18269 18269 USER_DATA: 'user_data', 18270 - VISION: 'vision', 18270 + EVALS: 'evals', 18271 18271 } as const; 18272 18272 18273 18273 /** ··· 18282 18282 */ 18283 18283 code?: string; 18284 18284 /** 18285 - * The line number of the input file where the error occurred, if applicable. 18286 - */ 18287 - line?: number; 18288 - /** 18289 18285 * A human-readable message providing more details about the error. 18290 18286 */ 18291 18287 message?: string; ··· 18293 18289 * The name of the parameter that caused the error, if applicable. 18294 18290 */ 18295 18291 param?: string; 18292 + /** 18293 + * The line number of the input file where the error occurred, if applicable. 18294 + */ 18295 + line?: number; 18296 18296 }; 18297 18297 18298 18298 /** ··· 18300 18300 */ 18301 18301 export type BatchRequestCounts = { 18302 18302 /** 18303 + * Total number of requests in the batch. 18304 + */ 18305 + total: number; 18306 + /** 18303 18307 * Number of requests that have been completed successfully. 18304 18308 */ 18305 18309 completed: number; ··· 18307 18311 * Number of requests that have failed. 18308 18312 */ 18309 18313 failed: number; 18310 - /** 18311 - * Total number of requests in the batch. 18312 - */ 18313 - total: number; 18314 18314 }; 18315 18315 18316 18316 export type AssistantTool = ··· 18391 18391 } & MessageDeltaContentImageUrlObject); 18392 18392 18393 18393 export const ChatModel = { 18394 + GPT_5: 'gpt-5', 18395 + GPT_5_MINI: 'gpt-5-mini', 18396 + GPT_5_NANO: 'gpt-5-nano', 18397 + GPT_5_2025_08_07: 'gpt-5-2025-08-07', 18398 + GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07', 18399 + GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07', 18400 + GPT_5_CHAT_LATEST: 'gpt-5-chat-latest', 18401 + GPT_4_1: 'gpt-4.1', 18402 + GPT_4_1_MINI: 'gpt-4.1-mini', 18403 + GPT_4_1_NANO: 'gpt-4.1-nano', 18404 + GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14', 18405 + GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14', 18406 + GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14', 18407 + O4_MINI: 'o4-mini', 18408 + O4_MINI_2025_04_16: 'o4-mini-2025-04-16', 18409 + O3: 'o3', 18410 + O3_2025_04_16: 'o3-2025-04-16', 18411 + O3_MINI: 'o3-mini', 18412 + O3_MINI_2025_01_31: 'o3-mini-2025-01-31', 18413 + O1: 'o1', 18414 + O1_2024_12_17: 'o1-2024-12-17', 18415 + O1_PREVIEW: 'o1-preview', 18416 + O1_PREVIEW_2024_09_12: 'o1-preview-2024-09-12', 18417 + O1_MINI: 'o1-mini', 18418 + O1_MINI_2024_09_12: 'o1-mini-2024-09-12', 18394 18419 GPT_4O: 'gpt-4o', 18395 - CHATGPT_4O_LATEST: 'chatgpt-4o-latest', 18396 - GPT_4O_2024_05_13: 'gpt-4o-2024-05-13', 18397 - CODEX_MINI_LATEST: 'codex-mini-latest', 18420 + GPT_4O_2024_11_20: 'gpt-4o-2024-11-20', 18398 18421 GPT_4O_2024_08_06: 'gpt-4o-2024-08-06', 18399 - GPT_4O_2024_11_20: 'gpt-4o-2024-11-20', 18422 + GPT_4O_2024_05_13: 'gpt-4o-2024-05-13', 18400 18423 GPT_4O_AUDIO_PREVIEW: 'gpt-4o-audio-preview', 18401 18424 GPT_4O_AUDIO_PREVIEW_2024_10_01: 'gpt-4o-audio-preview-2024-10-01', 18402 18425 GPT_4O_AUDIO_PREVIEW_2024_12_17: 'gpt-4o-audio-preview-2024-12-17', 18403 - GPT_4: 'gpt-4', 18404 18426 GPT_4O_AUDIO_PREVIEW_2025_06_03: 'gpt-4o-audio-preview-2025-06-03', 18405 - GPT_4O_MINI: 'gpt-4o-mini', 18406 - GPT_4O_MINI_2024_07_18: 'gpt-4o-mini-2024-07-18', 18407 18427 GPT_4O_MINI_AUDIO_PREVIEW: 'gpt-4o-mini-audio-preview', 18408 18428 GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17: 'gpt-4o-mini-audio-preview-2024-12-17', 18409 - GPT_3_5_TURBO: 'gpt-3.5-turbo', 18410 - GPT_4_1: 'gpt-4.1', 18411 - GPT_3_5_TURBO_0301: 'gpt-3.5-turbo-0301', 18412 - GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14', 18413 - GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613', 18414 - GPT_4_1_MINI: 'gpt-4.1-mini', 18415 - GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125', 18416 - GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14', 18417 - GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106', 18418 - GPT_4_1_NANO: 'gpt-4.1-nano', 18419 - GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k', 18420 - GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14', 18421 - GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613', 18422 - GPT_5: 'gpt-5', 18429 + GPT_4O_SEARCH_PREVIEW: 'gpt-4o-search-preview', 18423 18430 GPT_4O_MINI_SEARCH_PREVIEW: 'gpt-4o-mini-search-preview', 18424 - GPT_5_2025_08_07: 'gpt-5-2025-08-07', 18431 + GPT_4O_SEARCH_PREVIEW_2025_03_11: 'gpt-4o-search-preview-2025-03-11', 18425 18432 GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11: 18426 18433 'gpt-4o-mini-search-preview-2025-03-11', 18427 - GPT_5_CHAT_LATEST: 'gpt-5-chat-latest', 18428 - GPT_4O_SEARCH_PREVIEW: 'gpt-4o-search-preview', 18429 - GPT_5_MINI: 'gpt-5-mini', 18430 - GPT_4O_SEARCH_PREVIEW_2025_03_11: 'gpt-4o-search-preview-2025-03-11', 18431 - GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07', 18434 + CHATGPT_4O_LATEST: 'chatgpt-4o-latest', 18435 + CODEX_MINI_LATEST: 'codex-mini-latest', 18436 + GPT_4O_MINI: 'gpt-4o-mini', 18437 + GPT_4O_MINI_2024_07_18: 'gpt-4o-mini-2024-07-18', 18438 + GPT_4_TURBO: 'gpt-4-turbo', 18439 + GPT_4_TURBO_2024_04_09: 'gpt-4-turbo-2024-04-09', 18432 18440 GPT_4_0125_PREVIEW: 'gpt-4-0125-preview', 18433 - GPT_5_NANO: 'gpt-5-nano', 18441 + GPT_4_TURBO_PREVIEW: 'gpt-4-turbo-preview', 18442 + GPT_4_1106_PREVIEW: 'gpt-4-1106-preview', 18443 + GPT_4_VISION_PREVIEW: 'gpt-4-vision-preview', 18444 + GPT_4: 'gpt-4', 18434 18445 GPT_4_0314: 'gpt-4-0314', 18435 - GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07', 18436 18446 GPT_4_0613: 'gpt-4-0613', 18437 - O1: 'o1', 18438 - GPT_4_1106_PREVIEW: 'gpt-4-1106-preview', 18439 - O1_2024_12_17: 'o1-2024-12-17', 18440 18447 GPT_4_32K: 'gpt-4-32k', 18441 - O1_MINI: 'o1-mini', 18442 18448 GPT_4_32K_0314: 'gpt-4-32k-0314', 18443 - O3: 'o3', 18444 18449 GPT_4_32K_0613: 'gpt-4-32k-0613', 18445 - O3_2025_04_16: 'o3-2025-04-16', 18446 - GPT_4_TURBO: 'gpt-4-turbo', 18447 - O4_MINI: 'o4-mini', 18448 - GPT_4_TURBO_2024_04_09: 'gpt-4-turbo-2024-04-09', 18449 - O4_MINI_2025_04_16: 'o4-mini-2025-04-16', 18450 - GPT_4_TURBO_PREVIEW: 'gpt-4-turbo-preview', 18451 - O3_MINI: 'o3-mini', 18452 - GPT_4_VISION_PREVIEW: 'gpt-4-vision-preview', 18453 - O3_MINI_2025_01_31: 'o3-mini-2025-01-31', 18454 - O1_MINI_2024_09_12: 'o1-mini-2024-09-12', 18455 - O1_PREVIEW: 'o1-preview', 18456 - O1_PREVIEW_2024_09_12: 'o1-preview-2024-09-12', 18450 + GPT_3_5_TURBO: 'gpt-3.5-turbo', 18451 + GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k', 18452 + GPT_3_5_TURBO_0301: 'gpt-3.5-turbo-0301', 18453 + GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613', 18454 + GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106', 18455 + GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125', 18456 + GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613', 18457 18457 } as const; 18458 18458 18459 18459 export type ChatModel = (typeof ChatModel)[keyof typeof ChatModel]; ··· 18463 18463 * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. 18464 18464 */ 18465 18465 assistant_id: string; 18466 - /** 18467 - * Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. 18468 - */ 18469 - instructions?: string; 18470 - /** 18471 - * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 18472 - * 18473 - */ 18474 - max_completion_tokens?: number; 18475 - /** 18476 - * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 18477 - * 18478 - */ 18479 - max_prompt_tokens?: number; 18480 - metadata?: Metadata; 18466 + thread?: CreateThreadRequest; 18481 18467 /** 18482 18468 * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. 18483 18469 */ ··· 18521 18507 | 'gpt-3.5-turbo-1106' 18522 18508 | 'gpt-3.5-turbo-0125' 18523 18509 | 'gpt-3.5-turbo-16k-0613'; 18524 - parallel_tool_calls?: ParallelToolCalls; 18525 - response_format?: AssistantsApiResponseFormatOption; 18526 18510 /** 18527 - * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 18528 - * 18511 + * Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. 18529 18512 */ 18530 - temperature?: number; 18531 - thread?: CreateThreadRequest; 18532 - tool_choice?: AssistantsApiToolChoiceOption & unknown; 18513 + instructions?: string; 18514 + /** 18515 + * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. 18516 + */ 18517 + tools?: Array<AssistantTool>; 18533 18518 /** 18534 18519 * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. 18535 18520 * ··· 18550 18535 vector_store_ids?: Array<string>; 18551 18536 }; 18552 18537 }; 18538 + metadata?: Metadata; 18553 18539 /** 18554 - * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. 18540 + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 18541 + * 18555 18542 */ 18556 - tools?: Array<AssistantTool>; 18543 + temperature?: number; 18557 18544 /** 18558 18545 * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. 18559 18546 * ··· 18561 18548 * 18562 18549 */ 18563 18550 top_p?: number; 18551 + /** 18552 + * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 18553 + * 18554 + */ 18555 + max_prompt_tokens?: number; 18556 + /** 18557 + * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 18558 + * 18559 + */ 18560 + max_completion_tokens?: number; 18564 18561 truncation_strategy?: TruncationObject & unknown; 18562 + tool_choice?: AssistantsApiToolChoiceOption & unknown; 18563 + parallel_tool_calls?: ParallelToolCalls; 18564 + response_format?: AssistantsApiResponseFormatOption; 18565 18565 }; 18566 18566 18567 18567 export type CreateRunRequestWithoutStream = { 18568 18568 /** 18569 - * Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. 18569 + * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. 18570 18570 */ 18571 - additional_instructions?: string; 18571 + assistant_id: string; 18572 18572 /** 18573 - * Adds additional messages to the thread before creating the run. 18573 + * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. 18574 18574 */ 18575 - additional_messages?: Array<CreateMessageRequest>; 18576 - /** 18577 - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. 18578 - */ 18579 - assistant_id: string; 18575 + model?: string | AssistantSupportedModels; 18576 + reasoning_effort?: ReasoningEffort; 18580 18577 /** 18581 18578 * Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. 18582 18579 */ 18583 18580 instructions?: string; 18584 18581 /** 18585 - * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 18586 - * 18582 + * Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. 18587 18583 */ 18588 - max_completion_tokens?: number; 18584 + additional_instructions?: string; 18589 18585 /** 18590 - * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 18591 - * 18586 + * Adds additional messages to the thread before creating the run. 18592 18587 */ 18593 - max_prompt_tokens?: number; 18594 - metadata?: Metadata; 18588 + additional_messages?: Array<CreateMessageRequest>; 18595 18589 /** 18596 - * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. 18590 + * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. 18597 18591 */ 18598 - model?: string | AssistantSupportedModels; 18599 - parallel_tool_calls?: ParallelToolCalls; 18600 - reasoning_effort?: ReasoningEffort; 18601 - response_format?: AssistantsApiResponseFormatOption; 18592 + tools?: Array<AssistantTool>; 18593 + metadata?: Metadata; 18602 18594 /** 18603 18595 * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. 18604 18596 * 18605 18597 */ 18606 18598 temperature?: number; 18607 - tool_choice?: AssistantsApiToolChoiceOption & unknown; 18608 - /** 18609 - * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. 18610 - */ 18611 - tools?: Array<AssistantTool>; 18612 18599 /** 18613 18600 * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. 18614 18601 * ··· 18616 18603 * 18617 18604 */ 18618 18605 top_p?: number; 18606 + /** 18607 + * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 18608 + * 18609 + */ 18610 + max_prompt_tokens?: number; 18611 + /** 18612 + * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. 18613 + * 18614 + */ 18615 + max_completion_tokens?: number; 18619 18616 truncation_strategy?: TruncationObject & unknown; 18617 + tool_choice?: AssistantsApiToolChoiceOption & unknown; 18618 + parallel_tool_calls?: ParallelToolCalls; 18619 + response_format?: AssistantsApiResponseFormatOption; 18620 18620 }; 18621 18621 18622 18622 export type SubmitToolOutputsRunRequestWithoutStream = { ··· 18625 18625 */ 18626 18626 tool_outputs: Array<{ 18627 18627 /** 18628 - * The output of the tool call to be submitted to continue the run. 18629 - */ 18630 - output?: string; 18631 - /** 18632 18628 * The ID of the tool call in the `required_action` object within the run object the output is being submitted for. 18633 18629 */ 18634 18630 tool_call_id?: string; 18631 + /** 18632 + * The output of the tool call to be submitted to continue the run. 18633 + */ 18634 + output?: string; 18635 18635 }>; 18636 18636 }; 18637 18637 ··· 18639 18639 * The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`. 18640 18640 */ 18641 18641 export const RunStatus = { 18642 - CANCELLED: 'cancelled', 18642 + QUEUED: 'queued', 18643 + IN_PROGRESS: 'in_progress', 18644 + REQUIRES_ACTION: 'requires_action', 18643 18645 CANCELLING: 'cancelling', 18644 - COMPLETED: 'completed', 18645 - EXPIRED: 'expired', 18646 + CANCELLED: 'cancelled', 18646 18647 FAILED: 'failed', 18648 + COMPLETED: 'completed', 18647 18649 INCOMPLETE: 'incomplete', 18648 - IN_PROGRESS: 'in_progress', 18649 - QUEUED: 'queued', 18650 - REQUIRES_ACTION: 'requires_action', 18650 + EXPIRED: 'expired', 18651 18651 } as const; 18652 18652 18653 18653 /** ··· 18676 18676 path?: never; 18677 18677 query?: { 18678 18678 /** 18679 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 18679 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 18680 18680 * 18681 18681 */ 18682 - after?: string; 18682 + limit?: number; 18683 18683 /** 18684 - * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 18684 + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 18685 18685 * 18686 18686 */ 18687 - before?: string; 18687 + order?: 'asc' | 'desc'; 18688 18688 /** 18689 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 18689 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 18690 18690 * 18691 18691 */ 18692 - limit?: number; 18692 + after?: string; 18693 18693 /** 18694 - * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 18694 + * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 18695 18695 * 18696 18696 */ 18697 - order?: 'asc' | 'desc'; 18697 + before?: string; 18698 18698 }; 18699 18699 url: '/assistants'; 18700 18700 }; ··· 18874 18874 export type CreateBatchData = { 18875 18875 body: { 18876 18876 /** 18877 - * The time frame within which the batch should be processed. Currently only `24h` is supported. 18877 + * The ID of an uploaded file that contains requests for the new batch. 18878 + * 18879 + * See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file. 18880 + * 18881 + * Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. 18882 + * 18878 18883 */ 18879 - completion_window: '24h'; 18884 + input_file_id: string; 18880 18885 /** 18881 18886 * The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. 18882 18887 */ ··· 18886 18891 | '/v1/embeddings' 18887 18892 | '/v1/completions'; 18888 18893 /** 18889 - * The ID of an uploaded file that contains requests for the new batch. 18890 - * 18891 - * See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file. 18892 - * 18893 - * Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. 18894 - * 18894 + * The time frame within which the batch should be processed. Currently only `24h` is supported. 18895 18895 */ 18896 - input_file_id: string; 18896 + completion_window: '24h'; 18897 18897 metadata?: Metadata; 18898 18898 output_expires_after?: BatchFileExpirationAfter; 18899 18899 }; ··· 18961 18961 path?: never; 18962 18962 query?: { 18963 18963 /** 18964 - * Identifier for the last chat completion from the previous pagination request. 18965 - */ 18966 - after?: string; 18967 - /** 18968 - * Number of Chat Completions to retrieve. 18964 + * The model used to generate the Chat Completions. 18969 18965 */ 18970 - limit?: number; 18966 + model?: string; 18971 18967 /** 18972 18968 * A list of metadata keys to filter the Chat Completions by. Example: 18973 18969 * ··· 18976 18972 */ 18977 18973 metadata?: Metadata; 18978 18974 /** 18979 - * The model used to generate the Chat Completions. 18975 + * Identifier for the last chat completion from the previous pagination request. 18976 + */ 18977 + after?: string; 18978 + /** 18979 + * Number of Chat Completions to retrieve. 18980 18980 */ 18981 - model?: string; 18981 + limit?: number; 18982 18982 /** 18983 18983 * Sort order for Chat Completions by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`. 18984 18984 */ ··· 19139 19139 path?: never; 19140 19140 query?: { 19141 19141 /** 19142 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 19143 - * 19144 - */ 19145 - after?: string; 19146 - /** 19147 19142 * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 19148 19143 * 19149 19144 */ ··· 19153 19148 * 19154 19149 */ 19155 19150 order?: 'asc' | 'desc'; 19151 + /** 19152 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 19153 + * 19154 + */ 19155 + after?: string; 19156 19156 }; 19157 19157 url: '/containers'; 19158 19158 }; ··· 19229 19229 }; 19230 19230 query?: { 19231 19231 /** 19232 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 19233 - * 19234 - */ 19235 - after?: string; 19236 - /** 19237 19232 * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 19238 19233 * 19239 19234 */ ··· 19243 19238 * 19244 19239 */ 19245 19240 order?: 'asc' | 'desc'; 19241 + /** 19242 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 19243 + * 19244 + */ 19245 + after?: string; 19246 19246 }; 19247 19247 url: '/containers/{container_id}/files'; 19248 19248 }; ··· 19424 19424 * Successfully deleted the evaluation. 19425 19425 */ 19426 19426 200: { 19427 + object: string; 19427 19428 deleted: boolean; 19428 19429 eval_id: string; 19429 - object: string; 19430 19430 }; 19431 19431 }; 19432 19432 ··· 19458 19458 * Request to update an evaluation 19459 19459 */ 19460 19460 body: { 19461 - metadata?: Metadata; 19462 19461 /** 19463 19462 * Rename the evaluation. 19464 19463 */ 19465 19464 name?: string; 19465 + metadata?: Metadata; 19466 19466 }; 19467 19467 path: { 19468 19468 /** ··· 19583 19583 * Successfully deleted the eval run 19584 19584 */ 19585 19585 200: { 19586 - deleted?: boolean; 19587 19586 object?: string; 19587 + deleted?: boolean; 19588 19588 run_id?: string; 19589 19589 }; 19590 19590 }; ··· 19664 19664 * Number of output items to retrieve. 19665 19665 */ 19666 19666 limit?: number; 19667 - /** 19668 - * Sort order for output items by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`. 19669 - */ 19670 - order?: 'asc' | 'desc'; 19671 19667 /** 19672 19668 * Filter output items by status. Use `failed` to filter by failed output 19673 19669 * items or `pass` to filter by passed output items. 19674 19670 * 19675 19671 */ 19676 19672 status?: 'fail' | 'pass'; 19673 + /** 19674 + * Sort order for output items by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`. 19675 + */ 19676 + order?: 'asc' | 'desc'; 19677 19677 }; 19678 19678 url: '/evals/{eval_id}/runs/{run_id}/output_items'; 19679 19679 }; ··· 19696 19696 */ 19697 19697 eval_id: string; 19698 19698 /** 19699 - * The ID of the output item to retrieve. 19700 - */ 19701 - output_item_id: string; 19702 - /** 19703 19699 * The ID of the run to retrieve. 19704 19700 */ 19705 19701 run_id: string; 19702 + /** 19703 + * The ID of the output item to retrieve. 19704 + */ 19705 + output_item_id: string; 19706 19706 }; 19707 19707 query?: never; 19708 19708 url: '/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}'; ··· 19723 19723 path?: never; 19724 19724 query?: { 19725 19725 /** 19726 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 19727 - * 19726 + * Only return files with the given purpose. 19728 19727 */ 19729 - after?: string; 19728 + purpose?: string; 19730 19729 /** 19731 19730 * A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000. 19732 19731 * ··· 19738 19737 */ 19739 19738 order?: 'asc' | 'desc'; 19740 19739 /** 19741 - * Only return files with the given purpose. 19740 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 19741 + * 19742 19742 */ 19743 - purpose?: string; 19743 + after?: string; 19744 19744 }; 19745 19745 url: '/files'; 19746 19746 }; ··· 19880 19880 }; 19881 19881 query?: { 19882 19882 /** 19883 + * The ID of the project to get permissions for. 19884 + */ 19885 + project_id?: string; 19886 + /** 19883 19887 * Identifier for the last permission ID from the previous pagination request. 19884 19888 */ 19885 19889 after?: string; ··· 19891 19895 * The order in which to retrieve permissions. 19892 19896 */ 19893 19897 order?: 'ascending' | 'descending'; 19894 - /** 19895 - * The ID of the project to get permissions for. 19896 - */ 19897 - project_id?: string; 19898 19898 }; 19899 19899 url: '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions'; 19900 19900 }; ··· 20304 20304 */ 20305 20305 after?: string; 20306 20306 /** 20307 - * Maximum number of keys to return. 20308 - */ 20309 - limit?: number; 20310 - /** 20311 20307 * Order results by creation time, ascending or descending. 20312 20308 */ 20313 20309 order?: 'asc' | 'desc'; 20310 + /** 20311 + * Maximum number of keys to return. 20312 + */ 20313 + limit?: number; 20314 20314 }; 20315 20315 url: '/organization/admin_api_keys'; 20316 20316 }; ··· 20361 20361 * Confirmation that the API key was deleted. 20362 20362 */ 20363 20363 200: { 20364 - deleted?: boolean; 20365 20364 id?: string; 20366 20365 object?: string; 20366 + deleted?: boolean; 20367 20367 }; 20368 20368 }; 20369 20369 ··· 20397 20397 path?: never; 20398 20398 query?: { 20399 20399 /** 20400 - * Return only events performed by users with these emails. 20401 - */ 20402 - 'actor_emails[]'?: Array<string>; 20403 - /** 20404 - * Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID. 20405 - */ 20406 - 'actor_ids[]'?: Array<string>; 20407 - /** 20408 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20409 - * 20410 - */ 20411 - after?: string; 20412 - /** 20413 - * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 20414 - * 20415 - */ 20416 - before?: string; 20417 - /** 20418 20400 * Return only events whose `effective_at` (Unix seconds) is in this range. 20419 20401 */ 20420 20402 effective_at?: { ··· 20436 20418 lte?: number; 20437 20419 }; 20438 20420 /** 20421 + * Return only events for these projects. 20422 + */ 20423 + 'project_ids[]'?: Array<string>; 20424 + /** 20439 20425 * Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). 20440 20426 */ 20441 20427 'event_types[]'?: Array<AuditLogEventType>; 20442 20428 /** 20429 + * Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID. 20430 + */ 20431 + 'actor_ids[]'?: Array<string>; 20432 + /** 20433 + * Return only events performed by users with these emails. 20434 + */ 20435 + 'actor_emails[]'?: Array<string>; 20436 + /** 20437 + * Return only events performed on these targets. For example, a project ID updated. 20438 + */ 20439 + 'resource_ids[]'?: Array<string>; 20440 + /** 20443 20441 * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20444 20442 * 20445 20443 */ 20446 20444 limit?: number; 20447 20445 /** 20448 - * Return only events for these projects. 20446 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20447 + * 20449 20448 */ 20450 - 'project_ids[]'?: Array<string>; 20449 + after?: string; 20451 20450 /** 20452 - * Return only events performed on these targets. For example, a project ID updated. 20451 + * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 20452 + * 20453 20453 */ 20454 - 'resource_ids[]'?: Array<string>; 20454 + before?: string; 20455 20455 }; 20456 20456 url: '/organization/audit_logs'; 20457 20457 }; ··· 20471 20471 path?: never; 20472 20472 query?: { 20473 20473 /** 20474 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20474 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20475 20475 * 20476 20476 */ 20477 - after?: string; 20477 + limit?: number; 20478 20478 /** 20479 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20479 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20480 20480 * 20481 20481 */ 20482 - limit?: number; 20482 + after?: string; 20483 20483 /** 20484 20484 * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 20485 20485 * ··· 20628 20628 path?: never; 20629 20629 query: { 20630 20630 /** 20631 + * Start time (Unix seconds) of the query time range, inclusive. 20632 + */ 20633 + start_time: number; 20634 + /** 20635 + * End time (Unix seconds) of the query time range, exclusive. 20636 + */ 20637 + end_time?: number; 20638 + /** 20631 20639 * Width of each time bucket in response. Currently only `1d` is supported, default to `1d`. 20632 20640 */ 20633 20641 bucket_width?: '1d'; 20634 20642 /** 20635 - * End time (Unix seconds) of the query time range, exclusive. 20643 + * Return only costs for these projects. 20636 20644 */ 20637 - end_time?: number; 20645 + project_ids?: Array<string>; 20638 20646 /** 20639 20647 * Group the costs by the specified fields. Support fields include `project_id`, `line_item` and any combination of them. 20640 20648 */ ··· 20648 20656 * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 20649 20657 */ 20650 20658 page?: string; 20651 - /** 20652 - * Return only costs for these projects. 20653 - */ 20654 - project_ids?: Array<string>; 20655 - /** 20656 - * Start time (Unix seconds) of the query time range, inclusive. 20657 - */ 20658 - start_time: number; 20659 20659 }; 20660 20660 url: '/organization/costs'; 20661 20661 }; ··· 20674 20674 path?: never; 20675 20675 query?: { 20676 20676 /** 20677 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20677 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20678 20678 * 20679 20679 */ 20680 - after?: string; 20680 + limit?: number; 20681 20681 /** 20682 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20682 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20683 20683 * 20684 20684 */ 20685 - limit?: number; 20685 + after?: string; 20686 20686 }; 20687 20687 url: '/organization/invites'; 20688 20688 }; ··· 20765 20765 path?: never; 20766 20766 query?: { 20767 20767 /** 20768 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20769 + * 20770 + */ 20771 + limit?: number; 20772 + /** 20768 20773 * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20769 20774 * 20770 20775 */ ··· 20773 20778 * If `true` returns all projects including those that have been `archived`. Archived projects are not included by default. 20774 20779 */ 20775 20780 include_archived?: boolean; 20776 - /** 20777 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20778 - * 20779 - */ 20780 - limit?: number; 20781 20781 }; 20782 20782 url: '/organization/projects'; 20783 20783 }; ··· 20878 20878 }; 20879 20879 query?: { 20880 20880 /** 20881 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20881 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20882 20882 * 20883 20883 */ 20884 - after?: string; 20884 + limit?: number; 20885 20885 /** 20886 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20886 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20887 20887 * 20888 20888 */ 20889 - limit?: number; 20889 + after?: string; 20890 20890 }; 20891 20891 url: '/organization/projects/{project_id}/api_keys'; 20892 20892 }; ··· 20905 20905 body?: never; 20906 20906 path: { 20907 20907 /** 20908 + * The ID of the project. 20909 + */ 20910 + project_id: string; 20911 + /** 20908 20912 * The ID of the API key. 20909 20913 */ 20910 20914 key_id: string; 20911 - /** 20912 - * The ID of the project. 20913 - */ 20914 - project_id: string; 20915 20915 }; 20916 20916 query?: never; 20917 20917 url: '/organization/projects/{project_id}/api_keys/{key_id}'; ··· 20941 20941 body?: never; 20942 20942 path: { 20943 20943 /** 20944 - * The ID of the API key. 20945 - */ 20946 - key_id: string; 20947 - /** 20948 20944 * The ID of the project. 20949 20945 */ 20950 20946 project_id: string; 20947 + /** 20948 + * The ID of the API key. 20949 + */ 20950 + key_id: string; 20951 20951 }; 20952 20952 query?: never; 20953 20953 url: '/organization/projects/{project_id}/api_keys/{key_id}'; ··· 20995 20995 }; 20996 20996 query?: { 20997 20997 /** 20998 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 20998 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 20999 20999 * 21000 21000 */ 21001 - after?: string; 21001 + limit?: number; 21002 21002 /** 21003 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 21003 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 21004 21004 * 21005 21005 */ 21006 - limit?: number; 21006 + after?: string; 21007 21007 /** 21008 21008 * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 21009 21009 * ··· 21083 21083 }; 21084 21084 query?: { 21085 21085 /** 21086 + * A limit on the number of objects to be returned. The default is 100. 21087 + * 21088 + */ 21089 + limit?: number; 21090 + /** 21086 21091 * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 21087 21092 * 21088 21093 */ ··· 21092 21097 * 21093 21098 */ 21094 21099 before?: string; 21095 - /** 21096 - * A limit on the number of objects to be returned. The default is 100. 21097 - * 21098 - */ 21099 - limit?: number; 21100 21100 }; 21101 21101 url: '/organization/projects/{project_id}/rate_limits'; 21102 21102 }; ··· 21160 21160 }; 21161 21161 query?: { 21162 21162 /** 21163 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 21163 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 21164 21164 * 21165 21165 */ 21166 - after?: string; 21166 + limit?: number; 21167 21167 /** 21168 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 21168 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 21169 21169 * 21170 21170 */ 21171 - limit?: number; 21171 + after?: string; 21172 21172 }; 21173 21173 url: '/organization/projects/{project_id}/service_accounts'; 21174 21174 }; ··· 21290 21290 }; 21291 21291 query?: { 21292 21292 /** 21293 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 21293 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 21294 21294 * 21295 21295 */ 21296 - after?: string; 21296 + limit?: number; 21297 21297 /** 21298 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 21298 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 21299 21299 * 21300 21300 */ 21301 - limit?: number; 21301 + after?: string; 21302 21302 }; 21303 21303 url: '/organization/projects/{project_id}/users'; 21304 21304 }; ··· 21464 21464 path?: never; 21465 21465 query: { 21466 21466 /** 21467 - * Return only usage for these API keys. 21467 + * Start time (Unix seconds) of the query time range, inclusive. 21468 21468 */ 21469 - api_key_ids?: Array<string>; 21469 + start_time: number; 21470 + /** 21471 + * End time (Unix seconds) of the query time range, exclusive. 21472 + */ 21473 + end_time?: number; 21470 21474 /** 21471 21475 * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`. 21472 21476 */ 21473 21477 bucket_width?: '1m' | '1h' | '1d'; 21474 21478 /** 21475 - * End time (Unix seconds) of the query time range, exclusive. 21479 + * Return only usage for these projects. 21476 21480 */ 21477 - end_time?: number; 21481 + project_ids?: Array<string>; 21482 + /** 21483 + * Return only usage for these users. 21484 + */ 21485 + user_ids?: Array<string>; 21486 + /** 21487 + * Return only usage for these API keys. 21488 + */ 21489 + api_key_ids?: Array<string>; 21490 + /** 21491 + * Return only usage for these models. 21492 + */ 21493 + models?: Array<string>; 21478 21494 /** 21479 21495 * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. 21480 21496 */ ··· 21487 21503 * 21488 21504 */ 21489 21505 limit?: number; 21490 - /** 21491 - * Return only usage for these models. 21492 - */ 21493 - models?: Array<string>; 21494 21506 /** 21495 21507 * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21496 21508 */ 21497 21509 page?: string; 21498 - /** 21499 - * Return only usage for these projects. 21500 - */ 21501 - project_ids?: Array<string>; 21502 - /** 21503 - * Start time (Unix seconds) of the query time range, inclusive. 21504 - */ 21505 - start_time: number; 21506 - /** 21507 - * Return only usage for these users. 21508 - */ 21509 - user_ids?: Array<string>; 21510 21510 }; 21511 21511 url: '/organization/usage/audio_speeches'; 21512 21512 }; ··· 21526 21526 path?: never; 21527 21527 query: { 21528 21528 /** 21529 - * Return only usage for these API keys. 21529 + * Start time (Unix seconds) of the query time range, inclusive. 21530 + */ 21531 + start_time: number; 21532 + /** 21533 + * End time (Unix seconds) of the query time range, exclusive. 21530 21534 */ 21531 - api_key_ids?: Array<string>; 21535 + end_time?: number; 21532 21536 /** 21533 21537 * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`. 21534 21538 */ 21535 21539 bucket_width?: '1m' | '1h' | '1d'; 21536 21540 /** 21537 - * End time (Unix seconds) of the query time range, exclusive. 21541 + * Return only usage for these projects. 21538 21542 */ 21539 - end_time?: number; 21543 + project_ids?: Array<string>; 21544 + /** 21545 + * Return only usage for these users. 21546 + */ 21547 + user_ids?: Array<string>; 21548 + /** 21549 + * Return only usage for these API keys. 21550 + */ 21551 + api_key_ids?: Array<string>; 21552 + /** 21553 + * Return only usage for these models. 21554 + */ 21555 + models?: Array<string>; 21540 21556 /** 21541 21557 * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. 21542 21558 */ ··· 21550 21566 */ 21551 21567 limit?: number; 21552 21568 /** 21553 - * Return only usage for these models. 21554 - */ 21555 - models?: Array<string>; 21556 - /** 21557 21569 * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21558 21570 */ 21559 21571 page?: string; 21560 - /** 21561 - * Return only usage for these projects. 21562 - */ 21563 - project_ids?: Array<string>; 21564 - /** 21565 - * Start time (Unix seconds) of the query time range, inclusive. 21566 - */ 21567 - start_time: number; 21568 - /** 21569 - * Return only usage for these users. 21570 - */ 21571 - user_ids?: Array<string>; 21572 21572 }; 21573 21573 url: '/organization/usage/audio_transcriptions'; 21574 21574 }; ··· 21588 21588 path?: never; 21589 21589 query: { 21590 21590 /** 21591 + * Start time (Unix seconds) of the query time range, inclusive. 21592 + */ 21593 + start_time: number; 21594 + /** 21595 + * End time (Unix seconds) of the query time range, exclusive. 21596 + */ 21597 + end_time?: number; 21598 + /** 21591 21599 * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`. 21592 21600 */ 21593 21601 bucket_width?: '1m' | '1h' | '1d'; 21594 21602 /** 21595 - * End time (Unix seconds) of the query time range, exclusive. 21603 + * Return only usage for these projects. 21596 21604 */ 21597 - end_time?: number; 21605 + project_ids?: Array<string>; 21598 21606 /** 21599 21607 * Group the usage data by the specified fields. Support fields include `project_id`. 21600 21608 */ ··· 21611 21619 * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21612 21620 */ 21613 21621 page?: string; 21614 - /** 21615 - * Return only usage for these projects. 21616 - */ 21617 - project_ids?: Array<string>; 21618 - /** 21619 - * Start time (Unix seconds) of the query time range, inclusive. 21620 - */ 21621 - start_time: number; 21622 21622 }; 21623 21623 url: '/organization/usage/code_interpreter_sessions'; 21624 21624 }; ··· 21638 21638 path?: never; 21639 21639 query: { 21640 21640 /** 21641 - * Return only usage for these API keys. 21641 + * Start time (Unix seconds) of the query time range, inclusive. 21642 21642 */ 21643 - api_key_ids?: Array<string>; 21643 + start_time: number; 21644 21644 /** 21645 - * If `true`, return batch jobs only. If `false`, return non-batch jobs only. By default, return both. 21646 - * 21645 + * End time (Unix seconds) of the query time range, exclusive. 21647 21646 */ 21648 - batch?: boolean; 21647 + end_time?: number; 21649 21648 /** 21650 21649 * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`. 21651 21650 */ 21652 21651 bucket_width?: '1m' | '1h' | '1d'; 21653 21652 /** 21654 - * End time (Unix seconds) of the query time range, exclusive. 21653 + * Return only usage for these projects. 21655 21654 */ 21656 - end_time?: number; 21655 + project_ids?: Array<string>; 21656 + /** 21657 + * Return only usage for these users. 21658 + */ 21659 + user_ids?: Array<string>; 21660 + /** 21661 + * Return only usage for these API keys. 21662 + */ 21663 + api_key_ids?: Array<string>; 21664 + /** 21665 + * Return only usage for these models. 21666 + */ 21667 + models?: Array<string>; 21668 + /** 21669 + * If `true`, return batch jobs only. If `false`, return non-batch jobs only. By default, return both. 21670 + * 21671 + */ 21672 + batch?: boolean; 21657 21673 /** 21658 21674 * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `batch` or any combination of them. 21659 21675 */ ··· 21669 21685 */ 21670 21686 limit?: number; 21671 21687 /** 21672 - * Return only usage for these models. 21673 - */ 21674 - models?: Array<string>; 21675 - /** 21676 21688 * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21677 21689 */ 21678 21690 page?: string; 21679 - /** 21680 - * Return only usage for these projects. 21681 - */ 21682 - project_ids?: Array<string>; 21683 - /** 21684 - * Start time (Unix seconds) of the query time range, inclusive. 21685 - */ 21686 - start_time: number; 21687 - /** 21688 - * Return only usage for these users. 21689 - */ 21690 - user_ids?: Array<string>; 21691 21691 }; 21692 21692 url: '/organization/usage/completions'; 21693 21693 }; ··· 21707 21707 path?: never; 21708 21708 query: { 21709 21709 /** 21710 - * Return only usage for these API keys. 21710 + * Start time (Unix seconds) of the query time range, inclusive. 21711 + */ 21712 + start_time: number; 21713 + /** 21714 + * End time (Unix seconds) of the query time range, exclusive. 21711 21715 */ 21712 - api_key_ids?: Array<string>; 21716 + end_time?: number; 21713 21717 /** 21714 21718 * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`. 21715 21719 */ 21716 21720 bucket_width?: '1m' | '1h' | '1d'; 21717 21721 /** 21718 - * End time (Unix seconds) of the query time range, exclusive. 21722 + * Return only usage for these projects. 21723 + */ 21724 + project_ids?: Array<string>; 21725 + /** 21726 + * Return only usage for these users. 21727 + */ 21728 + user_ids?: Array<string>; 21729 + /** 21730 + * Return only usage for these API keys. 21731 + */ 21732 + api_key_ids?: Array<string>; 21733 + /** 21734 + * Return only usage for these models. 21719 21735 */ 21720 - end_time?: number; 21736 + models?: Array<string>; 21721 21737 /** 21722 21738 * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. 21723 21739 */ ··· 21731 21747 */ 21732 21748 limit?: number; 21733 21749 /** 21734 - * Return only usage for these models. 21735 - */ 21736 - models?: Array<string>; 21737 - /** 21738 21750 * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21739 21751 */ 21740 21752 page?: string; 21741 - /** 21742 - * Return only usage for these projects. 21743 - */ 21744 - project_ids?: Array<string>; 21745 - /** 21746 - * Start time (Unix seconds) of the query time range, inclusive. 21747 - */ 21748 - start_time: number; 21749 - /** 21750 - * Return only usage for these users. 21751 - */ 21752 - user_ids?: Array<string>; 21753 21753 }; 21754 21754 url: '/organization/usage/embeddings'; 21755 21755 }; ··· 21769 21769 path?: never; 21770 21770 query: { 21771 21771 /** 21772 - * Return only usage for these API keys. 21772 + * Start time (Unix seconds) of the query time range, inclusive. 21773 + */ 21774 + start_time: number; 21775 + /** 21776 + * End time (Unix seconds) of the query time range, exclusive. 21773 21777 */ 21774 - api_key_ids?: Array<string>; 21778 + end_time?: number; 21775 21779 /** 21776 21780 * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`. 21777 21781 */ 21778 21782 bucket_width?: '1m' | '1h' | '1d'; 21779 21783 /** 21780 - * End time (Unix seconds) of the query time range, exclusive. 21784 + * Return only usages for these sources. Possible values are `image.generation`, `image.edit`, `image.variation` or any combination of them. 21781 21785 */ 21782 - end_time?: number; 21786 + sources?: Array<'image.generation' | 'image.edit' | 'image.variation'>; 21783 21787 /** 21784 - * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any combination of them. 21788 + * Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them. 21785 21789 */ 21786 - group_by?: Array< 21787 - 'project_id' | 'user_id' | 'api_key_id' | 'model' | 'size' | 'source' 21790 + sizes?: Array< 21791 + '256x256' | '512x512' | '1024x1024' | '1792x1792' | '1024x1792' 21788 21792 >; 21789 21793 /** 21790 - * Specifies the number of buckets to return. 21791 - * - `bucket_width=1d`: default: 7, max: 31 21792 - * - `bucket_width=1h`: default: 24, max: 168 21793 - * - `bucket_width=1m`: default: 60, max: 1440 21794 - * 21794 + * Return only usage for these projects. 21795 21795 */ 21796 - limit?: number; 21796 + project_ids?: Array<string>; 21797 21797 /** 21798 - * Return only usage for these models. 21798 + * Return only usage for these users. 21799 21799 */ 21800 - models?: Array<string>; 21800 + user_ids?: Array<string>; 21801 21801 /** 21802 - * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21802 + * Return only usage for these API keys. 21803 21803 */ 21804 - page?: string; 21804 + api_key_ids?: Array<string>; 21805 21805 /** 21806 - * Return only usage for these projects. 21806 + * Return only usage for these models. 21807 21807 */ 21808 - project_ids?: Array<string>; 21808 + models?: Array<string>; 21809 21809 /** 21810 - * Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them. 21810 + * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any combination of them. 21811 21811 */ 21812 - sizes?: Array< 21813 - '256x256' | '512x512' | '1024x1024' | '1792x1792' | '1024x1792' 21812 + group_by?: Array< 21813 + 'project_id' | 'user_id' | 'api_key_id' | 'model' | 'size' | 'source' 21814 21814 >; 21815 21815 /** 21816 - * Return only usages for these sources. Possible values are `image.generation`, `image.edit`, `image.variation` or any combination of them. 21817 - */ 21818 - sources?: Array<'image.generation' | 'image.edit' | 'image.variation'>; 21819 - /** 21820 - * Start time (Unix seconds) of the query time range, inclusive. 21816 + * Specifies the number of buckets to return. 21817 + * - `bucket_width=1d`: default: 7, max: 31 21818 + * - `bucket_width=1h`: default: 24, max: 168 21819 + * - `bucket_width=1m`: default: 60, max: 1440 21820 + * 21821 21821 */ 21822 - start_time: number; 21822 + limit?: number; 21823 21823 /** 21824 - * Return only usage for these users. 21824 + * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21825 21825 */ 21826 - user_ids?: Array<string>; 21826 + page?: string; 21827 21827 }; 21828 21828 url: '/organization/usage/images'; 21829 21829 }; ··· 21843 21843 path?: never; 21844 21844 query: { 21845 21845 /** 21846 - * Return only usage for these API keys. 21846 + * Start time (Unix seconds) of the query time range, inclusive. 21847 + */ 21848 + start_time: number; 21849 + /** 21850 + * End time (Unix seconds) of the query time range, exclusive. 21847 21851 */ 21848 - api_key_ids?: Array<string>; 21852 + end_time?: number; 21849 21853 /** 21850 21854 * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`. 21851 21855 */ 21852 21856 bucket_width?: '1m' | '1h' | '1d'; 21853 21857 /** 21854 - * End time (Unix seconds) of the query time range, exclusive. 21858 + * Return only usage for these projects. 21855 21859 */ 21856 - end_time?: number; 21860 + project_ids?: Array<string>; 21861 + /** 21862 + * Return only usage for these users. 21863 + */ 21864 + user_ids?: Array<string>; 21865 + /** 21866 + * Return only usage for these API keys. 21867 + */ 21868 + api_key_ids?: Array<string>; 21869 + /** 21870 + * Return only usage for these models. 21871 + */ 21872 + models?: Array<string>; 21857 21873 /** 21858 21874 * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. 21859 21875 */ ··· 21867 21883 */ 21868 21884 limit?: number; 21869 21885 /** 21870 - * Return only usage for these models. 21871 - */ 21872 - models?: Array<string>; 21873 - /** 21874 21886 * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21875 21887 */ 21876 21888 page?: string; 21877 - /** 21878 - * Return only usage for these projects. 21879 - */ 21880 - project_ids?: Array<string>; 21881 - /** 21882 - * Start time (Unix seconds) of the query time range, inclusive. 21883 - */ 21884 - start_time: number; 21885 - /** 21886 - * Return only usage for these users. 21887 - */ 21888 - user_ids?: Array<string>; 21889 21889 }; 21890 21890 url: '/organization/usage/moderations'; 21891 21891 }; ··· 21905 21905 path?: never; 21906 21906 query: { 21907 21907 /** 21908 + * Start time (Unix seconds) of the query time range, inclusive. 21909 + */ 21910 + start_time: number; 21911 + /** 21912 + * End time (Unix seconds) of the query time range, exclusive. 21913 + */ 21914 + end_time?: number; 21915 + /** 21908 21916 * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`. 21909 21917 */ 21910 21918 bucket_width?: '1m' | '1h' | '1d'; 21911 21919 /** 21912 - * End time (Unix seconds) of the query time range, exclusive. 21920 + * Return only usage for these projects. 21913 21921 */ 21914 - end_time?: number; 21922 + project_ids?: Array<string>; 21915 21923 /** 21916 21924 * Group the usage data by the specified fields. Support fields include `project_id`. 21917 21925 */ ··· 21928 21936 * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. 21929 21937 */ 21930 21938 page?: string; 21931 - /** 21932 - * Return only usage for these projects. 21933 - */ 21934 - project_ids?: Array<string>; 21935 - /** 21936 - * Start time (Unix seconds) of the query time range, inclusive. 21937 - */ 21938 - start_time: number; 21939 21939 }; 21940 21940 url: '/organization/usage/vector_stores'; 21941 21941 }; ··· 21955 21955 path?: never; 21956 21956 query?: { 21957 21957 /** 21958 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 21959 + * 21960 + */ 21961 + limit?: number; 21962 + /** 21958 21963 * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 21959 21964 * 21960 21965 */ ··· 21963 21968 * Filter by the email address of users. 21964 21969 */ 21965 21970 emails?: Array<string>; 21966 - /** 21967 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 21968 - * 21969 - */ 21970 - limit?: number; 21971 21971 }; 21972 21972 url: '/organization/users'; 21973 21973 }; ··· 22150 22150 */ 22151 22151 include?: Array<Includable>; 22152 22152 /** 22153 + * If set to true, the model response data will be streamed to the client 22154 + * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). 22155 + * See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) 22156 + * for more information. 22157 + * 22158 + */ 22159 + stream?: boolean; 22160 + /** 22161 + * The sequence number of the event after which to start streaming. 22162 + * 22163 + */ 22164 + starting_after?: number; 22165 + /** 22153 22166 * When true, stream obfuscation will be enabled. Stream obfuscation adds 22154 22167 * random characters to an `obfuscation` field on streaming delta events 22155 22168 * to normalize payload sizes as a mitigation to certain side-channel ··· 22160 22173 * 22161 22174 */ 22162 22175 include_obfuscation?: boolean; 22163 - /** 22164 - * The sequence number of the event after which to start streaming. 22165 - * 22166 - */ 22167 - starting_after?: number; 22168 - /** 22169 - * If set to true, the model response data will be streamed to the client 22170 - * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). 22171 - * See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) 22172 - * for more information. 22173 - * 22174 - */ 22175 - stream?: boolean; 22176 22176 }; 22177 22177 url: '/responses/{response_id}'; 22178 22178 }; ··· 22229 22229 }; 22230 22230 query?: { 22231 22231 /** 22232 + * A limit on the number of objects to be returned. Limit can range between 22233 + * 1 and 100, and the default is 20. 22234 + * 22235 + */ 22236 + limit?: number; 22237 + /** 22238 + * The order to return the input items in. Default is `desc`. 22239 + * - `asc`: Return the input items in ascending order. 22240 + * - `desc`: Return the input items in descending order. 22241 + * 22242 + */ 22243 + order?: 'asc' | 'desc'; 22244 + /** 22232 22245 * An item ID to list items after, used in pagination. 22233 22246 * 22234 22247 */ ··· 22244 22257 * 22245 22258 */ 22246 22259 include?: Array<Includable>; 22247 - /** 22248 - * A limit on the number of objects to be returned. Limit can range between 22249 - * 1 and 100, and the default is 20. 22250 - * 22251 - */ 22252 - limit?: number; 22253 - /** 22254 - * The order to return the input items in. Default is `desc`. 22255 - * - `asc`: Return the input items in ascending order. 22256 - * - `desc`: Return the input items in descending order. 22257 - * 22258 - */ 22259 - order?: 'asc' | 'desc'; 22260 22260 }; 22261 22261 url: '/responses/{response_id}/input_items'; 22262 22262 }; ··· 22380 22380 }; 22381 22381 query?: { 22382 22382 /** 22383 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 22383 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 22384 22384 * 22385 22385 */ 22386 - after?: string; 22386 + limit?: number; 22387 22387 /** 22388 - * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 22388 + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 22389 22389 * 22390 22390 */ 22391 - before?: string; 22391 + order?: 'asc' | 'desc'; 22392 22392 /** 22393 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 22393 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 22394 22394 * 22395 22395 */ 22396 - limit?: number; 22396 + after?: string; 22397 22397 /** 22398 - * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 22398 + * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 22399 22399 * 22400 22400 */ 22401 - order?: 'asc' | 'desc'; 22401 + before?: string; 22402 22402 /** 22403 22403 * Filter messages by the run ID that generated them. 22404 22404 * ··· 22444 22444 body?: never; 22445 22445 path: { 22446 22446 /** 22447 - * The ID of the message to delete. 22448 - */ 22449 - message_id: string; 22450 - /** 22451 22447 * The ID of the thread to which this message belongs. 22452 22448 */ 22453 22449 thread_id: string; 22450 + /** 22451 + * The ID of the message to delete. 22452 + */ 22453 + message_id: string; 22454 22454 }; 22455 22455 query?: never; 22456 22456 url: '/threads/{thread_id}/messages/{message_id}'; ··· 22470 22470 body?: never; 22471 22471 path: { 22472 22472 /** 22473 - * The ID of the message to retrieve. 22473 + * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this message belongs. 22474 22474 */ 22475 - message_id: string; 22475 + thread_id: string; 22476 22476 /** 22477 - * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this message belongs. 22477 + * The ID of the message to retrieve. 22478 22478 */ 22479 - thread_id: string; 22479 + message_id: string; 22480 22480 }; 22481 22481 query?: never; 22482 22482 url: '/threads/{thread_id}/messages/{message_id}'; ··· 22495 22495 body: ModifyMessageRequest; 22496 22496 path: { 22497 22497 /** 22498 + * The ID of the thread to which this message belongs. 22499 + */ 22500 + thread_id: string; 22501 + /** 22498 22502 * The ID of the message to modify. 22499 22503 */ 22500 22504 message_id: string; 22501 - /** 22502 - * The ID of the thread to which this message belongs. 22503 - */ 22504 - thread_id: string; 22505 22505 }; 22506 22506 query?: never; 22507 22507 url: '/threads/{thread_id}/messages/{message_id}'; ··· 22527 22527 }; 22528 22528 query?: { 22529 22529 /** 22530 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 22530 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 22531 22531 * 22532 22532 */ 22533 - after?: string; 22533 + limit?: number; 22534 22534 /** 22535 - * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 22535 + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 22536 22536 * 22537 22537 */ 22538 - before?: string; 22538 + order?: 'asc' | 'desc'; 22539 22539 /** 22540 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 22540 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 22541 22541 * 22542 22542 */ 22543 - limit?: number; 22543 + after?: string; 22544 22544 /** 22545 - * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 22545 + * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 22546 22546 * 22547 22547 */ 22548 - order?: 'asc' | 'desc'; 22548 + before?: string; 22549 22549 }; 22550 22550 url: '/threads/{thread_id}/runs'; 22551 22551 }; ··· 22592 22592 body?: never; 22593 22593 path: { 22594 22594 /** 22595 - * The ID of the run to retrieve. 22596 - */ 22597 - run_id: string; 22598 - /** 22599 22595 * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. 22600 22596 */ 22601 22597 thread_id: string; 22598 + /** 22599 + * The ID of the run to retrieve. 22600 + */ 22601 + run_id: string; 22602 22602 }; 22603 22603 query?: never; 22604 22604 url: '/threads/{thread_id}/runs/{run_id}'; ··· 22617 22617 body: ModifyRunRequest; 22618 22618 path: { 22619 22619 /** 22620 - * The ID of the run to modify. 22621 - */ 22622 - run_id: string; 22623 - /** 22624 22620 * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. 22625 22621 */ 22626 22622 thread_id: string; 22623 + /** 22624 + * The ID of the run to modify. 22625 + */ 22626 + run_id: string; 22627 22627 }; 22628 22628 query?: never; 22629 22629 url: '/threads/{thread_id}/runs/{run_id}'; ··· 22642 22642 body?: never; 22643 22643 path: { 22644 22644 /** 22645 - * The ID of the run to cancel. 22646 - */ 22647 - run_id: string; 22648 - /** 22649 22645 * The ID of the thread to which this run belongs. 22650 22646 */ 22651 22647 thread_id: string; 22648 + /** 22649 + * The ID of the run to cancel. 22650 + */ 22651 + run_id: string; 22652 22652 }; 22653 22653 query?: never; 22654 22654 url: '/threads/{thread_id}/runs/{run_id}/cancel'; ··· 22667 22667 body?: never; 22668 22668 path: { 22669 22669 /** 22670 + * The ID of the thread the run and run steps belong to. 22671 + */ 22672 + thread_id: string; 22673 + /** 22670 22674 * The ID of the run the run steps belong to. 22671 22675 */ 22672 22676 run_id: string; 22677 + }; 22678 + query?: { 22673 22679 /** 22674 - * The ID of the thread the run and run steps belong to. 22680 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 22681 + * 22682 + */ 22683 + limit?: number; 22684 + /** 22685 + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 22686 + * 22675 22687 */ 22676 - thread_id: string; 22677 - }; 22678 - query?: { 22688 + order?: 'asc' | 'desc'; 22679 22689 /** 22680 22690 * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 22681 22691 * ··· 22693 22703 * 22694 22704 */ 22695 22705 'include[]'?: Array<'step_details.tool_calls[*].file_search.results[*].content'>; 22696 - /** 22697 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 22698 - * 22699 - */ 22700 - limit?: number; 22701 - /** 22702 - * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 22703 - * 22704 - */ 22705 - order?: 'asc' | 'desc'; 22706 22706 }; 22707 22707 url: '/threads/{thread_id}/runs/{run_id}/steps'; 22708 22708 }; ··· 22721 22721 body?: never; 22722 22722 path: { 22723 22723 /** 22724 + * The ID of the thread to which the run and run step belongs. 22725 + */ 22726 + thread_id: string; 22727 + /** 22724 22728 * The ID of the run to which the run step belongs. 22725 22729 */ 22726 22730 run_id: string; ··· 22728 22732 * The ID of the run step to retrieve. 22729 22733 */ 22730 22734 step_id: string; 22731 - /** 22732 - * The ID of the thread to which the run and run step belongs. 22733 - */ 22734 - thread_id: string; 22735 22735 }; 22736 22736 query?: { 22737 22737 /** ··· 22758 22758 body: SubmitToolOutputsRunRequest; 22759 22759 path: { 22760 22760 /** 22761 - * The ID of the run that requires the tool output submission. 22762 - */ 22763 - run_id: string; 22764 - /** 22765 22761 * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this run belongs. 22766 22762 */ 22767 22763 thread_id: string; 22764 + /** 22765 + * The ID of the run that requires the tool output submission. 22766 + */ 22767 + run_id: string; 22768 22768 }; 22769 22769 query?: never; 22770 22770 url: '/threads/{thread_id}/runs/{run_id}/submit_tool_outputs'; ··· 22871 22871 path?: never; 22872 22872 query?: { 22873 22873 /** 22874 - * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 22874 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 22875 22875 * 22876 22876 */ 22877 - after?: string; 22877 + limit?: number; 22878 22878 /** 22879 - * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 22879 + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 22880 22880 * 22881 22881 */ 22882 - before?: string; 22882 + order?: 'asc' | 'desc'; 22883 22883 /** 22884 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 22884 + * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 22885 22885 * 22886 22886 */ 22887 - limit?: number; 22887 + after?: string; 22888 22888 /** 22889 - * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 22889 + * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. 22890 22890 * 22891 22891 */ 22892 - order?: 'asc' | 'desc'; 22892 + before?: string; 22893 22893 }; 22894 22894 url: '/vector_stores'; 22895 22895 }; ··· 23014 23014 body?: never; 23015 23015 path: { 23016 23016 /** 23017 - * The ID of the file batch being retrieved. 23018 - */ 23019 - batch_id: string; 23020 - /** 23021 23017 * The ID of the vector store that the file batch belongs to. 23022 23018 */ 23023 23019 vector_store_id: string; 23020 + /** 23021 + * The ID of the file batch being retrieved. 23022 + */ 23023 + batch_id: string; 23024 23024 }; 23025 23025 query?: never; 23026 23026 url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}'; ··· 23040 23040 body?: never; 23041 23041 path: { 23042 23042 /** 23043 - * The ID of the file batch to cancel. 23044 - */ 23045 - batch_id: string; 23046 - /** 23047 23043 * The ID of the vector store that the file batch belongs to. 23048 23044 */ 23049 23045 vector_store_id: string; 23046 + /** 23047 + * The ID of the file batch to cancel. 23048 + */ 23049 + batch_id: string; 23050 23050 }; 23051 23051 query?: never; 23052 23052 url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel'; ··· 23066 23066 body?: never; 23067 23067 path: { 23068 23068 /** 23069 + * The ID of the vector store that the files belong to. 23070 + */ 23071 + vector_store_id: string; 23072 + /** 23069 23073 * The ID of the file batch that the files belong to. 23070 23074 */ 23071 23075 batch_id: string; 23076 + }; 23077 + query?: { 23072 23078 /** 23073 - * The ID of the vector store that the files belong to. 23079 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 23080 + * 23081 + */ 23082 + limit?: number; 23083 + /** 23084 + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 23085 + * 23074 23086 */ 23075 - vector_store_id: string; 23076 - }; 23077 - query?: { 23087 + order?: 'asc' | 'desc'; 23078 23088 /** 23079 23089 * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 23080 23090 * ··· 23089 23099 * Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`. 23090 23100 */ 23091 23101 filter?: 'in_progress' | 'completed' | 'failed' | 'cancelled'; 23092 - /** 23093 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 23094 - * 23095 - */ 23096 - limit?: number; 23097 - /** 23098 - * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 23099 - * 23100 - */ 23101 - order?: 'asc' | 'desc'; 23102 23102 }; 23103 23103 url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}/files'; 23104 23104 }; ··· 23123 23123 }; 23124 23124 query?: { 23125 23125 /** 23126 + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 23127 + * 23128 + */ 23129 + limit?: number; 23130 + /** 23131 + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 23132 + * 23133 + */ 23134 + order?: 'asc' | 'desc'; 23135 + /** 23126 23136 * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. 23127 23137 * 23128 23138 */ ··· 23136 23146 * Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`. 23137 23147 */ 23138 23148 filter?: 'in_progress' | 'completed' | 'failed' | 'cancelled'; 23139 - /** 23140 - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. 23141 - * 23142 - */ 23143 - limit?: number; 23144 - /** 23145 - * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. 23146 - * 23147 - */ 23148 - order?: 'asc' | 'desc'; 23149 23149 }; 23150 23150 url: '/vector_stores/{vector_store_id}/files'; 23151 23151 }; ··· 23187 23187 body?: never; 23188 23188 path: { 23189 23189 /** 23190 - * The ID of the file to delete. 23191 - */ 23192 - file_id: string; 23193 - /** 23194 23190 * The ID of the vector store that the file belongs to. 23195 23191 */ 23196 23192 vector_store_id: string; 23193 + /** 23194 + * The ID of the file to delete. 23195 + */ 23196 + file_id: string; 23197 23197 }; 23198 23198 query?: never; 23199 23199 url: '/vector_stores/{vector_store_id}/files/{file_id}'; ··· 23212 23212 export type GetVectorStoreFileData = { 23213 23213 body?: never; 23214 23214 path: { 23215 + /** 23216 + * The ID of the vector store that the file belongs to. 23217 + */ 23218 + vector_store_id: string; 23215 23219 /** 23216 23220 * The ID of the file being retrieved. 23217 23221 */ 23218 23222 file_id: string; 23219 - /** 23220 - * The ID of the vector store that the file belongs to. 23221 - */ 23222 - vector_store_id: string; 23223 23223 }; 23224 23224 query?: never; 23225 23225 url: '/vector_stores/{vector_store_id}/files/{file_id}'; ··· 23239 23239 body: UpdateVectorStoreFileAttributesRequest; 23240 23240 path: { 23241 23241 /** 23242 - * The ID of the file to update attributes. 23243 - */ 23244 - file_id: string; 23245 - /** 23246 23242 * The ID of the vector store the file belongs to. 23247 23243 */ 23248 23244 vector_store_id: string; 23245 + /** 23246 + * The ID of the file to update attributes. 23247 + */ 23248 + file_id: string; 23249 23249 }; 23250 23250 query?: never; 23251 23251 url: '/vector_stores/{vector_store_id}/files/{file_id}'; ··· 23265 23265 body?: never; 23266 23266 path: { 23267 23267 /** 23268 - * The ID of the file within the vector store. 23269 - */ 23270 - file_id: string; 23271 - /** 23272 23268 * The ID of the vector store. 23273 23269 */ 23274 23270 vector_store_id: string; 23271 + /** 23272 + * The ID of the file within the vector store. 23273 + */ 23274 + file_id: string; 23275 23275 }; 23276 23276 query?: never; 23277 23277 url: '/vector_stores/{vector_store_id}/files/{file_id}/content';
+1
packages/openapi-ts-tests/main/package.json
··· 37 37 "@tanstack/svelte-query": "5.73.3", 38 38 "@tanstack/vue-query": "5.73.3", 39 39 "@types/cross-spawn": "6.0.6", 40 + "ajv": "8.17.1", 40 41 "arktype": "2.1.23", 41 42 "axios": "1.8.2", 42 43 "cross-spawn": "7.0.6",
+159 -156
pnpm-lock.yaml
··· 1336 1336 version: 10.4.3 1337 1337 nuxt: 1338 1338 specifier: 3.14.1592 1339 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 1339 + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 1340 1340 ofetch: 1341 1341 specifier: 1.4.1 1342 1342 version: 1.4.1 ··· 1427 1427 '@types/cross-spawn': 1428 1428 specifier: 6.0.6 1429 1429 version: 6.0.6 1430 + ajv: 1431 + specifier: 8.17.1 1432 + version: 8.17.1 1430 1433 arktype: 1431 1434 specifier: 2.1.23 1432 1435 version: 2.1.23 ··· 14232 14235 dependencies: 14233 14236 '@ampproject/remapping': 2.3.0 14234 14237 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) 14235 - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) 14238 + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0))(webpack@5.98.0) 14236 14239 '@angular-devkit/core': 19.2.0(chokidar@4.0.3) 14237 14240 '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.6.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) 14238 14241 '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) ··· 14246 14249 '@babel/preset-env': 7.26.9(@babel/core@7.26.9) 14247 14250 '@babel/runtime': 7.26.9 14248 14251 '@discoveryjs/json-ext': 0.6.3 14249 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) 14252 + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0) 14250 14253 '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) 14251 14254 ansi-colors: 4.1.3 14252 14255 autoprefixer: 10.4.20(postcss@8.5.2) 14253 - babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) 14256 + babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0) 14254 14257 browserslist: 4.25.4 14255 14258 copy-webpack-plugin: 12.0.2(webpack@5.98.0) 14256 14259 css-loader: 7.1.2(webpack@5.98.0) ··· 14270 14273 picomatch: 4.0.2 14271 14274 piscina: 4.8.0 14272 14275 postcss: 8.5.2 14273 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) 14276 + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0) 14274 14277 resolve-url-loader: 5.0.0 14275 14278 rxjs: 7.8.1 14276 14279 sass: 1.85.0 ··· 14283 14286 tslib: 2.8.1 14284 14287 typescript: 5.8.3 14285 14288 webpack: 5.98.0(esbuild@0.25.0) 14286 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 14287 - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) 14289 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 14290 + webpack-dev-server: 5.2.0(webpack@5.98.0) 14288 14291 webpack-merge: 6.0.1 14289 14292 webpack-subresource-integrity: 5.1.0(webpack@5.98.0) 14290 14293 optionalDependencies: ··· 14320 14323 dependencies: 14321 14324 '@ampproject/remapping': 2.3.0 14322 14325 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) 14323 - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) 14326 + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0))(webpack@5.98.0) 14324 14327 '@angular-devkit/core': 19.2.0(chokidar@4.0.3) 14325 14328 '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.6.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) 14326 14329 '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) ··· 14334 14337 '@babel/preset-env': 7.26.9(@babel/core@7.26.9) 14335 14338 '@babel/runtime': 7.26.9 14336 14339 '@discoveryjs/json-ext': 0.6.3 14337 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) 14340 + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0) 14338 14341 '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 14339 14342 ansi-colors: 4.1.3 14340 14343 autoprefixer: 10.4.20(postcss@8.5.2) 14341 - babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) 14344 + babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0) 14342 14345 browserslist: 4.25.4 14343 14346 copy-webpack-plugin: 12.0.2(webpack@5.98.0) 14344 14347 css-loader: 7.1.2(webpack@5.98.0) ··· 14358 14361 picomatch: 4.0.2 14359 14362 piscina: 4.8.0 14360 14363 postcss: 8.5.2 14361 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) 14364 + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0) 14362 14365 resolve-url-loader: 5.0.0 14363 14366 rxjs: 7.8.1 14364 14367 sass: 1.85.0 ··· 14371 14374 tslib: 2.8.1 14372 14375 typescript: 5.8.3 14373 14376 webpack: 5.98.0(esbuild@0.25.0) 14374 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 14375 - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) 14377 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 14378 + webpack-dev-server: 5.2.0(webpack@5.98.0) 14376 14379 webpack-merge: 6.0.1 14377 14380 webpack-subresource-integrity: 5.1.0(webpack@5.98.0) 14378 14381 optionalDependencies: ··· 14446 14449 picomatch: 4.0.2 14447 14450 piscina: 4.8.0 14448 14451 postcss: 8.5.2 14449 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) 14452 + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0) 14450 14453 resolve-url-loader: 5.0.0 14451 14454 rxjs: 7.8.1 14452 14455 sass: 1.85.0 ··· 14459 14462 tslib: 2.8.1 14460 14463 typescript: 5.8.3 14461 14464 webpack: 5.98.0(esbuild@0.25.4) 14462 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 14465 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 14463 14466 webpack-dev-server: 5.2.2(webpack@5.98.0) 14464 14467 webpack-merge: 6.0.1 14465 14468 webpack-subresource-integrity: 5.1.0(webpack@5.98.0) ··· 14496 14499 dependencies: 14497 14500 '@ampproject/remapping': 2.3.0 14498 14501 '@angular-devkit/architect': 0.1902.18(chokidar@4.0.3) 14499 - '@angular-devkit/build-webpack': 0.1902.18(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.98.0))(webpack@5.98.0) 14502 + '@angular-devkit/build-webpack': 0.1902.18(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.98.0))(webpack@5.98.0(esbuild@0.25.4)) 14500 14503 '@angular-devkit/core': 19.2.18(chokidar@4.0.3) 14501 14504 '@angular/build': 19.2.18(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(@angular/compiler@19.2.15)(@angular/platform-server@19.2.0(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.15)(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.6.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.9.3)))(terser@5.39.0)(typescript@5.9.3)(yaml@2.8.0) 14502 14505 '@angular/compiler-cli': 19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3) ··· 14510 14513 '@babel/preset-env': 7.26.9(@babel/core@7.26.10) 14511 14514 '@babel/runtime': 7.26.10 14512 14515 '@discoveryjs/json-ext': 0.6.3 14513 - '@ngtools/webpack': 19.2.18(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.98.0) 14516 + '@ngtools/webpack': 19.2.18(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.98.0(esbuild@0.25.4)) 14514 14517 '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) 14515 14518 ansi-colors: 4.1.3 14516 14519 autoprefixer: 10.4.20(postcss@8.5.2) ··· 14534 14537 picomatch: 4.0.2 14535 14538 piscina: 4.8.0 14536 14539 postcss: 8.5.2 14537 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.9.3)(webpack@5.98.0) 14540 + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.9.3)(webpack@5.98.0(esbuild@0.25.4)) 14538 14541 resolve-url-loader: 5.0.0 14539 14542 rxjs: 7.8.1 14540 14543 sass: 1.85.0 ··· 14547 14550 tslib: 2.8.1 14548 14551 typescript: 5.9.3 14549 14552 webpack: 5.98.0(esbuild@0.25.4) 14550 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 14553 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 14551 14554 webpack-dev-server: 5.2.2(webpack@5.98.0) 14552 14555 webpack-merge: 6.0.1 14553 14556 webpack-subresource-integrity: 5.1.0(webpack@5.98.0) ··· 14579 14582 - webpack-cli 14580 14583 - yaml 14581 14584 14582 - '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0))': 14585 + '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0))(webpack@5.98.0)': 14583 14586 dependencies: 14584 14587 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) 14585 14588 rxjs: 7.8.1 14586 - webpack: 5.98.0(esbuild@0.25.0) 14587 - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) 14589 + webpack: 5.98.0(esbuild@0.25.4) 14590 + webpack-dev-server: 5.2.0(webpack@5.98.0) 14588 14591 transitivePeerDependencies: 14589 14592 - chokidar 14590 14593 ··· 14592 14595 dependencies: 14593 14596 '@angular-devkit/architect': 0.1902.15(chokidar@4.0.3) 14594 14597 rxjs: 7.8.1 14595 - webpack: 5.98.0(esbuild@0.25.0) 14598 + webpack: 5.98.0(esbuild@0.25.4) 14596 14599 webpack-dev-server: 5.2.2(webpack@5.98.0) 14597 14600 transitivePeerDependencies: 14598 14601 - chokidar 14599 14602 14600 - '@angular-devkit/build-webpack@0.1902.18(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.98.0))(webpack@5.98.0)': 14603 + '@angular-devkit/build-webpack@0.1902.18(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.98.0))(webpack@5.98.0(esbuild@0.25.4))': 14601 14604 dependencies: 14602 14605 '@angular-devkit/architect': 0.1902.18(chokidar@4.0.3) 14603 14606 rxjs: 7.8.1 14604 - webpack: 5.98.0(esbuild@0.25.0) 14607 + webpack: 5.98.0(esbuild@0.25.4) 14605 14608 webpack-dev-server: 5.2.2(webpack@5.98.0) 14606 14609 transitivePeerDependencies: 14607 14610 - chokidar ··· 17997 18000 '@next/swc-win32-x64-msvc@15.2.4': 17998 18001 optional: true 17999 18002 18000 - '@ngtools/webpack@19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0))': 18003 + '@ngtools/webpack@19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0)': 18001 18004 dependencies: 18002 18005 '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) 18003 18006 typescript: 5.8.3 18004 - webpack: 5.98.0(esbuild@0.25.0) 18007 + webpack: 5.98.0(esbuild@0.25.4) 18005 18008 18006 18009 '@ngtools/webpack@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0)': 18007 18010 dependencies: 18008 18011 '@angular/compiler-cli': 19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3) 18009 18012 typescript: 5.8.3 18010 - webpack: 5.98.0(esbuild@0.25.0) 18013 + webpack: 5.98.0(esbuild@0.25.4) 18011 18014 18012 - '@ngtools/webpack@19.2.18(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.98.0)': 18015 + '@ngtools/webpack@19.2.18(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.98.0(esbuild@0.25.4))': 18013 18016 dependencies: 18014 18017 '@angular/compiler-cli': 19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3) 18015 18018 typescript: 5.9.3 18016 - webpack: 5.98.0(esbuild@0.25.0) 18019 + webpack: 5.98.0(esbuild@0.25.4) 18017 18020 18018 18021 '@nodelib/fs.scandir@2.1.5': 18019 18022 dependencies: ··· 18090 18093 18091 18094 '@nuxt/devalue@2.0.2': {} 18092 18095 18093 - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': 18096 + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': 18094 18097 dependencies: 18095 18098 '@nuxt/kit': 3.15.4(magicast@0.3.5) 18096 18099 '@nuxt/schema': 3.16.2 18097 18100 execa: 7.2.0 18098 - vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18101 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18099 18102 transitivePeerDependencies: 18100 18103 - magicast 18101 18104 - supports-color 18102 18105 18103 - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': 18106 + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': 18104 18107 dependencies: 18105 18108 '@nuxt/kit': 3.15.4(magicast@0.3.5) 18106 18109 '@nuxt/schema': 3.16.2 18107 18110 execa: 7.2.0 18108 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) 18111 + vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18109 18112 transitivePeerDependencies: 18110 18113 - magicast 18111 18114 - supports-color 18112 18115 18113 - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': 18116 + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': 18114 18117 dependencies: 18115 18118 '@nuxt/kit': 3.15.4(magicast@0.3.5) 18116 18119 '@nuxt/schema': 3.16.2 18117 18120 execa: 7.2.0 18118 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18121 + vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) 18119 18122 transitivePeerDependencies: 18120 18123 - magicast 18121 18124 - supports-color ··· 18180 18183 - utf-8-validate 18181 18184 - vue 18182 18185 18183 - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 18186 + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 18184 18187 dependencies: 18185 18188 '@antfu/utils': 0.7.10 18186 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18189 + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18187 18190 '@nuxt/devtools-wizard': 1.7.0 18188 18191 '@nuxt/kit': 3.15.4(magicast@0.3.5) 18189 - '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 18192 + '@vue/devtools-core': 7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 18190 18193 '@vue/devtools-kit': 7.6.8 18191 18194 birpc: 0.2.19 18192 18195 consola: 3.4.2 ··· 18214 18218 sirv: 3.0.1 18215 18219 tinyglobby: 0.2.14 18216 18220 unimport: 3.14.6(rollup@4.50.0) 18221 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18222 + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18223 + vite-plugin-vue-inspector: 5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18224 + which: 3.0.1 18225 + ws: 8.18.3 18226 + transitivePeerDependencies: 18227 + - bufferutil 18228 + - rollup 18229 + - supports-color 18230 + - utf-8-validate 18231 + - vue 18232 + 18233 + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 18234 + dependencies: 18235 + '@antfu/utils': 0.7.10 18236 + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18237 + '@nuxt/devtools-wizard': 1.7.0 18238 + '@nuxt/kit': 3.15.4(magicast@0.3.5) 18239 + '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 18240 + '@vue/devtools-kit': 7.6.8 18241 + birpc: 0.2.19 18242 + consola: 3.4.2 18243 + cronstrue: 2.59.0 18244 + destr: 2.0.5 18245 + error-stack-parser-es: 0.1.5 18246 + execa: 7.2.0 18247 + fast-npm-meta: 0.2.2 18248 + flatted: 3.3.3 18249 + get-port-please: 3.2.0 18250 + hookable: 5.5.3 18251 + image-meta: 0.2.1 18252 + is-installed-globally: 1.0.0 18253 + launch-editor: 2.11.1 18254 + local-pkg: 0.5.1 18255 + magicast: 0.3.5 18256 + nypm: 0.4.1 18257 + ohash: 1.1.6 18258 + pathe: 1.1.2 18259 + perfect-debounce: 1.0.0 18260 + pkg-types: 1.3.1 18261 + rc9: 2.1.2 18262 + scule: 1.3.0 18263 + semver: 7.7.2 18264 + simple-git: 3.28.0 18265 + sirv: 3.0.1 18266 + tinyglobby: 0.2.14 18267 + unimport: 3.14.6(rollup@4.50.0) 18217 18268 vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18218 18269 vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18219 18270 vite-plugin-vue-inspector: 5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ··· 18264 18315 vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) 18265 18316 vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) 18266 18317 vite-plugin-vue-inspector: 5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) 18267 - which: 3.0.1 18268 - ws: 8.18.3 18269 - transitivePeerDependencies: 18270 - - bufferutil 18271 - - rollup 18272 - - supports-color 18273 - - utf-8-validate 18274 - - vue 18275 - 18276 - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 18277 - dependencies: 18278 - '@antfu/utils': 0.7.10 18279 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18280 - '@nuxt/devtools-wizard': 1.7.0 18281 - '@nuxt/kit': 3.15.4(magicast@0.3.5) 18282 - '@vue/devtools-core': 7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 18283 - '@vue/devtools-kit': 7.6.8 18284 - birpc: 0.2.19 18285 - consola: 3.4.2 18286 - cronstrue: 2.59.0 18287 - destr: 2.0.5 18288 - error-stack-parser-es: 0.1.5 18289 - execa: 7.2.0 18290 - fast-npm-meta: 0.2.2 18291 - flatted: 3.3.3 18292 - get-port-please: 3.2.0 18293 - hookable: 5.5.3 18294 - image-meta: 0.2.1 18295 - is-installed-globally: 1.0.0 18296 - launch-editor: 2.11.1 18297 - local-pkg: 0.5.1 18298 - magicast: 0.3.5 18299 - nypm: 0.4.1 18300 - ohash: 1.1.6 18301 - pathe: 1.1.2 18302 - perfect-debounce: 1.0.0 18303 - pkg-types: 1.3.1 18304 - rc9: 2.1.2 18305 - scule: 1.3.0 18306 - semver: 7.7.2 18307 - simple-git: 3.28.0 18308 - sirv: 3.0.1 18309 - tinyglobby: 0.2.14 18310 - unimport: 3.14.6(rollup@4.50.0) 18311 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18312 - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18313 - vite-plugin-vue-inspector: 5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18314 18318 which: 3.0.1 18315 18319 ws: 8.18.3 18316 18320 transitivePeerDependencies: ··· 21058 21062 dependencies: 21059 21063 '@vue/devtools-kit': 8.0.2 21060 21064 21065 + '@vue/devtools-core@7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 21066 + dependencies: 21067 + '@vue/devtools-kit': 7.7.7 21068 + '@vue/devtools-shared': 7.7.7 21069 + mitt: 3.0.1 21070 + nanoid: 5.1.5 21071 + pathe: 1.1.2 21072 + vite-hot-client: 0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 21073 + vue: 3.5.13(typescript@5.9.3) 21074 + transitivePeerDependencies: 21075 + - vite 21076 + 21061 21077 '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 21062 21078 dependencies: 21063 21079 '@vue/devtools-kit': 7.7.7 ··· 21078 21094 nanoid: 5.1.5 21079 21095 pathe: 1.1.2 21080 21096 vite-hot-client: 0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) 21081 - vue: 3.5.13(typescript@5.9.3) 21082 - transitivePeerDependencies: 21083 - - vite 21084 - 21085 - '@vue/devtools-core@7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 21086 - dependencies: 21087 - '@vue/devtools-kit': 7.7.7 21088 - '@vue/devtools-shared': 7.7.7 21089 - mitt: 3.0.1 21090 - nanoid: 5.1.5 21091 - pathe: 1.1.2 21092 - vite-hot-client: 0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 21093 21097 vue: 3.5.13(typescript@5.9.3) 21094 21098 transitivePeerDependencies: 21095 21099 - vite ··· 21717 21721 '@babel/core': 7.26.10 21718 21722 find-cache-dir: 4.0.0 21719 21723 schema-utils: 4.3.2 21720 - webpack: 5.98.0(esbuild@0.25.0) 21724 + webpack: 5.98.0(esbuild@0.25.4) 21721 21725 21722 - babel-loader@9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)): 21726 + babel-loader@9.2.1(@babel/core@7.26.9)(webpack@5.98.0): 21723 21727 dependencies: 21724 21728 '@babel/core': 7.26.9 21725 21729 find-cache-dir: 4.0.0 21726 21730 schema-utils: 4.3.2 21727 - webpack: 5.98.0(esbuild@0.25.0) 21731 + webpack: 5.98.0(esbuild@0.25.4) 21728 21732 21729 21733 babel-plugin-polyfill-corejs2@0.4.14(@babel/core@7.26.10): 21730 21734 dependencies: ··· 22308 22312 normalize-path: 3.0.0 22309 22313 schema-utils: 4.3.2 22310 22314 serialize-javascript: 6.0.2 22311 - webpack: 5.98.0(esbuild@0.25.0) 22315 + webpack: 5.98.0(esbuild@0.25.4) 22312 22316 22313 22317 core-js-compat@3.45.1: 22314 22318 dependencies: ··· 22387 22391 postcss-value-parser: 4.2.0 22388 22392 semver: 7.7.2 22389 22393 optionalDependencies: 22390 - webpack: 5.98.0(esbuild@0.25.0) 22394 + webpack: 5.98.0(esbuild@0.25.4) 22391 22395 22392 22396 css-select@5.2.2: 22393 22397 dependencies: ··· 23151 23155 '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3) 23152 23156 eslint: 9.17.0(jiti@2.6.1) 23153 23157 eslint-import-resolver-node: 0.3.9 23154 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)) 23158 + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.6.1)) 23155 23159 eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.6.1)) 23156 23160 eslint-plugin-jsx-a11y: 6.10.2(eslint@9.17.0(jiti@2.6.1)) 23157 23161 eslint-plugin-react: 7.37.5(eslint@9.17.0(jiti@2.6.1)) ··· 23179 23183 transitivePeerDependencies: 23180 23184 - supports-color 23181 23185 23182 - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)): 23186 + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.6.1)): 23183 23187 dependencies: 23184 23188 '@nolyfill/is-core-module': 1.0.39 23185 23189 debug: 4.4.1 ··· 23194 23198 transitivePeerDependencies: 23195 23199 - supports-color 23196 23200 23197 - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)): 23201 + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.6.1)): 23198 23202 dependencies: 23199 23203 debug: 3.2.7 23200 23204 optionalDependencies: 23201 23205 '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3) 23202 23206 eslint: 9.17.0(jiti@2.6.1) 23203 23207 eslint-import-resolver-node: 0.3.9 23204 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)) 23208 + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.6.1)) 23205 23209 transitivePeerDependencies: 23206 23210 - supports-color 23207 23211 ··· 23216 23220 doctrine: 2.1.0 23217 23221 eslint: 9.17.0(jiti@2.6.1) 23218 23222 eslint-import-resolver-node: 0.3.9 23219 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)) 23223 + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.6.1)) 23220 23224 hasown: 2.0.2 23221 23225 is-core-module: 2.16.1 23222 23226 is-glob: 4.0.3 ··· 24924 24928 dependencies: 24925 24929 less: 4.2.2 24926 24930 optionalDependencies: 24927 - webpack: 5.98.0(esbuild@0.25.0) 24931 + webpack: 5.98.0(esbuild@0.25.4) 24928 24932 24929 24933 less@4.2.2: 24930 24934 dependencies: ··· 24949 24953 dependencies: 24950 24954 webpack-sources: 3.3.3 24951 24955 optionalDependencies: 24952 - webpack: 5.98.0(esbuild@0.25.0) 24956 + webpack: 5.98.0(esbuild@0.25.4) 24953 24957 24954 24958 light-my-request@6.6.0: 24955 24959 dependencies: ··· 25490 25494 dependencies: 25491 25495 schema-utils: 4.3.2 25492 25496 tapable: 2.2.3 25493 - webpack: 5.98.0(esbuild@0.25.0) 25497 + webpack: 5.98.0(esbuild@0.25.4) 25494 25498 25495 25499 minimalistic-assert@1.0.1: {} 25496 25500 ··· 26202 26206 - vue-tsc 26203 26207 - xml2js 26204 26208 26205 - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 26209 + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 26206 26210 dependencies: 26207 26211 '@nuxt/devalue': 2.0.2 26208 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 26212 + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 26209 26213 '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) 26210 26214 '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) 26211 26215 '@nuxt/telemetry': 2.6.6(magicast@0.3.5) ··· 26323 26327 - vue-tsc 26324 26328 - xml2js 26325 26329 26326 - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 26330 + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 26327 26331 dependencies: 26328 26332 '@nuxt/devalue': 2.0.2 26329 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 26333 + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 26330 26334 '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) 26331 26335 '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) 26332 26336 '@nuxt/telemetry': 2.6.6(magicast@0.3.5) ··· 26966 26970 ts-node: 10.9.2(@types/node@22.10.5)(typescript@5.9.3) 26967 26971 optional: true 26968 26972 26969 - postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)): 26973 + postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0): 26970 26974 dependencies: 26971 26975 cosmiconfig: 9.0.0(typescript@5.8.3) 26972 26976 jiti: 1.21.7 26973 26977 postcss: 8.5.2 26974 26978 semver: 7.7.2 26975 26979 optionalDependencies: 26976 - webpack: 5.98.0(esbuild@0.25.0) 26980 + webpack: 5.98.0(esbuild@0.25.4) 26977 26981 transitivePeerDependencies: 26978 26982 - typescript 26979 26983 26980 - postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.9.3)(webpack@5.98.0): 26984 + postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.9.3)(webpack@5.98.0(esbuild@0.25.4)): 26981 26985 dependencies: 26982 26986 cosmiconfig: 9.0.0(typescript@5.9.3) 26983 26987 jiti: 1.21.7 26984 26988 postcss: 8.5.2 26985 26989 semver: 7.7.2 26986 26990 optionalDependencies: 26987 - webpack: 5.98.0(esbuild@0.25.0) 26991 + webpack: 5.98.0(esbuild@0.25.4) 26988 26992 transitivePeerDependencies: 26989 26993 - typescript 26990 26994 ··· 27809 27813 neo-async: 2.6.2 27810 27814 optionalDependencies: 27811 27815 sass: 1.85.0 27812 - webpack: 5.98.0(esbuild@0.25.0) 27816 + webpack: 5.98.0(esbuild@0.25.4) 27813 27817 27814 27818 sass@1.85.0: 27815 27819 dependencies: ··· 28176 28180 dependencies: 28177 28181 iconv-lite: 0.6.3 28178 28182 source-map-js: 1.2.1 28179 - webpack: 5.98.0(esbuild@0.25.0) 28183 + webpack: 5.98.0(esbuild@0.25.4) 28180 28184 28181 28185 source-map-support@0.5.21: 28182 28186 dependencies: ··· 28609 28613 schema-utils: 4.3.2 28610 28614 serialize-javascript: 6.0.2 28611 28615 terser: 5.43.1 28612 - webpack: 5.98.0(esbuild@0.25.0) 28616 + webpack: 5.98.0(esbuild@0.25.4) 28613 28617 optionalDependencies: 28614 28618 esbuild: 0.25.0 28615 28619 ··· 28620 28624 schema-utils: 4.3.2 28621 28625 serialize-javascript: 6.0.2 28622 28626 terser: 5.43.1 28623 - webpack: 5.98.0(esbuild@0.25.0) 28627 + webpack: 5.98.0(esbuild@0.25.4) 28624 28628 optionalDependencies: 28625 28629 esbuild: 0.25.4 28626 28630 ··· 29422 29426 vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29423 29427 vite-hot-client: 2.1.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 29424 29428 29429 + vite-hot-client@0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29430 + dependencies: 29431 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29432 + 29425 29433 vite-hot-client@0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29426 29434 dependencies: 29427 29435 vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) ··· 29430 29438 dependencies: 29431 29439 vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) 29432 29440 29433 - vite-hot-client@0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29434 - dependencies: 29435 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29436 - 29437 29441 vite-hot-client@2.1.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29438 29442 dependencies: 29439 29443 vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) ··· 29578 29582 - rollup 29579 29583 - supports-color 29580 29584 29581 - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29585 + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29582 29586 dependencies: 29583 29587 '@antfu/utils': 0.7.10 29584 29588 '@rollup/pluginutils': 5.2.0(rollup@4.50.0) ··· 29589 29593 perfect-debounce: 1.0.0 29590 29594 picocolors: 1.1.1 29591 29595 sirv: 3.0.1 29592 - vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29596 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29593 29597 optionalDependencies: 29594 29598 '@nuxt/kit': 3.15.4(magicast@0.3.5) 29595 29599 transitivePeerDependencies: 29596 29600 - rollup 29597 29601 - supports-color 29598 29602 29599 - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)): 29603 + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29600 29604 dependencies: 29601 29605 '@antfu/utils': 0.7.10 29602 29606 '@rollup/pluginutils': 5.2.0(rollup@4.50.0) ··· 29607 29611 perfect-debounce: 1.0.0 29608 29612 picocolors: 1.1.1 29609 29613 sirv: 3.0.1 29610 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) 29614 + vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29611 29615 optionalDependencies: 29612 29616 '@nuxt/kit': 3.15.4(magicast@0.3.5) 29613 29617 transitivePeerDependencies: 29614 29618 - rollup 29615 29619 - supports-color 29616 29620 29617 - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29621 + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)): 29618 29622 dependencies: 29619 29623 '@antfu/utils': 0.7.10 29620 29624 '@rollup/pluginutils': 5.2.0(rollup@4.50.0) ··· 29625 29629 perfect-debounce: 1.0.0 29626 29630 picocolors: 1.1.1 29627 29631 sirv: 3.0.1 29628 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29632 + vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) 29629 29633 optionalDependencies: 29630 29634 '@nuxt/kit': 3.15.4(magicast@0.3.5) 29631 29635 transitivePeerDependencies: ··· 29662 29666 - supports-color 29663 29667 - vue 29664 29668 29669 + vite-plugin-vue-inspector@5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29670 + dependencies: 29671 + '@babel/core': 7.28.3 29672 + '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) 29673 + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) 29674 + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) 29675 + '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) 29676 + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) 29677 + '@vue/compiler-dom': 3.5.21 29678 + kolorist: 1.8.0 29679 + magic-string: 0.30.18 29680 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29681 + transitivePeerDependencies: 29682 + - supports-color 29683 + 29665 29684 vite-plugin-vue-inspector@5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29666 29685 dependencies: 29667 29686 '@babel/core': 7.28.3 ··· 29689 29708 kolorist: 1.8.0 29690 29709 magic-string: 0.30.18 29691 29710 vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) 29692 - transitivePeerDependencies: 29693 - - supports-color 29694 - 29695 - vite-plugin-vue-inspector@5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29696 - dependencies: 29697 - '@babel/core': 7.28.3 29698 - '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) 29699 - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) 29700 - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) 29701 - '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) 29702 - '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) 29703 - '@vue/compiler-dom': 3.5.21 29704 - kolorist: 1.8.0 29705 - magic-string: 0.30.18 29706 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29707 29711 transitivePeerDependencies: 29708 29712 - supports-color 29709 29713 ··· 30162 30166 30163 30167 webidl-conversions@7.0.0: {} 30164 30168 30165 - webpack-dev-middleware@7.4.2(webpack@5.98.0(esbuild@0.25.0)): 30169 + webpack-dev-middleware@7.4.2(webpack@5.98.0): 30166 30170 dependencies: 30167 30171 colorette: 2.0.20 30168 30172 memfs: 4.38.2 ··· 30171 30175 range-parser: 1.2.1 30172 30176 schema-utils: 4.3.2 30173 30177 optionalDependencies: 30174 - webpack: 5.98.0(esbuild@0.25.0) 30178 + webpack: 5.98.0(esbuild@0.25.4) 30175 30179 30176 - webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)): 30180 + webpack-dev-server@5.2.0(webpack@5.98.0): 30177 30181 dependencies: 30178 30182 '@types/bonjour': 3.5.13 30179 30183 '@types/connect-history-api-fallback': 1.5.4 ··· 30200 30204 serve-index: 1.9.1 30201 30205 sockjs: 0.3.24 30202 30206 spdy: 4.0.2 30203 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 30207 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 30204 30208 ws: 8.18.3 30205 30209 optionalDependencies: 30206 - webpack: 5.98.0(esbuild@0.25.0) 30210 + webpack: 5.98.0(esbuild@0.25.4) 30207 30211 transitivePeerDependencies: 30208 30212 - bufferutil 30209 30213 - debug ··· 30238 30242 serve-index: 1.9.1 30239 30243 sockjs: 0.3.24 30240 30244 spdy: 4.0.2 30241 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 30245 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 30242 30246 ws: 8.18.3 30243 30247 optionalDependencies: 30244 - webpack: 5.98.0(esbuild@0.25.0) 30248 + webpack: 5.98.0(esbuild@0.25.4) 30245 30249 transitivePeerDependencies: 30246 30250 - bufferutil 30247 30251 - debug ··· 30259 30263 webpack-subresource-integrity@5.1.0(webpack@5.98.0): 30260 30264 dependencies: 30261 30265 typed-assert: 1.0.9 30262 - webpack: 5.98.0(esbuild@0.25.0) 30266 + webpack: 5.98.0(esbuild@0.25.4) 30263 30267 30264 30268 webpack-virtual-modules@0.6.2: {} 30265 30269