openai 7.23.0 → 7.24.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 +44 -0
- package/README.md +4 -1
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +43 -5
- package/client.js.map +1 -1
- package/client.mjs +43 -5
- package/client.mjs.map +1 -1
- package/internal/responses/canonical-output-text.d.mts +8 -4
- package/internal/responses/canonical-output-text.d.mts.map +1 -1
- package/internal/responses/canonical-output-text.d.ts +8 -4
- package/internal/responses/canonical-output-text.d.ts.map +1 -1
- package/internal/responses/canonical-output-text.js +11 -0
- package/internal/responses/canonical-output-text.js.map +1 -1
- package/internal/responses/canonical-output-text.mjs +11 -0
- package/internal/responses/canonical-output-text.mjs.map +1 -1
- package/internal/responses/response-accumulator.d.mts +12 -1
- package/internal/responses/response-accumulator.d.mts.map +1 -1
- package/internal/responses/response-accumulator.d.ts +12 -1
- package/internal/responses/response-accumulator.d.ts.map +1 -1
- package/internal/responses/response-accumulator.js +99 -25
- package/internal/responses/response-accumulator.js.map +1 -1
- package/internal/responses/response-accumulator.mjs +97 -26
- package/internal/responses/response-accumulator.mjs.map +1 -1
- package/internal/ws.d.mts +6 -2
- package/internal/ws.d.mts.map +1 -1
- package/internal/ws.d.ts +6 -2
- package/internal/ws.d.ts.map +1 -1
- package/internal/ws.js +5 -3
- package/internal/ws.js.map +1 -1
- package/internal/ws.mjs +5 -3
- package/internal/ws.mjs.map +1 -1
- package/lib/live/transcript-grouping.d.mts.map +1 -1
- package/lib/live/transcript-grouping.d.ts.map +1 -1
- package/lib/live/transcript-grouping.js +6 -5
- package/lib/live/transcript-grouping.js.map +1 -1
- package/lib/live/transcript-grouping.mjs +6 -5
- package/lib/live/transcript-grouping.mjs.map +1 -1
- package/lib/responses/responses-websocket-accumulator.d.mts +72 -0
- package/lib/responses/responses-websocket-accumulator.d.mts.map +1 -0
- package/lib/responses/responses-websocket-accumulator.d.ts +72 -0
- package/lib/responses/responses-websocket-accumulator.d.ts.map +1 -0
- package/lib/responses/responses-websocket-accumulator.js +291 -0
- package/lib/responses/responses-websocket-accumulator.js.map +1 -0
- package/lib/responses/responses-websocket-accumulator.mjs +287 -0
- package/lib/responses/responses-websocket-accumulator.mjs.map +1 -0
- package/package.json +1 -1
- package/realtime/translations/ws.d.mts +84 -0
- package/realtime/translations/ws.d.mts.map +1 -0
- package/realtime/translations/ws.d.ts +84 -0
- package/realtime/translations/ws.d.ts.map +1 -0
- package/realtime/translations/ws.js +444 -0
- package/realtime/translations/ws.js.map +1 -0
- package/realtime/translations/ws.mjs +439 -0
- package/realtime/translations/ws.mjs.map +1 -0
- package/resources/audio/speech.d.mts +1 -1
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +1 -1
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/transcriptions.d.mts +2 -1
- package/resources/audio/transcriptions.d.mts.map +1 -1
- package/resources/audio/transcriptions.d.ts +2 -1
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/beta/agents/agents.d.mts +12 -7
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +12 -7
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/agents/environments/templates.d.mts +6 -6
- package/resources/beta/agents/environments/templates.d.ts +6 -6
- package/resources/beta/agents/sessions/sessions.d.mts +4 -2
- package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.ts +4 -2
- package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/agents/sessions/sessions.js.map +1 -1
- package/resources/beta/agents/sessions/sessions.mjs.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.mts +24 -7
- package/resources/beta/agents/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.ts +24 -7
- package/resources/beta/agents/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/agents/vaults/credentials.js +2 -6
- package/resources/beta/agents/vaults/credentials.js.map +1 -1
- package/resources/beta/agents/vaults/credentials.mjs +2 -6
- package/resources/beta/agents/vaults/credentials.mjs.map +1 -1
- package/resources/beta/responses/responses.d.mts +69 -10
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +69 -10
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/files.d.mts +2 -2
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +2 -2
- package/resources/files.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/live/forks/ws-base.js +1 -1
- package/resources/live/forks/ws-base.js.map +1 -1
- package/resources/live/forks/ws-base.mjs +1 -1
- package/resources/live/forks/ws-base.mjs.map +1 -1
- package/resources/live/sideband/ws-base.js +1 -1
- package/resources/live/sideband/ws-base.js.map +1 -1
- package/resources/live/sideband/ws-base.mjs +1 -1
- package/resources/live/sideband/ws-base.mjs.map +1 -1
- package/resources/live/ws-base.js +1 -1
- package/resources/live/ws-base.js.map +1 -1
- package/resources/live/ws-base.mjs +1 -1
- package/resources/live/ws-base.mjs.map +1 -1
- package/resources/realtime/index.d.mts +1 -0
- package/resources/realtime/index.d.mts.map +1 -1
- package/resources/realtime/index.d.ts +1 -0
- package/resources/realtime/index.d.ts.map +1 -1
- package/resources/realtime/index.js +3 -1
- package/resources/realtime/index.js.map +1 -1
- package/resources/realtime/index.mjs +1 -0
- package/resources/realtime/index.mjs.map +1 -1
- package/resources/realtime/realtime.d.mts +4 -0
- package/resources/realtime/realtime.d.mts.map +1 -1
- package/resources/realtime/realtime.d.ts +4 -0
- package/resources/realtime/realtime.d.ts.map +1 -1
- package/resources/realtime/realtime.js +4 -0
- package/resources/realtime/realtime.js.map +1 -1
- package/resources/realtime/realtime.mjs +4 -0
- package/resources/realtime/realtime.mjs.map +1 -1
- package/resources/realtime/translations/client-secrets.d.mts +67 -0
- package/resources/realtime/translations/client-secrets.d.mts.map +1 -0
- package/resources/realtime/translations/client-secrets.d.ts +67 -0
- package/resources/realtime/translations/client-secrets.d.ts.map +1 -0
- package/resources/realtime/translations/client-secrets.js +39 -0
- package/resources/realtime/translations/client-secrets.js.map +1 -0
- package/resources/realtime/translations/client-secrets.mjs +35 -0
- package/resources/realtime/translations/client-secrets.mjs.map +1 -0
- package/resources/realtime/translations/index.d.mts +3 -0
- package/resources/realtime/translations/index.d.mts.map +1 -0
- package/resources/realtime/translations/index.d.ts +3 -0
- package/resources/realtime/translations/index.d.ts.map +1 -0
- package/resources/realtime/translations/index.js +9 -0
- package/resources/realtime/translations/index.js.map +1 -0
- package/resources/realtime/translations/index.mjs +4 -0
- package/resources/realtime/translations/index.mjs.map +1 -0
- package/resources/realtime/translations/translations.d.mts +10 -0
- package/resources/realtime/translations/translations.d.mts.map +1 -0
- package/resources/realtime/translations/translations.d.ts +10 -0
- package/resources/realtime/translations/translations.d.ts.map +1 -0
- package/resources/realtime/translations/translations.js +17 -0
- package/resources/realtime/translations/translations.js.map +1 -0
- package/resources/realtime/translations/translations.mjs +12 -0
- package/resources/realtime/translations/translations.mjs.map +1 -0
- package/resources/realtime/translations.d.mts +2 -0
- package/resources/realtime/translations.d.mts.map +1 -0
- package/resources/realtime/translations.d.ts +2 -0
- package/resources/realtime/translations.d.ts.map +1 -0
- package/resources/realtime/translations.js +6 -0
- package/resources/realtime/translations.js.map +1 -0
- package/resources/realtime/translations.mjs +3 -0
- package/resources/realtime/translations.mjs.map +1 -0
- package/resources/responses/responses.d.mts +66 -7
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +66 -7
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.mts +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +42 -6
- package/src/internal/responses/canonical-output-text.ts +30 -5
- package/src/internal/responses/response-accumulator.ts +155 -56
- package/src/internal/ws.ts +5 -3
- package/src/lib/live/transcript-grouping.ts +6 -5
- package/src/lib/responses/responses-websocket-accumulator.ts +374 -0
- package/src/realtime/translations/ws.ts +539 -0
- package/src/resources/audio/speech.ts +3 -0
- package/src/resources/audio/transcriptions.ts +2 -1
- package/src/resources/beta/agents/agents.ts +13 -6
- package/src/resources/beta/agents/environments/templates.ts +6 -6
- package/src/resources/beta/agents/sessions/sessions.ts +4 -2
- package/src/resources/beta/agents/vaults/credentials.ts +21 -7
- package/src/resources/beta/responses/responses.ts +75 -6
- package/src/resources/files.ts +3 -3
- package/src/resources/index.ts +1 -1
- package/src/resources/live/forks/ws-base.ts +1 -1
- package/src/resources/live/sideband/ws-base.ts +1 -1
- package/src/resources/live/ws-base.ts +1 -1
- package/src/resources/realtime/api.md +8 -0
- package/src/resources/realtime/index.ts +1 -0
- package/src/resources/realtime/realtime.ts +6 -0
- package/src/resources/realtime/translations/client-secrets.ts +93 -0
- package/src/resources/realtime/translations/index.ts +4 -0
- package/src/resources/realtime/translations/translations.ts +15 -0
- package/src/resources/realtime/translations.ts +3 -0
- package/src/resources/responses/responses.ts +72 -6
- package/src/resources/shared.ts +1 -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
|
@@ -473,8 +473,9 @@ export namespace SessionCreateParams {
|
|
|
473
473
|
* - `flex` - Uses the flex service tier.
|
|
474
474
|
* - `priority` - Uses the priority service tier.
|
|
475
475
|
* - `fast` - Uses the fast service tier.
|
|
476
|
+
* - `ultrafast` - Uses the ultrafast service tier.
|
|
476
477
|
*/
|
|
477
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | null;
|
|
478
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | 'ultrafast' | null;
|
|
478
479
|
|
|
479
480
|
/**
|
|
480
481
|
* Configuration for text generated by the agent.
|
|
@@ -542,8 +543,9 @@ export namespace SessionUpdateParams {
|
|
|
542
543
|
* - `flex` - Uses the flex service tier.
|
|
543
544
|
* - `priority` - Uses the priority service tier.
|
|
544
545
|
* - `fast` - Uses the fast service tier.
|
|
546
|
+
* - `ultrafast` - Uses the ultrafast service tier.
|
|
545
547
|
*/
|
|
546
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | null;
|
|
548
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | 'ultrafast' | null;
|
|
547
549
|
}
|
|
548
550
|
|
|
549
551
|
export namespace Agent {
|
|
@@ -187,8 +187,7 @@ export class Credentials extends APIResource {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
*
|
|
191
|
-
* metadata. See
|
|
190
|
+
* Updates credential metadata or rotates its write-only secret. See
|
|
192
191
|
* [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).
|
|
193
192
|
*
|
|
194
193
|
* @example
|
|
@@ -196,10 +195,7 @@ export class Credentials extends APIResource {
|
|
|
196
195
|
* const credential =
|
|
197
196
|
* await client.beta.agents.vaults.credentials.update(
|
|
198
197
|
* 'credential_id',
|
|
199
|
-
* {
|
|
200
|
-
* vault_id: 'vault_id',
|
|
201
|
-
* auth: { type: 'mcp_oauth' },
|
|
202
|
-
* },
|
|
198
|
+
* { vault_id: 'vault_id', metadata: {} },
|
|
203
199
|
* );
|
|
204
200
|
* ```
|
|
205
201
|
*/
|
|
@@ -397,6 +393,11 @@ export interface Credential {
|
|
|
397
393
|
*/
|
|
398
394
|
created_at: number;
|
|
399
395
|
|
|
396
|
+
/**
|
|
397
|
+
* Application-defined key-value pairs associated with this credential.
|
|
398
|
+
*/
|
|
399
|
+
metadata: { [key: string]: string };
|
|
400
|
+
|
|
400
401
|
/**
|
|
401
402
|
* The human-readable name of the credential.
|
|
402
403
|
*/
|
|
@@ -1002,6 +1003,12 @@ export interface CredentialCreateParams {
|
|
|
1002
1003
|
* trimming.
|
|
1003
1004
|
*/
|
|
1004
1005
|
name: string;
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
1009
|
+
* characters. Defaults to an empty map.
|
|
1010
|
+
*/
|
|
1011
|
+
metadata?: { [key: string]: string };
|
|
1005
1012
|
}
|
|
1006
1013
|
|
|
1007
1014
|
export interface CredentialRetrieveParams {
|
|
@@ -1021,7 +1028,14 @@ export interface CredentialUpdateParams {
|
|
|
1021
1028
|
* Body param: Replacement values for the credential's existing authentication
|
|
1022
1029
|
* method.
|
|
1023
1030
|
*/
|
|
1024
|
-
auth
|
|
1031
|
+
auth?: CredentialAuthRotateParam;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Body param: Replaces all metadata. Omit to preserve it, or pass {} to clear it.
|
|
1035
|
+
* Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
1036
|
+
* characters.
|
|
1037
|
+
*/
|
|
1038
|
+
metadata?: { [key: string]: string };
|
|
1025
1039
|
}
|
|
1026
1040
|
|
|
1027
1041
|
export interface CredentialListParams extends Omit<CursorPageParams, 'limit'> {
|
|
@@ -1376,6 +1376,8 @@ export interface BetaResponse {
|
|
|
1376
1376
|
*/
|
|
1377
1377
|
id: string;
|
|
1378
1378
|
|
|
1379
|
+
access_programs: BetaResponse.AccessPrograms | null;
|
|
1380
|
+
|
|
1379
1381
|
/**
|
|
1380
1382
|
* Unix timestamp (in seconds) of when this Response was created.
|
|
1381
1383
|
*/
|
|
@@ -1419,6 +1421,7 @@ export interface BetaResponse {
|
|
|
1419
1421
|
*/
|
|
1420
1422
|
model:
|
|
1421
1423
|
| 'gpt-6-astra'
|
|
1424
|
+
| 'gpt-6.1-sol'
|
|
1422
1425
|
| 'gpt-6-sol'
|
|
1423
1426
|
| 'gpt-6-luna'
|
|
1424
1427
|
| 'gpt-5.6-sol'
|
|
@@ -1799,6 +1802,13 @@ export interface BetaResponse {
|
|
|
1799
1802
|
}
|
|
1800
1803
|
|
|
1801
1804
|
export namespace BetaResponse {
|
|
1805
|
+
export interface AccessPrograms {
|
|
1806
|
+
/**
|
|
1807
|
+
* The effective Cyber access program used for this response.
|
|
1808
|
+
*/
|
|
1809
|
+
cyber: 'standard' | 'daybreak_blue' | 'daybreak_red';
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1802
1812
|
/**
|
|
1803
1813
|
* Details about why the response is incomplete.
|
|
1804
1814
|
*/
|
|
@@ -9461,7 +9471,7 @@ export namespace BetaResponseOutputText {
|
|
|
9461
9471
|
filename: string;
|
|
9462
9472
|
|
|
9463
9473
|
/**
|
|
9464
|
-
* The index
|
|
9474
|
+
* The index in the output text at which to insert the file citation.
|
|
9465
9475
|
*/
|
|
9466
9476
|
index: number;
|
|
9467
9477
|
|
|
@@ -9649,7 +9659,7 @@ export namespace BetaResponseOutputTextAnnotationAddedEvent {
|
|
|
9649
9659
|
filename: string;
|
|
9650
9660
|
|
|
9651
9661
|
/**
|
|
9652
|
-
* The index
|
|
9662
|
+
* The index in the output text at which to insert the file citation.
|
|
9653
9663
|
*/
|
|
9654
9664
|
index: number;
|
|
9655
9665
|
|
|
@@ -11904,6 +11914,11 @@ export namespace BetaResponsesClientEvent {
|
|
|
11904
11914
|
*/
|
|
11905
11915
|
type: 'response.create';
|
|
11906
11916
|
|
|
11917
|
+
/**
|
|
11918
|
+
* Domain-specific access programs to use for this request.
|
|
11919
|
+
*/
|
|
11920
|
+
access_programs?: ResponseCreate.AccessPrograms;
|
|
11921
|
+
|
|
11907
11922
|
/**
|
|
11908
11923
|
* Whether to run the model response in the background.
|
|
11909
11924
|
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
@@ -12001,6 +12016,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
12001
12016
|
*/
|
|
12002
12017
|
model?:
|
|
12003
12018
|
| 'gpt-6-astra'
|
|
12019
|
+
| 'gpt-6.1-sol'
|
|
12004
12020
|
| 'gpt-6-sol'
|
|
12005
12021
|
| 'gpt-6-luna'
|
|
12006
12022
|
| 'gpt-5.6-sol'
|
|
@@ -12354,6 +12370,25 @@ export namespace BetaResponsesClientEvent {
|
|
|
12354
12370
|
}
|
|
12355
12371
|
|
|
12356
12372
|
export namespace ResponseCreate {
|
|
12373
|
+
/**
|
|
12374
|
+
* Domain-specific access programs to use for this request.
|
|
12375
|
+
*/
|
|
12376
|
+
export interface AccessPrograms {
|
|
12377
|
+
/**
|
|
12378
|
+
* The Cyber access program to use for this request. Supported values are
|
|
12379
|
+
* `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
12380
|
+
* the program from the model's Cyber tier and your organization and project
|
|
12381
|
+
* access, subject to model-specific eligibility restrictions. By default, models
|
|
12382
|
+
* without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
12383
|
+
* authorized; otherwise they fall back to Standard unless the model requires
|
|
12384
|
+
* Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
12385
|
+
* Requests that require unavailable Daybreak access return 403. An implicit
|
|
12386
|
+
* Standard fallback is represented by null in the response's access_programs
|
|
12387
|
+
* field, rather than an explicit Standard selection.
|
|
12388
|
+
*/
|
|
12389
|
+
cyber?: 'standard' | 'daybreak_blue' | 'daybreak_red';
|
|
12390
|
+
}
|
|
12391
|
+
|
|
12357
12392
|
export interface ContextManagement {
|
|
12358
12393
|
/**
|
|
12359
12394
|
* The context management entry type. Currently only 'compaction' is supported.
|
|
@@ -14037,14 +14072,18 @@ export interface BetaWebSearchPreviewTool {
|
|
|
14037
14072
|
search_context_size?: 'low' | 'medium' | 'high';
|
|
14038
14073
|
|
|
14039
14074
|
/**
|
|
14040
|
-
* The
|
|
14075
|
+
* The approximate location of the user. If omitted or null, defaults to the United
|
|
14076
|
+
* States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
14077
|
+
* fields. To localize results, provide the relevant location fields.
|
|
14041
14078
|
*/
|
|
14042
14079
|
user_location?: BetaWebSearchPreviewTool.UserLocation | null;
|
|
14043
14080
|
}
|
|
14044
14081
|
|
|
14045
14082
|
export namespace BetaWebSearchPreviewTool {
|
|
14046
14083
|
/**
|
|
14047
|
-
* The
|
|
14084
|
+
* The approximate location of the user. If omitted or null, defaults to the United
|
|
14085
|
+
* States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
14086
|
+
* fields. To localize results, provide the relevant location fields.
|
|
14048
14087
|
*/
|
|
14049
14088
|
export interface UserLocation {
|
|
14050
14089
|
/**
|
|
@@ -14105,7 +14144,9 @@ export interface BetaWebSearchTool {
|
|
|
14105
14144
|
search_context_size?: 'low' | 'medium' | 'high';
|
|
14106
14145
|
|
|
14107
14146
|
/**
|
|
14108
|
-
* The approximate location of the user.
|
|
14147
|
+
* The approximate location of the user. If omitted or null, defaults to the United
|
|
14148
|
+
* States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
14149
|
+
* fields. To localize results, provide the relevant location fields.
|
|
14109
14150
|
*/
|
|
14110
14151
|
user_location?: BetaWebSearchTool.UserLocation | null;
|
|
14111
14152
|
}
|
|
@@ -14125,7 +14166,9 @@ export namespace BetaWebSearchTool {
|
|
|
14125
14166
|
}
|
|
14126
14167
|
|
|
14127
14168
|
/**
|
|
14128
|
-
* The approximate location of the user.
|
|
14169
|
+
* The approximate location of the user. If omitted or null, defaults to the United
|
|
14170
|
+
* States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
14171
|
+
* fields. To localize results, provide the relevant location fields.
|
|
14129
14172
|
*/
|
|
14130
14173
|
export interface UserLocation {
|
|
14131
14174
|
/**
|
|
@@ -14160,6 +14203,11 @@ export namespace BetaWebSearchTool {
|
|
|
14160
14203
|
export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming;
|
|
14161
14204
|
|
|
14162
14205
|
export interface ResponseCreateParamsBase {
|
|
14206
|
+
/**
|
|
14207
|
+
* Body param: Domain-specific access programs to use for this request.
|
|
14208
|
+
*/
|
|
14209
|
+
access_programs?: ResponseCreateParams.AccessPrograms;
|
|
14210
|
+
|
|
14163
14211
|
/**
|
|
14164
14212
|
* Body param: Whether to run the model response in the background.
|
|
14165
14213
|
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
@@ -14258,6 +14306,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14258
14306
|
*/
|
|
14259
14307
|
model?:
|
|
14260
14308
|
| 'gpt-6-astra'
|
|
14309
|
+
| 'gpt-6.1-sol'
|
|
14261
14310
|
| 'gpt-6-sol'
|
|
14262
14311
|
| 'gpt-6-luna'
|
|
14263
14312
|
| 'gpt-5.6-sol'
|
|
@@ -14612,6 +14661,25 @@ export interface ResponseCreateParamsBase {
|
|
|
14612
14661
|
}
|
|
14613
14662
|
|
|
14614
14663
|
export namespace ResponseCreateParams {
|
|
14664
|
+
/**
|
|
14665
|
+
* Domain-specific access programs to use for this request.
|
|
14666
|
+
*/
|
|
14667
|
+
export interface AccessPrograms {
|
|
14668
|
+
/**
|
|
14669
|
+
* The Cyber access program to use for this request. Supported values are
|
|
14670
|
+
* `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
14671
|
+
* the program from the model's Cyber tier and your organization and project
|
|
14672
|
+
* access, subject to model-specific eligibility restrictions. By default, models
|
|
14673
|
+
* without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
14674
|
+
* authorized; otherwise they fall back to Standard unless the model requires
|
|
14675
|
+
* Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
14676
|
+
* Requests that require unavailable Daybreak access return 403. An implicit
|
|
14677
|
+
* Standard fallback is represented by null in the response's access_programs
|
|
14678
|
+
* field, rather than an explicit Standard selection.
|
|
14679
|
+
*/
|
|
14680
|
+
cyber?: 'standard' | 'daybreak_blue' | 'daybreak_red';
|
|
14681
|
+
}
|
|
14682
|
+
|
|
14615
14683
|
export interface ContextManagement {
|
|
14616
14684
|
/**
|
|
14617
14685
|
* The context management entry type. Currently only 'compaction' is supported.
|
|
@@ -14931,6 +14999,7 @@ export interface ResponseCompactParams {
|
|
|
14931
14999
|
*/
|
|
14932
15000
|
model:
|
|
14933
15001
|
| 'gpt-6-astra'
|
|
15002
|
+
| 'gpt-6.1-sol'
|
|
14934
15003
|
| 'gpt-6-sol'
|
|
14935
15004
|
| 'gpt-6-luna'
|
|
14936
15005
|
| 'gpt-5.6-sol'
|
package/src/resources/files.ts
CHANGED
|
@@ -324,8 +324,6 @@ export class Files extends APIResource {
|
|
|
324
324
|
|
|
325
325
|
export type FileObjectsPage = CursorPage<FileObject>;
|
|
326
326
|
|
|
327
|
-
export type FileContent = string;
|
|
328
|
-
|
|
329
327
|
export interface FileDeleted {
|
|
330
328
|
id: string;
|
|
331
329
|
|
|
@@ -408,6 +406,8 @@ export interface FileObject {
|
|
|
408
406
|
*/
|
|
409
407
|
export type FilePurpose = 'assistants' | 'batch' | 'fine-tune' | 'vision' | 'user_data' | 'evals';
|
|
410
408
|
|
|
409
|
+
export type FileContent = string;
|
|
410
|
+
|
|
411
411
|
export interface FileCreateParams {
|
|
412
412
|
/**
|
|
413
413
|
* The File object (not file name) to be uploaded.
|
|
@@ -468,10 +468,10 @@ export interface FileListParams extends CursorPageParams {
|
|
|
468
468
|
|
|
469
469
|
export declare namespace Files {
|
|
470
470
|
export {
|
|
471
|
-
type FileContent as FileContent,
|
|
472
471
|
type FileDeleted as FileDeleted,
|
|
473
472
|
type FileObject as FileObject,
|
|
474
473
|
type FilePurpose as FilePurpose,
|
|
474
|
+
type FileContent as FileContent,
|
|
475
475
|
type FileObjectsPage as FileObjectsPage,
|
|
476
476
|
type FileCreateParams as FileCreateParams,
|
|
477
477
|
type FileListParams as FileListParams,
|
package/src/resources/index.ts
CHANGED
|
@@ -671,7 +671,7 @@ export abstract class ForksWSBase<TSocket extends WebSocketLike> extends ForksEm
|
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
try {
|
|
674
|
-
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)));
|
|
674
|
+
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)), { requeueFailed: false });
|
|
675
675
|
} catch (err) {
|
|
676
676
|
this._onError(null, 'could not send queued data', err);
|
|
677
677
|
}
|
|
@@ -681,7 +681,7 @@ export abstract class SidebandWSBase<TSocket extends WebSocketLike> extends Side
|
|
|
681
681
|
}
|
|
682
682
|
|
|
683
683
|
try {
|
|
684
|
-
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)));
|
|
684
|
+
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)), { requeueFailed: false });
|
|
685
685
|
} catch (err) {
|
|
686
686
|
this._onError(null, 'could not send queued data', err);
|
|
687
687
|
}
|
|
@@ -667,7 +667,7 @@ export abstract class LiveWSBase<TSocket extends WebSocketLike> extends LiveEmit
|
|
|
667
667
|
}
|
|
668
668
|
|
|
669
669
|
try {
|
|
670
|
-
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)));
|
|
670
|
+
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)), { requeueFailed: false });
|
|
671
671
|
} catch (err) {
|
|
672
672
|
this._onError(null, 'could not send queued data', err);
|
|
673
673
|
}
|
|
@@ -144,3 +144,11 @@ Methods:
|
|
|
144
144
|
- <code title="post /realtime/calls/{call_id}/hangup">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">hangup</a>(callID) -> void</code>
|
|
145
145
|
- <code title="post /realtime/calls/{call_id}/refer">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">refer</a>(callID, { ...params }) -> void</code>
|
|
146
146
|
- <code title="post /realtime/calls/{call_id}/reject">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">reject</a>(callID, { ...params }) -> void</code>
|
|
147
|
+
|
|
148
|
+
## Translations
|
|
149
|
+
|
|
150
|
+
### ClientSecrets
|
|
151
|
+
|
|
152
|
+
Methods:
|
|
153
|
+
|
|
154
|
+
- <code title="post /realtime/translations/client_secrets">client.realtime.translations.clientSecrets.<a href="./src/resources/realtime/translations/client-secrets.ts">create</a>({ ...params }) -> RealtimeTranslationClientSecretCreateResponse</code>
|
|
@@ -16,10 +16,13 @@ import {
|
|
|
16
16
|
RealtimeTranscriptionSessionTurnDetection,
|
|
17
17
|
} from './client-secrets';
|
|
18
18
|
import * as ResponsesAPI from '../responses/responses';
|
|
19
|
+
import * as TranslationsAPI from './translations/translations';
|
|
20
|
+
import { Translations } from './translations/translations';
|
|
19
21
|
|
|
20
22
|
export class Realtime extends APIResource {
|
|
21
23
|
clientSecrets: ClientSecretsAPI.ClientSecrets = new ClientSecretsAPI.ClientSecrets(this._client);
|
|
22
24
|
calls: CallsAPI.Calls = new CallsAPI.Calls(this._client);
|
|
25
|
+
translations: TranslationsAPI.Translations = new TranslationsAPI.Translations(this._client);
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export interface AudioTranscription {
|
|
@@ -5444,6 +5447,7 @@ export namespace TranscriptionSessionUpdatedEvent {
|
|
|
5444
5447
|
|
|
5445
5448
|
Realtime.ClientSecrets = ClientSecrets;
|
|
5446
5449
|
Realtime.Calls = Calls;
|
|
5450
|
+
Realtime.Translations = Translations;
|
|
5447
5451
|
|
|
5448
5452
|
export declare namespace Realtime {
|
|
5449
5453
|
export {
|
|
@@ -5584,4 +5588,6 @@ export declare namespace Realtime {
|
|
|
5584
5588
|
type CallReferParams as CallReferParams,
|
|
5585
5589
|
type CallRejectParams as CallRejectParams,
|
|
5586
5590
|
};
|
|
5591
|
+
|
|
5592
|
+
export { Translations as Translations };
|
|
5587
5593
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as RealtimeAPI from '../realtime';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
|
|
8
|
+
function resolveResourceRequestOptions(
|
|
9
|
+
options: RequestOptions | undefined,
|
|
10
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
11
|
+
): Promise<RequestOptions> {
|
|
12
|
+
return Promise.resolve(options).then(buildOptions);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class ClientSecrets extends APIResource {
|
|
16
|
+
/**
|
|
17
|
+
* Create a Realtime translation client secret with an associated translation
|
|
18
|
+
* session configuration.
|
|
19
|
+
*
|
|
20
|
+
* Client secrets are short-lived tokens that can be passed to a client app, such
|
|
21
|
+
* as a web frontend or mobile client, which grants access to the Realtime
|
|
22
|
+
* Translation API without leaking your main API key. You can configure a custom
|
|
23
|
+
* TTL for each client secret.
|
|
24
|
+
*
|
|
25
|
+
* Returns the created client secret and the effective translation session object.
|
|
26
|
+
* The client secret is a string that looks like `ek_1234`.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const realtimeTranslationClientSecretCreateResponse =
|
|
31
|
+
* await client.realtime.translations.clientSecrets.create(
|
|
32
|
+
* { session: { model: 'model' } },
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
create(
|
|
37
|
+
body: ClientSecretCreateParams,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<RealtimeAPI.RealtimeTranslationClientSecretCreateResponse> {
|
|
40
|
+
return this._client.post(
|
|
41
|
+
'/realtime/translations/client_secrets',
|
|
42
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
43
|
+
body,
|
|
44
|
+
...options,
|
|
45
|
+
__security: { bearerAuth: true },
|
|
46
|
+
})),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ClientSecretCreateParams {
|
|
52
|
+
/**
|
|
53
|
+
* Realtime translation session configuration. Translation sessions stream source
|
|
54
|
+
* audio in and translated audio plus transcript deltas out continuously.
|
|
55
|
+
*/
|
|
56
|
+
session: RealtimeAPI.RealtimeTranslationSessionCreateRequest;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for the client secret expiration. Expiration refers to the time
|
|
60
|
+
* after which a client secret will no longer be valid for creating sessions. The
|
|
61
|
+
* session itself may continue after that time once started. A secret can be used
|
|
62
|
+
* to create multiple sessions until it expires.
|
|
63
|
+
*/
|
|
64
|
+
expires_after?: ClientSecretCreateParams.ExpiresAfter;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export namespace ClientSecretCreateParams {
|
|
68
|
+
/**
|
|
69
|
+
* Configuration for the client secret expiration. Expiration refers to the time
|
|
70
|
+
* after which a client secret will no longer be valid for creating sessions. The
|
|
71
|
+
* session itself may continue after that time once started. A secret can be used
|
|
72
|
+
* to create multiple sessions until it expires.
|
|
73
|
+
*/
|
|
74
|
+
export interface ExpiresAfter {
|
|
75
|
+
/**
|
|
76
|
+
* The anchor point for the client secret expiration, meaning that `seconds` will
|
|
77
|
+
* be added to the `created_at` time of the client secret to produce an expiration
|
|
78
|
+
* timestamp. Only `created_at` is currently supported.
|
|
79
|
+
*/
|
|
80
|
+
anchor?: 'created_at';
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The number of seconds from the anchor point to the expiration. Select a value
|
|
84
|
+
* between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if
|
|
85
|
+
* not specified.
|
|
86
|
+
*/
|
|
87
|
+
seconds?: number;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare namespace ClientSecrets {
|
|
92
|
+
export { type ClientSecretCreateParams as ClientSecretCreateParams };
|
|
93
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as ClientSecretsAPI from './client-secrets';
|
|
5
|
+
import { ClientSecretCreateParams, ClientSecrets } from './client-secrets';
|
|
6
|
+
|
|
7
|
+
export class Translations extends APIResource {
|
|
8
|
+
clientSecrets: ClientSecretsAPI.ClientSecrets = new ClientSecretsAPI.ClientSecrets(this._client);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Translations.ClientSecrets = ClientSecrets;
|
|
12
|
+
|
|
13
|
+
export declare namespace Translations {
|
|
14
|
+
export { ClientSecrets as ClientSecrets, type ClientSecretCreateParams as ClientSecretCreateParams };
|
|
15
|
+
}
|