@perplexity-ai/perplexity_ai 0.35.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/lib/add-output-text.d.mts +4 -4
- package/lib/add-output-text.d.mts.map +1 -1
- package/lib/add-output-text.d.ts +4 -4
- package/lib/add-output-text.d.ts.map +1 -1
- package/lib/add-output-text.js +4 -3
- package/lib/add-output-text.js.map +1 -1
- package/lib/add-output-text.mjs +4 -3
- package/lib/add-output-text.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/async/chat/completions.d.mts +6 -0
- package/resources/async/chat/completions.d.mts.map +1 -1
- package/resources/async/chat/completions.d.ts +6 -0
- package/resources/async/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.d.mts +6 -0
- package/resources/chat/completions.d.mts.map +1 -1
- package/resources/chat/completions.d.ts +6 -0
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/responses/index.d.mts +1 -1
- package/resources/responses/index.d.mts.map +1 -1
- package/resources/responses/index.d.ts +1 -1
- package/resources/responses/index.d.ts.map +1 -1
- package/resources/responses/index.js.map +1 -1
- package/resources/responses/index.mjs.map +1 -1
- package/resources/responses/responses.d.mts +348 -5
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +348 -5
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +12 -0
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +12 -0
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.mts +4 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +4 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +2 -0
- package/src/lib/add-output-text.ts +14 -10
- package/src/resources/async/chat/completions.ts +7 -0
- package/src/resources/chat/completions.ts +7 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/responses/index.ts +1 -0
- package/src/resources/responses/responses.ts +457 -4
- package/src/resources/shared.ts +4 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -55,6 +55,19 @@ export class Responses extends APIResource {
|
|
|
55
55
|
retrieve(responseID: string, options?: RequestOptions): APIPromise<ResponseRetrieveResponse> {
|
|
56
56
|
return this._client.get(path`/v1/responses/${responseID}`, options);
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Request cancellation of a response. Acts on durable state, so it works for
|
|
61
|
+
* background responses that outlive the client connection as well as durably
|
|
62
|
+
* routed foreground responses. The cancel is asynchronous: a 200 acknowledges the
|
|
63
|
+
* request (status `cancelling`) and the run stops shortly after. Poll the retrieve
|
|
64
|
+
* endpoint for the terminal status. Cancelling a run that is already terminal
|
|
65
|
+
* returns 400. Ownership is enforced server side; an unknown id, or a response
|
|
66
|
+
* belonging to a different account, returns 404.
|
|
67
|
+
*/
|
|
68
|
+
cancel(responseID: string, options?: RequestOptions): APIPromise<ResponseCancelResponse> {
|
|
69
|
+
return this._client.post(path`/v1/responses/${responseID}/cancel`, options);
|
|
70
|
+
}
|
|
58
71
|
}
|
|
59
72
|
|
|
60
73
|
/**
|
|
@@ -229,7 +242,18 @@ export type OutputItem =
|
|
|
229
242
|
| OutputItem.FetchURLResultsOutputItem
|
|
230
243
|
| FunctionCallOutputItem
|
|
231
244
|
| OutputItem.McpListToolsOutputItem
|
|
232
|
-
| OutputItem.McpCallOutputItem
|
|
245
|
+
| OutputItem.McpCallOutputItem
|
|
246
|
+
| OutputItem.SkillLoadedOutputItem
|
|
247
|
+
| OutputItem.AdvisorResultOutputItem
|
|
248
|
+
| OutputItem.SandboxResultsOutputItem
|
|
249
|
+
| OutputItem.SandboxWriteFileOutputItem
|
|
250
|
+
| OutputItem.SandboxReadFileOutputItem
|
|
251
|
+
| OutputItem.SandboxEditFileOutputItem
|
|
252
|
+
| OutputItem.SandboxGrepOutputItem
|
|
253
|
+
| OutputItem.SandboxGlobOutputItem
|
|
254
|
+
| OutputItem.SandboxApplyPatchOutputItem
|
|
255
|
+
| OutputItem.ShareFileOutputItem
|
|
256
|
+
| OutputItem.UnknownOutputItem;
|
|
233
257
|
|
|
234
258
|
export namespace OutputItem {
|
|
235
259
|
export interface MessageOutputItem {
|
|
@@ -347,6 +371,236 @@ export namespace OutputItem {
|
|
|
347
371
|
*/
|
|
348
372
|
output?: string;
|
|
349
373
|
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Per-call result emitted by the `load_skill` tool. Only the resolved skill name
|
|
377
|
+
* is surfaced here; the skill body itself lives in the function_call_output input
|
|
378
|
+
* item the model consumes on its next turn.
|
|
379
|
+
*/
|
|
380
|
+
export interface SkillLoadedOutputItem {
|
|
381
|
+
/**
|
|
382
|
+
* Name of the skill that was loaded.
|
|
383
|
+
*/
|
|
384
|
+
name: string;
|
|
385
|
+
|
|
386
|
+
type: 'skill_loaded';
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Preview API. Advisor tool invocation emitted in `response.output[]`. The advisor
|
|
391
|
+
* result is server-side guidance consumed by the agent loop; it is not a
|
|
392
|
+
* client-executable function call.
|
|
393
|
+
*/
|
|
394
|
+
export interface AdvisorResultOutputItem {
|
|
395
|
+
call_id: string;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Status of a response or output item
|
|
399
|
+
*/
|
|
400
|
+
status: 'completed' | 'failed' | 'in_progress' | 'queued' | 'cancelled' | 'requires_action';
|
|
401
|
+
|
|
402
|
+
type: 'advisor_result';
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Guidance returned by the advisor model.
|
|
406
|
+
*/
|
|
407
|
+
advice?: string;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Raw JSON arguments the executor passed to the advisor tool.
|
|
411
|
+
*/
|
|
412
|
+
arguments?: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Non-fatal advisor error code when the advisor call failed.
|
|
416
|
+
*/
|
|
417
|
+
error_code?: string;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Non-fatal advisor error message when the advisor call failed.
|
|
421
|
+
*/
|
|
422
|
+
error_message?: string;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Parsed advisor question when present in arguments.
|
|
426
|
+
*/
|
|
427
|
+
question?: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Sandbox tool results emitted in `response.output[]`. Cost is aggregated into
|
|
432
|
+
* `Usage.tool_calls_details.sandbox.cost_usd`; this item does not carry
|
|
433
|
+
* per-execution cost.
|
|
434
|
+
*/
|
|
435
|
+
export interface SandboxResultsOutputItem {
|
|
436
|
+
call_id: string;
|
|
437
|
+
|
|
438
|
+
code: string;
|
|
439
|
+
|
|
440
|
+
language: 'python' | 'bash';
|
|
441
|
+
|
|
442
|
+
results: Array<SandboxResultsOutputItem.Result>;
|
|
443
|
+
|
|
444
|
+
status: 'in_progress' | 'completed' | 'failed' | 'timed_out';
|
|
445
|
+
|
|
446
|
+
type: 'sandbox_results';
|
|
447
|
+
|
|
448
|
+
container_id?: string;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export namespace SandboxResultsOutputItem {
|
|
452
|
+
/**
|
|
453
|
+
* One sandbox execution result. `status` describes whether the sandbox runner
|
|
454
|
+
* completed, failed, or timed out. `exit_code` is the program exit code, so
|
|
455
|
+
* `status: completed` can still have a non-zero `exit_code`.
|
|
456
|
+
*/
|
|
457
|
+
export interface Result {
|
|
458
|
+
duration_ms: number;
|
|
459
|
+
|
|
460
|
+
exit_code: number;
|
|
461
|
+
|
|
462
|
+
status: 'in_progress' | 'completed' | 'failed' | 'timed_out';
|
|
463
|
+
|
|
464
|
+
stderr: string;
|
|
465
|
+
|
|
466
|
+
stdout: string;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Per-invocation result of the `write` tool inside the sandbox.
|
|
472
|
+
*/
|
|
473
|
+
export interface SandboxWriteFileOutputItem {
|
|
474
|
+
call_id: string;
|
|
475
|
+
|
|
476
|
+
file_path: string;
|
|
477
|
+
|
|
478
|
+
type: 'sandbox_write_file';
|
|
479
|
+
|
|
480
|
+
error?: string;
|
|
481
|
+
|
|
482
|
+
size_bytes?: number;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Per-invocation result of the `read` tool inside the sandbox.
|
|
487
|
+
*/
|
|
488
|
+
export interface SandboxReadFileOutputItem {
|
|
489
|
+
call_id: string;
|
|
490
|
+
|
|
491
|
+
file_path: string;
|
|
492
|
+
|
|
493
|
+
type: 'sandbox_read_file';
|
|
494
|
+
|
|
495
|
+
content?: string;
|
|
496
|
+
|
|
497
|
+
error?: string;
|
|
498
|
+
|
|
499
|
+
start_line?: number;
|
|
500
|
+
|
|
501
|
+
total_lines?: number;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Per-invocation result of the `edit` tool inside the sandbox.
|
|
506
|
+
*/
|
|
507
|
+
export interface SandboxEditFileOutputItem {
|
|
508
|
+
call_id: string;
|
|
509
|
+
|
|
510
|
+
type: 'sandbox_edit_file';
|
|
511
|
+
|
|
512
|
+
error?: string;
|
|
513
|
+
|
|
514
|
+
file_path?: string;
|
|
515
|
+
|
|
516
|
+
message?: string;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Per-invocation result of the `grep` tool inside the sandbox.
|
|
521
|
+
*/
|
|
522
|
+
export interface SandboxGrepOutputItem {
|
|
523
|
+
call_id: string;
|
|
524
|
+
|
|
525
|
+
type: 'sandbox_grep';
|
|
526
|
+
|
|
527
|
+
count?: number;
|
|
528
|
+
|
|
529
|
+
error?: string;
|
|
530
|
+
|
|
531
|
+
files?: Array<string>;
|
|
532
|
+
|
|
533
|
+
truncated?: boolean;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Per-invocation result of the `glob` tool inside the sandbox.
|
|
538
|
+
*/
|
|
539
|
+
export interface SandboxGlobOutputItem {
|
|
540
|
+
call_id: string;
|
|
541
|
+
|
|
542
|
+
type: 'sandbox_glob';
|
|
543
|
+
|
|
544
|
+
count?: number;
|
|
545
|
+
|
|
546
|
+
error?: string;
|
|
547
|
+
|
|
548
|
+
files?: Array<string>;
|
|
549
|
+
|
|
550
|
+
truncated?: boolean;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Per-invocation result of the `apply_patch` tool inside the sandbox.
|
|
555
|
+
*/
|
|
556
|
+
export interface SandboxApplyPatchOutputItem {
|
|
557
|
+
call_id: string;
|
|
558
|
+
|
|
559
|
+
type: 'sandbox_apply_patch';
|
|
560
|
+
|
|
561
|
+
added?: Array<string>;
|
|
562
|
+
|
|
563
|
+
deleted?: Array<string>;
|
|
564
|
+
|
|
565
|
+
error?: string;
|
|
566
|
+
|
|
567
|
+
modified?: Array<string>;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Result of one `share_file` tool call. On success, file_id and filename identify
|
|
572
|
+
* a sandbox file downloadable at url.
|
|
573
|
+
*/
|
|
574
|
+
export interface ShareFileOutputItem {
|
|
575
|
+
call_id: string;
|
|
576
|
+
|
|
577
|
+
type: 'share_file';
|
|
578
|
+
|
|
579
|
+
error?: string;
|
|
580
|
+
|
|
581
|
+
file_id?: string;
|
|
582
|
+
|
|
583
|
+
filename?: string;
|
|
584
|
+
|
|
585
|
+
size_bytes?: number;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Relative download path, /v1/responses/{id}/files/{file_id}/content.
|
|
589
|
+
*/
|
|
590
|
+
url?: string;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Forward-compat fallback for proto OutputItem variants the gateway does not yet
|
|
595
|
+
* have a typed schema for.
|
|
596
|
+
*/
|
|
597
|
+
export interface UnknownOutputItem {
|
|
598
|
+
item_name: string;
|
|
599
|
+
|
|
600
|
+
payload: { [key: string]: unknown };
|
|
601
|
+
|
|
602
|
+
type: 'unknown';
|
|
603
|
+
}
|
|
350
604
|
}
|
|
351
605
|
|
|
352
606
|
/**
|
|
@@ -405,6 +659,7 @@ export interface ResponseFileList {
|
|
|
405
659
|
* - `response.reasoning.fetch_url_queries`: URL fetch queries issued
|
|
406
660
|
* - `response.reasoning.fetch_url_results`: URL fetch results received
|
|
407
661
|
* - `response.reasoning.stopped`: Reasoning phase complete
|
|
662
|
+
* - `response.skill.loaded`: load_skill resolved a skill body
|
|
408
663
|
*/
|
|
409
664
|
export type ResponseStreamChunk =
|
|
410
665
|
| ResponseStreamChunk.ResponseCreatedEvent
|
|
@@ -420,7 +675,8 @@ export type ResponseStreamChunk =
|
|
|
420
675
|
| ResponseStreamChunk.SearchResultsEvent
|
|
421
676
|
| ResponseStreamChunk.FetchURLQueriesEvent
|
|
422
677
|
| ResponseStreamChunk.FetchURLResultsEvent
|
|
423
|
-
| ResponseStreamChunk.ReasoningStoppedEvent
|
|
678
|
+
| ResponseStreamChunk.ReasoningStoppedEvent
|
|
679
|
+
| ResponseStreamChunk.ResponseSkillLoadedEvent;
|
|
424
680
|
|
|
425
681
|
export namespace ResponseStreamChunk {
|
|
426
682
|
/**
|
|
@@ -474,6 +730,19 @@ export namespace ResponseStreamChunk {
|
|
|
474
730
|
|
|
475
731
|
error?: ResponsesAPI.ErrorInfo;
|
|
476
732
|
|
|
733
|
+
/**
|
|
734
|
+
* ID of the previous response in the chain, when the response was created with
|
|
735
|
+
* previous_response_id.
|
|
736
|
+
*/
|
|
737
|
+
previous_response_id?: string | null;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Whether the response is stored and visible to later retrieve calls. A response
|
|
741
|
+
* created with store=false can still be used as a previous_response_id
|
|
742
|
+
* continuation source.
|
|
743
|
+
*/
|
|
744
|
+
store?: boolean;
|
|
745
|
+
|
|
477
746
|
usage?: ResponsesAPI.ResponsesUsage;
|
|
478
747
|
}
|
|
479
748
|
}
|
|
@@ -529,6 +798,19 @@ export namespace ResponseStreamChunk {
|
|
|
529
798
|
|
|
530
799
|
error?: ResponsesAPI.ErrorInfo;
|
|
531
800
|
|
|
801
|
+
/**
|
|
802
|
+
* ID of the previous response in the chain, when the response was created with
|
|
803
|
+
* previous_response_id.
|
|
804
|
+
*/
|
|
805
|
+
previous_response_id?: string | null;
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Whether the response is stored and visible to later retrieve calls. A response
|
|
809
|
+
* created with store=false can still be used as a previous_response_id
|
|
810
|
+
* continuation source.
|
|
811
|
+
*/
|
|
812
|
+
store?: boolean;
|
|
813
|
+
|
|
532
814
|
usage?: ResponsesAPI.ResponsesUsage;
|
|
533
815
|
}
|
|
534
816
|
}
|
|
@@ -583,6 +865,19 @@ export namespace ResponseStreamChunk {
|
|
|
583
865
|
|
|
584
866
|
error?: ResponsesAPI.ErrorInfo;
|
|
585
867
|
|
|
868
|
+
/**
|
|
869
|
+
* ID of the previous response in the chain, when the response was created with
|
|
870
|
+
* previous_response_id.
|
|
871
|
+
*/
|
|
872
|
+
previous_response_id?: string | null;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Whether the response is stored and visible to later retrieve calls. A response
|
|
876
|
+
* created with store=false can still be used as a previous_response_id
|
|
877
|
+
* continuation source.
|
|
878
|
+
*/
|
|
879
|
+
store?: boolean;
|
|
880
|
+
|
|
586
881
|
usage?: ResponsesAPI.ResponsesUsage;
|
|
587
882
|
}
|
|
588
883
|
}
|
|
@@ -840,6 +1135,28 @@ export namespace ResponseStreamChunk {
|
|
|
840
1135
|
|
|
841
1136
|
thought?: string;
|
|
842
1137
|
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Skill loaded event (type: "response.skill.loaded"). Fires when load_skill
|
|
1141
|
+
* resolves a known skill. The skill body stays in the model conversation prefix;
|
|
1142
|
+
* this event carries only the name for client rendering.
|
|
1143
|
+
*/
|
|
1144
|
+
export interface ResponseSkillLoadedEvent {
|
|
1145
|
+
/**
|
|
1146
|
+
* Name of the skill that was loaded.
|
|
1147
|
+
*/
|
|
1148
|
+
name: string;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Monotonically increasing sequence number for event ordering
|
|
1152
|
+
*/
|
|
1153
|
+
sequence_number: number;
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* SSE event type discriminator (always "response.skill.loaded")
|
|
1157
|
+
*/
|
|
1158
|
+
type: 'response.skill.loaded';
|
|
1159
|
+
}
|
|
843
1160
|
}
|
|
844
1161
|
|
|
845
1162
|
export interface ResponsesCreateParams {
|
|
@@ -872,7 +1189,7 @@ export interface ResponsesCreateParams {
|
|
|
872
1189
|
|
|
873
1190
|
/**
|
|
874
1191
|
* Maximum number of research loop steps. If provided, overrides the preset's
|
|
875
|
-
* max_steps value. Must be >= 1 if specified. Maximum allowed is
|
|
1192
|
+
* max_steps value. Must be >= 1 if specified. Maximum allowed is 100.
|
|
876
1193
|
*/
|
|
877
1194
|
max_steps?: number;
|
|
878
1195
|
|
|
@@ -913,6 +1230,15 @@ export interface ResponsesCreateParams {
|
|
|
913
1230
|
*/
|
|
914
1231
|
response_format?: Shared.ResponseFormat;
|
|
915
1232
|
|
|
1233
|
+
/**
|
|
1234
|
+
* Built-in and request-scoped inline skills available to the model. Skill metadata
|
|
1235
|
+
* is disclosed to the model up front; full instructions are loaded on demand
|
|
1236
|
+
* through the `load_skill` tool. Selecting any skill enables the sandbox tool for
|
|
1237
|
+
* the request. Requests with skills run on the durable backend and skills are not
|
|
1238
|
+
* echoed back on Response objects.
|
|
1239
|
+
*/
|
|
1240
|
+
skills?: Array<ResponsesCreateParams.BuiltinSkill | ResponsesCreateParams.InlineSkill>;
|
|
1241
|
+
|
|
916
1242
|
/**
|
|
917
1243
|
* OpenAI-compatible storage toggle. When false, the response is hidden from later
|
|
918
1244
|
* retrieve calls, and the echoed response reports `store: false`. It can still be
|
|
@@ -947,6 +1273,45 @@ export namespace ResponsesCreateParams {
|
|
|
947
1273
|
effort?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
948
1274
|
}
|
|
949
1275
|
|
|
1276
|
+
/**
|
|
1277
|
+
* Selects a built-in skill from the catalog by name.
|
|
1278
|
+
*/
|
|
1279
|
+
export interface BuiltinSkill {
|
|
1280
|
+
/**
|
|
1281
|
+
* Built-in skill to make available to the model. office is the full Office bundle
|
|
1282
|
+
* (enables all four leaves). office/docx, office/pdf, office/pptx, office/xlsx
|
|
1283
|
+
* each create polished documents of that type from scratch, with structural
|
|
1284
|
+
* validation and visual QA.
|
|
1285
|
+
*/
|
|
1286
|
+
name: 'office' | 'office/docx' | 'office/pdf' | 'office/pptx' | 'office/xlsx';
|
|
1287
|
+
|
|
1288
|
+
type: 'builtin';
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* Request-scoped skill defined inline. Inline skills have no files or sandbox
|
|
1293
|
+
* mounts and are never echoed back in the response.
|
|
1294
|
+
*/
|
|
1295
|
+
export interface InlineSkill {
|
|
1296
|
+
/**
|
|
1297
|
+
* Short discovery description, limited to 1,024 UTF-8 bytes.
|
|
1298
|
+
*/
|
|
1299
|
+
description: string;
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* Instructions returned by `load_skill`, limited to 65,536 UTF-8 bytes per skill
|
|
1303
|
+
* and 262,144 bytes across the request.
|
|
1304
|
+
*/
|
|
1305
|
+
instructions: string;
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Request-scoped lowercase ASCII name separated by single hyphens.
|
|
1309
|
+
*/
|
|
1310
|
+
name: string;
|
|
1311
|
+
|
|
1312
|
+
type: 'inline';
|
|
1313
|
+
}
|
|
1314
|
+
|
|
950
1315
|
export interface WebSearchTool {
|
|
951
1316
|
type: 'web_search';
|
|
952
1317
|
|
|
@@ -1162,6 +1527,19 @@ export interface ResponseCreateResponse {
|
|
|
1162
1527
|
|
|
1163
1528
|
error?: ErrorInfo;
|
|
1164
1529
|
|
|
1530
|
+
/**
|
|
1531
|
+
* ID of the previous response in the chain, when the response was created with
|
|
1532
|
+
* previous_response_id.
|
|
1533
|
+
*/
|
|
1534
|
+
previous_response_id?: string | null;
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* Whether the response is stored and visible to later retrieve calls. A response
|
|
1538
|
+
* created with store=false can still be used as a previous_response_id
|
|
1539
|
+
* continuation source.
|
|
1540
|
+
*/
|
|
1541
|
+
store?: boolean;
|
|
1542
|
+
|
|
1165
1543
|
usage?: ResponsesUsage;
|
|
1166
1544
|
|
|
1167
1545
|
/**
|
|
@@ -1200,6 +1578,19 @@ export interface ResponseRetrieveResponse {
|
|
|
1200
1578
|
|
|
1201
1579
|
error?: ErrorInfo;
|
|
1202
1580
|
|
|
1581
|
+
/**
|
|
1582
|
+
* ID of the previous response in the chain, when the response was created with
|
|
1583
|
+
* previous_response_id.
|
|
1584
|
+
*/
|
|
1585
|
+
previous_response_id?: string | null;
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* Whether the response is stored and visible to later retrieve calls. A response
|
|
1589
|
+
* created with store=false can still be used as a previous_response_id
|
|
1590
|
+
* continuation source.
|
|
1591
|
+
*/
|
|
1592
|
+
store?: boolean;
|
|
1593
|
+
|
|
1203
1594
|
usage?: ResponsesUsage;
|
|
1204
1595
|
|
|
1205
1596
|
/**
|
|
@@ -1209,6 +1600,19 @@ export interface ResponseRetrieveResponse {
|
|
|
1209
1600
|
output_text?: string;
|
|
1210
1601
|
}
|
|
1211
1602
|
|
|
1603
|
+
export interface ResponseCancelResponse {
|
|
1604
|
+
/**
|
|
1605
|
+
* The response id (resp\_...).
|
|
1606
|
+
*/
|
|
1607
|
+
response_id: string;
|
|
1608
|
+
|
|
1609
|
+
/**
|
|
1610
|
+
* Always `cancelling`: the cancel was accepted and the run stops asynchronously.
|
|
1611
|
+
* An already terminal run returns 400 instead, so no terminal status appears here.
|
|
1612
|
+
*/
|
|
1613
|
+
status: 'cancelling';
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1212
1616
|
export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming;
|
|
1213
1617
|
|
|
1214
1618
|
export interface ResponseCreateParamsBase {
|
|
@@ -1241,7 +1645,7 @@ export interface ResponseCreateParamsBase {
|
|
|
1241
1645
|
|
|
1242
1646
|
/**
|
|
1243
1647
|
* Maximum number of research loop steps. If provided, overrides the preset's
|
|
1244
|
-
* max_steps value. Must be >= 1 if specified. Maximum allowed is
|
|
1648
|
+
* max_steps value. Must be >= 1 if specified. Maximum allowed is 100.
|
|
1245
1649
|
*/
|
|
1246
1650
|
max_steps?: number;
|
|
1247
1651
|
|
|
@@ -1282,6 +1686,15 @@ export interface ResponseCreateParamsBase {
|
|
|
1282
1686
|
*/
|
|
1283
1687
|
response_format?: Shared.ResponseFormat;
|
|
1284
1688
|
|
|
1689
|
+
/**
|
|
1690
|
+
* Built-in and request-scoped inline skills available to the model. Skill metadata
|
|
1691
|
+
* is disclosed to the model up front; full instructions are loaded on demand
|
|
1692
|
+
* through the `load_skill` tool. Selecting any skill enables the sandbox tool for
|
|
1693
|
+
* the request. Requests with skills run on the durable backend and skills are not
|
|
1694
|
+
* echoed back on Response objects.
|
|
1695
|
+
*/
|
|
1696
|
+
skills?: Array<ResponseCreateParams.BuiltinSkill | ResponseCreateParams.InlineSkill>;
|
|
1697
|
+
|
|
1285
1698
|
/**
|
|
1286
1699
|
* OpenAI-compatible storage toggle. When false, the response is hidden from later
|
|
1287
1700
|
* retrieve calls, and the echoed response reports `store: false`. It can still be
|
|
@@ -1316,6 +1729,45 @@ export namespace ResponseCreateParams {
|
|
|
1316
1729
|
effort?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
1317
1730
|
}
|
|
1318
1731
|
|
|
1732
|
+
/**
|
|
1733
|
+
* Selects a built-in skill from the catalog by name.
|
|
1734
|
+
*/
|
|
1735
|
+
export interface BuiltinSkill {
|
|
1736
|
+
/**
|
|
1737
|
+
* Built-in skill to make available to the model. office is the full Office bundle
|
|
1738
|
+
* (enables all four leaves). office/docx, office/pdf, office/pptx, office/xlsx
|
|
1739
|
+
* each create polished documents of that type from scratch, with structural
|
|
1740
|
+
* validation and visual QA.
|
|
1741
|
+
*/
|
|
1742
|
+
name: 'office' | 'office/docx' | 'office/pdf' | 'office/pptx' | 'office/xlsx';
|
|
1743
|
+
|
|
1744
|
+
type: 'builtin';
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* Request-scoped skill defined inline. Inline skills have no files or sandbox
|
|
1749
|
+
* mounts and are never echoed back in the response.
|
|
1750
|
+
*/
|
|
1751
|
+
export interface InlineSkill {
|
|
1752
|
+
/**
|
|
1753
|
+
* Short discovery description, limited to 1,024 UTF-8 bytes.
|
|
1754
|
+
*/
|
|
1755
|
+
description: string;
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
* Instructions returned by `load_skill`, limited to 65,536 UTF-8 bytes per skill
|
|
1759
|
+
* and 262,144 bytes across the request.
|
|
1760
|
+
*/
|
|
1761
|
+
instructions: string;
|
|
1762
|
+
|
|
1763
|
+
/**
|
|
1764
|
+
* Request-scoped lowercase ASCII name separated by single hyphens.
|
|
1765
|
+
*/
|
|
1766
|
+
name: string;
|
|
1767
|
+
|
|
1768
|
+
type: 'inline';
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1319
1771
|
export interface WebSearchTool {
|
|
1320
1772
|
type: 'web_search';
|
|
1321
1773
|
|
|
@@ -1489,6 +1941,7 @@ export declare namespace Responses {
|
|
|
1489
1941
|
type ResponsesUsage as ResponsesUsage,
|
|
1490
1942
|
type ResponseCreateResponse as ResponseCreateResponse,
|
|
1491
1943
|
type ResponseRetrieveResponse as ResponseRetrieveResponse,
|
|
1944
|
+
type ResponseCancelResponse as ResponseCancelResponse,
|
|
1492
1945
|
type ResponseCreateParams as ResponseCreateParams,
|
|
1493
1946
|
type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming,
|
|
1494
1947
|
type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming,
|
package/src/resources/shared.ts
CHANGED
|
@@ -519,6 +519,10 @@ export namespace UsageInfo {
|
|
|
519
519
|
|
|
520
520
|
reasoning_tokens_cost?: number | null;
|
|
521
521
|
|
|
522
|
+
/**
|
|
523
|
+
* Flat request cost for the chat completion. Present on completed (terminal)
|
|
524
|
+
* responses and omitted from the zero cost skeleton on interim streaming chunks.
|
|
525
|
+
*/
|
|
522
526
|
request_cost?: number | null;
|
|
523
527
|
|
|
524
528
|
search_queries_cost?: number | null;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.37.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.37.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.37.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.37.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|