openai 7.27.0 → 7.30.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 +23 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/helpers/standard-schema.d.mts +8 -3
- package/helpers/standard-schema.d.mts.map +1 -1
- package/helpers/standard-schema.d.ts +8 -3
- package/helpers/standard-schema.d.ts.map +1 -1
- package/helpers/standard-schema.js +1 -0
- package/helpers/standard-schema.js.map +1 -1
- package/helpers/standard-schema.mjs +1 -0
- package/helpers/standard-schema.mjs.map +1 -1
- package/helpers/zod.d.mts +2 -0
- package/helpers/zod.d.mts.map +1 -1
- package/helpers/zod.d.ts +2 -0
- package/helpers/zod.d.ts.map +1 -1
- package/helpers/zod.js +1 -0
- package/helpers/zod.js.map +1 -1
- package/helpers/zod.mjs +1 -0
- package/helpers/zod.mjs.map +1 -1
- package/lib/ChatCompletionStream.d.mts +2 -1
- package/lib/ChatCompletionStream.d.mts.map +1 -1
- package/lib/ChatCompletionStream.d.ts +2 -1
- package/lib/ChatCompletionStream.d.ts.map +1 -1
- package/lib/ChatCompletionStream.js +9 -2
- package/lib/ChatCompletionStream.js.map +1 -1
- package/lib/ChatCompletionStream.mjs +9 -2
- package/lib/ChatCompletionStream.mjs.map +1 -1
- package/lib/ResponsesParser.d.mts.map +1 -1
- package/lib/ResponsesParser.d.ts.map +1 -1
- package/lib/ResponsesParser.js +5 -0
- package/lib/ResponsesParser.js.map +1 -1
- package/lib/ResponsesParser.mjs +5 -0
- package/lib/ResponsesParser.mjs.map +1 -1
- package/lib/agents/agent-session-stream.d.mts +7 -0
- package/lib/agents/agent-session-stream.d.mts.map +1 -1
- package/lib/agents/agent-session-stream.d.ts +7 -0
- package/lib/agents/agent-session-stream.d.ts.map +1 -1
- package/lib/agents/agent-session-stream.js +8 -110
- package/lib/agents/agent-session-stream.js.map +1 -1
- package/lib/agents/agent-session-stream.mjs +9 -111
- package/lib/agents/agent-session-stream.mjs.map +1 -1
- package/lib/beta/agents/agent-session-create-stream.d.mts +41 -1
- package/lib/beta/agents/agent-session-create-stream.d.mts.map +1 -1
- package/lib/beta/agents/agent-session-create-stream.d.ts +41 -1
- package/lib/beta/agents/agent-session-create-stream.d.ts.map +1 -1
- package/lib/beta/agents/agent-session-create-stream.js +70 -2
- package/lib/beta/agents/agent-session-create-stream.js.map +1 -1
- package/lib/beta/agents/agent-session-create-stream.mjs +69 -2
- package/lib/beta/agents/agent-session-create-stream.mjs.map +1 -1
- package/lib/beta/agents/function-tool.d.mts.map +1 -1
- package/lib/beta/agents/function-tool.d.ts.map +1 -1
- package/lib/beta/agents/function-tool.js +22 -15
- package/lib/beta/agents/function-tool.js.map +1 -1
- package/lib/beta/agents/function-tool.mjs +22 -15
- package/lib/beta/agents/function-tool.mjs.map +1 -1
- package/lib/beta/agents/parse-result.d.mts +4 -2
- package/lib/beta/agents/parse-result.d.mts.map +1 -1
- package/lib/beta/agents/parse-result.d.ts +4 -2
- package/lib/beta/agents/parse-result.d.ts.map +1 -1
- package/lib/beta/agents/tool-dispatcher.d.mts +13 -0
- package/lib/beta/agents/tool-dispatcher.d.mts.map +1 -0
- package/lib/beta/agents/tool-dispatcher.d.ts +13 -0
- package/lib/beta/agents/tool-dispatcher.d.ts.map +1 -0
- package/lib/beta/agents/tool-dispatcher.js +185 -0
- package/lib/beta/agents/tool-dispatcher.js.map +1 -0
- package/lib/beta/agents/tool-dispatcher.mjs +181 -0
- package/lib/beta/agents/tool-dispatcher.mjs.map +1 -0
- package/lib/beta/agents/tool-error.d.mts +13 -0
- package/lib/beta/agents/tool-error.d.mts.map +1 -0
- package/lib/beta/agents/tool-error.d.ts +13 -0
- package/lib/beta/agents/tool-error.d.ts.map +1 -0
- package/lib/beta/agents/tool-error.js +3 -0
- package/lib/beta/agents/tool-error.js.map +1 -0
- package/lib/beta/agents/tool-error.mjs +2 -0
- package/lib/beta/agents/tool-error.mjs.map +1 -0
- package/lib/beta/agents/tool-stages.d.mts +12 -0
- package/lib/beta/agents/tool-stages.d.mts.map +1 -0
- package/lib/beta/agents/tool-stages.d.ts +12 -0
- package/lib/beta/agents/tool-stages.d.ts.map +1 -0
- package/lib/beta/agents/tool-stages.js +6 -0
- package/lib/beta/agents/tool-stages.js.map +1 -0
- package/lib/beta/agents/tool-stages.mjs +3 -0
- package/lib/beta/agents/tool-stages.mjs.map +1 -0
- package/lib/chat-completions/streaming.d.mts +11 -0
- package/lib/chat-completions/streaming.d.mts.map +1 -0
- package/lib/chat-completions/streaming.d.ts +11 -0
- package/lib/chat-completions/streaming.d.ts.map +1 -0
- package/lib/chat-completions/streaming.js +27 -0
- package/lib/chat-completions/streaming.js.map +1 -0
- package/lib/chat-completions/streaming.mjs +23 -0
- package/lib/chat-completions/streaming.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/admin/organization/usage.d.mts +381 -20
- package/resources/admin/organization/usage.d.mts.map +1 -1
- package/resources/admin/organization/usage.d.ts +381 -20
- package/resources/admin/organization/usage.d.ts.map +1 -1
- package/resources/audio/audio.d.mts +4 -0
- package/resources/audio/audio.d.mts.map +1 -1
- package/resources/audio/audio.d.ts +4 -0
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js +4 -0
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs +4 -0
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/index.d.mts +1 -0
- package/resources/audio/index.d.mts.map +1 -1
- package/resources/audio/index.d.ts +1 -0
- package/resources/audio/index.d.ts.map +1 -1
- package/resources/audio/index.js +3 -1
- package/resources/audio/index.js.map +1 -1
- package/resources/audio/index.mjs +1 -0
- package/resources/audio/index.mjs.map +1 -1
- package/resources/audio/speech.d.mts +2 -0
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +2 -0
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/voices.d.mts +119 -0
- package/resources/audio/voices.d.mts.map +1 -0
- package/resources/audio/voices.d.ts +119 -0
- package/resources/audio/voices.d.ts.map +1 -0
- package/resources/audio/voices.js +41 -0
- package/resources/audio/voices.js.map +1 -0
- package/resources/audio/voices.mjs +37 -0
- package/resources/audio/voices.mjs.map +1 -0
- package/resources/beta/agents/agents.d.mts +14 -10
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +14 -10
- 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 -8
- package/resources/beta/agents/environments/templates.d.mts.map +1 -1
- package/resources/beta/agents/environments/templates.d.ts +6 -8
- package/resources/beta/agents/environments/templates.d.ts.map +1 -1
- package/resources/beta/agents/sessions/index.d.mts +1 -1
- package/resources/beta/agents/sessions/index.d.mts.map +1 -1
- package/resources/beta/agents/sessions/index.d.ts +1 -1
- package/resources/beta/agents/sessions/index.d.ts.map +1 -1
- package/resources/beta/agents/sessions/index.js +2 -2
- package/resources/beta/agents/sessions/index.js.map +1 -1
- package/resources/beta/agents/sessions/index.mjs +1 -1
- package/resources/beta/agents/sessions/index.mjs.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.mts +8 -7
- package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.ts +8 -7
- package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/agents/sessions/sessions.js +7 -4
- package/resources/beta/agents/sessions/sessions.js.map +1 -1
- package/resources/beta/agents/sessions/sessions.mjs +8 -5
- package/resources/beta/agents/sessions/sessions.mjs.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/turns.d.mts +2 -2
- package/resources/beta/agents/sessions/subagents/turns/turns.d.mts.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/turns.d.ts +2 -2
- package/resources/beta/agents/sessions/subagents/turns/turns.d.ts.map +1 -1
- package/resources/beta/agents/sessions/turns/index.d.mts +3 -0
- package/resources/beta/agents/sessions/turns/index.d.mts.map +1 -0
- package/resources/beta/agents/sessions/turns/index.d.ts +3 -0
- package/resources/beta/agents/sessions/turns/index.d.ts.map +1 -0
- package/resources/beta/agents/sessions/turns/index.js +9 -0
- package/resources/beta/agents/sessions/turns/index.js.map +1 -0
- package/resources/beta/agents/sessions/turns/index.mjs +4 -0
- package/resources/beta/agents/sessions/turns/index.mjs.map +1 -0
- package/resources/beta/agents/sessions/turns/items.d.mts +43 -0
- package/resources/beta/agents/sessions/turns/items.d.mts.map +1 -0
- package/resources/beta/agents/sessions/turns/items.d.ts +43 -0
- package/resources/beta/agents/sessions/turns/items.d.ts.map +1 -0
- package/resources/beta/agents/sessions/turns/items.js +40 -0
- package/resources/beta/agents/sessions/turns/items.js.map +1 -0
- package/resources/beta/agents/sessions/turns/items.mjs +36 -0
- package/resources/beta/agents/sessions/turns/items.mjs.map +1 -0
- package/resources/beta/agents/sessions/turns/turns.d.mts +128 -0
- package/resources/beta/agents/sessions/turns/turns.d.mts.map +1 -0
- package/resources/beta/agents/sessions/turns/turns.d.ts +128 -0
- package/resources/beta/agents/sessions/turns/turns.d.ts.map +1 -0
- package/resources/beta/agents/sessions/turns/turns.js +111 -0
- package/resources/beta/agents/sessions/turns/turns.js.map +1 -0
- package/resources/beta/agents/sessions/turns/turns.mjs +106 -0
- package/resources/beta/agents/sessions/turns/turns.mjs.map +1 -0
- package/resources/beta/agents/sessions/turns.d.mts +1 -123
- package/resources/beta/agents/sessions/turns.d.mts.map +1 -1
- package/resources/beta/agents/sessions/turns.d.ts +1 -123
- package/resources/beta/agents/sessions/turns.d.ts.map +1 -1
- package/resources/beta/agents/sessions/turns.js +2 -99
- package/resources/beta/agents/sessions/turns.js.map +1 -1
- package/resources/beta/agents/sessions/turns.mjs +1 -97
- package/resources/beta/agents/sessions/turns.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/responses/index.d.mts +1 -1
- package/resources/beta/responses/index.d.mts.map +1 -1
- package/resources/beta/responses/index.d.ts +1 -1
- package/resources/beta/responses/index.d.ts.map +1 -1
- package/resources/beta/responses/index.js.map +1 -1
- package/resources/beta/responses/index.mjs.map +1 -1
- package/resources/beta/responses/responses.d.mts +379 -9
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +379 -9
- 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/chat/completions/completions.d.mts +44 -9
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +44 -9
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js +5 -2
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs +5 -2
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/completions.d.mts +1 -1
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +1 -1
- package/resources/completions.d.ts.map +1 -1
- package/resources/decisions.d.mts +196 -0
- package/resources/decisions.d.mts.map +1 -0
- package/resources/decisions.d.ts +196 -0
- package/resources/decisions.d.ts.map +1 -0
- package/resources/decisions.js +32 -0
- package/resources/decisions.js.map +1 -0
- package/resources/decisions.mjs +28 -0
- package/resources/decisions.mjs.map +1 -0
- package/resources/fine-tuning/jobs/jobs.d.mts +7 -2
- package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +7 -2
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/graders/grader-models.d.mts +1 -1
- package/resources/graders/grader-models.d.ts +1 -1
- package/resources/images.d.mts +61 -75
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts +61 -75
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +4 -7
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +4 -7
- package/resources/images.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/realtime/realtime.d.mts +16 -4
- package/resources/realtime/realtime.d.mts.map +1 -1
- package/resources/realtime/realtime.d.ts +16 -4
- package/resources/realtime/realtime.d.ts.map +1 -1
- package/resources/realtime/realtime.js.map +1 -1
- package/resources/realtime/realtime.mjs.map +1 -1
- package/resources/responses/responses.d.mts +381 -9
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +381 -9
- 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 +69 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +69 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/videos.d.mts +5 -0
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +5 -0
- package/resources/videos.d.ts.map +1 -1
- package/resources/webhooks/webhooks.d.mts +211 -6
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +211 -6
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +21 -0
- package/src/helpers/standard-schema.ts +11 -4
- package/src/helpers/zod.ts +4 -0
- package/src/lib/ChatCompletionStream.ts +10 -3
- package/src/lib/ResponsesParser.ts +8 -0
- package/src/lib/agents/agent-session-stream.ts +20 -124
- package/src/lib/beta/agents/agent-session-create-stream.ts +87 -1
- package/src/lib/beta/agents/function-tool.ts +23 -15
- package/src/lib/beta/agents/tool-dispatcher.ts +226 -0
- package/src/lib/beta/agents/tool-error.ts +12 -0
- package/src/lib/beta/agents/tool-stages.ts +14 -0
- package/src/lib/chat-completions/streaming.ts +35 -0
- package/src/resources/admin/organization/usage.ts +438 -20
- package/src/resources/audio/audio.ts +6 -0
- package/src/resources/audio/index.ts +1 -0
- package/src/resources/audio/speech.ts +2 -0
- package/src/resources/audio/voices.ts +152 -0
- package/src/resources/beta/agents/agents.ts +16 -9
- package/src/resources/beta/agents/environments/templates.ts +6 -8
- package/src/resources/beta/agents/sessions/index.ts +7 -1
- package/src/resources/beta/agents/sessions/sessions.ts +18 -8
- package/src/resources/beta/agents/sessions/subagents/turns/turns.ts +2 -2
- package/src/resources/beta/agents/sessions/turns/index.ts +4 -0
- package/src/resources/beta/agents/sessions/turns/items.ts +79 -0
- package/src/resources/beta/agents/sessions/turns/turns.ts +383 -0
- package/src/resources/beta/agents/sessions/turns.ts +1 -373
- package/src/resources/beta/beta.ts +2 -0
- package/src/resources/beta/index.ts +1 -0
- package/src/resources/beta/responses/index.ts +1 -0
- package/src/resources/beta/responses/responses.ts +471 -8
- package/src/resources/chat/completions/completions.ts +67 -19
- package/src/resources/completions.ts +1 -1
- package/src/resources/decisions.ts +290 -0
- package/src/resources/fine-tuning/jobs/jobs.ts +7 -2
- package/src/resources/graders/grader-models.ts +1 -1
- package/src/resources/images.ts +62 -76
- package/src/resources/index.ts +9 -0
- package/src/resources/realtime/realtime.ts +16 -4
- package/src/resources/responses/api.md +1 -0
- package/src/resources/responses/responses.ts +473 -8
- package/src/resources/shared.ts +70 -0
- package/src/resources/videos.ts +6 -0
- package/src/resources/webhooks/api.md +5 -0
- package/src/resources/webhooks/webhooks.ts +273 -1
- 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
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { type Uploadable } from "../../core/uploads.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Turn audio into text or text into audio.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Voices extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a voice from a text prompt or from a consent recording and an audio
|
|
11
|
+
* sample.
|
|
12
|
+
*
|
|
13
|
+
* For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as
|
|
14
|
+
* JSON or multipart form data. For creation from an audio sample, send
|
|
15
|
+
* `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID
|
|
16
|
+
* as multipart form data. The type defaults to `audio_sample` when omitted.
|
|
17
|
+
*
|
|
18
|
+
* Returns the saved voice's metadata. Voices created from text prompts are
|
|
19
|
+
* supported only in Live, not in Realtime or the speech endpoint. The response
|
|
20
|
+
* does not include preview audio.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const voice = await client.audio.voices.create({
|
|
25
|
+
* audio_sample: fs.createReadStream('path/to/file'),
|
|
26
|
+
* consent: 'consent',
|
|
27
|
+
* name: 'x',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
create(body: VoiceCreateParams, options?: RequestOptions): APIPromise<Voice>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A custom voice that can be used for audio output. Voices created from text
|
|
35
|
+
* prompts are supported only in Live.
|
|
36
|
+
*/
|
|
37
|
+
export interface Voice {
|
|
38
|
+
/**
|
|
39
|
+
* The voice identifier, which can be referenced in API endpoints.
|
|
40
|
+
*/
|
|
41
|
+
id: string;
|
|
42
|
+
/**
|
|
43
|
+
* The Unix timestamp (in seconds) for when the voice was created.
|
|
44
|
+
*/
|
|
45
|
+
created_at: number;
|
|
46
|
+
/**
|
|
47
|
+
* The name of the voice.
|
|
48
|
+
*/
|
|
49
|
+
name: string;
|
|
50
|
+
/**
|
|
51
|
+
* The object type, which is always `audio.voice`.
|
|
52
|
+
*/
|
|
53
|
+
object: 'audio.voice';
|
|
54
|
+
/**
|
|
55
|
+
* How the voice was created. Voices created from text prompts are supported only
|
|
56
|
+
* in Live.
|
|
57
|
+
*/
|
|
58
|
+
type: 'audio_sample' | 'prompt';
|
|
59
|
+
}
|
|
60
|
+
export type VoiceCreateParams = VoiceCreateParams.Consent | VoiceCreateParams.Prompt;
|
|
61
|
+
export declare namespace VoiceCreateParams {
|
|
62
|
+
/**
|
|
63
|
+
* Creates a voice from a consent recording and an audio sample. Requires
|
|
64
|
+
* multipart/form-data.
|
|
65
|
+
*/
|
|
66
|
+
interface Consent {
|
|
67
|
+
/**
|
|
68
|
+
* The sample audio recording file. Maximum size is 10 MiB.
|
|
69
|
+
*
|
|
70
|
+
* Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
|
|
71
|
+
* `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
|
|
72
|
+
*/
|
|
73
|
+
audio_sample: Uploadable;
|
|
74
|
+
/**
|
|
75
|
+
* The consent recording ID (for example, `cons_1234`).
|
|
76
|
+
*/
|
|
77
|
+
consent: string;
|
|
78
|
+
/**
|
|
79
|
+
* The name of the new voice.
|
|
80
|
+
*/
|
|
81
|
+
name: string;
|
|
82
|
+
/**
|
|
83
|
+
* The voice creation method. Defaults to `audio_sample` when omitted.
|
|
84
|
+
*/
|
|
85
|
+
type?: 'audio_sample';
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Creates a synthetic voice from a text description. Supports application/json or
|
|
89
|
+
* multipart/form-data.
|
|
90
|
+
*/
|
|
91
|
+
interface Prompt {
|
|
92
|
+
/**
|
|
93
|
+
* The name of the new voice.
|
|
94
|
+
*/
|
|
95
|
+
name: string;
|
|
96
|
+
/**
|
|
97
|
+
* A description of the desired voice. Must not contain only whitespace.
|
|
98
|
+
*/
|
|
99
|
+
prompt: string;
|
|
100
|
+
/**
|
|
101
|
+
* Set to `prompt` to create a voice from a text description.
|
|
102
|
+
*/
|
|
103
|
+
type: 'prompt';
|
|
104
|
+
/**
|
|
105
|
+
* The voice creation model to use. Defaults to `auto`.
|
|
106
|
+
*/
|
|
107
|
+
model?: string | 'auto' | '2026-10-01';
|
|
108
|
+
/**
|
|
109
|
+
* Optional text for the voice to speak during creation. If omitted, a script is
|
|
110
|
+
* generated from the prompt. Must not be blank after trimming whitespace; scripts
|
|
111
|
+
* that are too short are rejected.
|
|
112
|
+
*/
|
|
113
|
+
script_hint?: string;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export declare namespace Voices {
|
|
117
|
+
export { type Voice as Voice, type VoiceCreateParams as VoiceCreateParams };
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=voices.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.d.mts","sourceRoot":"","sources":["../../src/resources/audio/voices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,+BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAUhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;CAQ7E;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;;OAGG;IACH,IAAI,EAAE,cAAc,GAAG,QAAQ,CAAC;CACjC;AAED,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC;AAErF,MAAM,CAAC,OAAO,WAAW,iBAAiB,CAAC;IACzC;;;OAGG;IACH,UAAiB,OAAO;QACtB;;;;;WAKG;QACH,YAAY,EAAE,UAAU,CAAC;QAEzB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,CAAC,EAAE,cAAc,CAAC;KACvB;IAED;;;OAGG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,IAAI,EAAE,QAAQ,CAAC;QAEf;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;QAEvC;;;;WAIG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC7E"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { type Uploadable } from "../../core/uploads.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Turn audio into text or text into audio.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Voices extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a voice from a text prompt or from a consent recording and an audio
|
|
11
|
+
* sample.
|
|
12
|
+
*
|
|
13
|
+
* For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as
|
|
14
|
+
* JSON or multipart form data. For creation from an audio sample, send
|
|
15
|
+
* `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID
|
|
16
|
+
* as multipart form data. The type defaults to `audio_sample` when omitted.
|
|
17
|
+
*
|
|
18
|
+
* Returns the saved voice's metadata. Voices created from text prompts are
|
|
19
|
+
* supported only in Live, not in Realtime or the speech endpoint. The response
|
|
20
|
+
* does not include preview audio.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const voice = await client.audio.voices.create({
|
|
25
|
+
* audio_sample: fs.createReadStream('path/to/file'),
|
|
26
|
+
* consent: 'consent',
|
|
27
|
+
* name: 'x',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
create(body: VoiceCreateParams, options?: RequestOptions): APIPromise<Voice>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A custom voice that can be used for audio output. Voices created from text
|
|
35
|
+
* prompts are supported only in Live.
|
|
36
|
+
*/
|
|
37
|
+
export interface Voice {
|
|
38
|
+
/**
|
|
39
|
+
* The voice identifier, which can be referenced in API endpoints.
|
|
40
|
+
*/
|
|
41
|
+
id: string;
|
|
42
|
+
/**
|
|
43
|
+
* The Unix timestamp (in seconds) for when the voice was created.
|
|
44
|
+
*/
|
|
45
|
+
created_at: number;
|
|
46
|
+
/**
|
|
47
|
+
* The name of the voice.
|
|
48
|
+
*/
|
|
49
|
+
name: string;
|
|
50
|
+
/**
|
|
51
|
+
* The object type, which is always `audio.voice`.
|
|
52
|
+
*/
|
|
53
|
+
object: 'audio.voice';
|
|
54
|
+
/**
|
|
55
|
+
* How the voice was created. Voices created from text prompts are supported only
|
|
56
|
+
* in Live.
|
|
57
|
+
*/
|
|
58
|
+
type: 'audio_sample' | 'prompt';
|
|
59
|
+
}
|
|
60
|
+
export type VoiceCreateParams = VoiceCreateParams.Consent | VoiceCreateParams.Prompt;
|
|
61
|
+
export declare namespace VoiceCreateParams {
|
|
62
|
+
/**
|
|
63
|
+
* Creates a voice from a consent recording and an audio sample. Requires
|
|
64
|
+
* multipart/form-data.
|
|
65
|
+
*/
|
|
66
|
+
interface Consent {
|
|
67
|
+
/**
|
|
68
|
+
* The sample audio recording file. Maximum size is 10 MiB.
|
|
69
|
+
*
|
|
70
|
+
* Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
|
|
71
|
+
* `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
|
|
72
|
+
*/
|
|
73
|
+
audio_sample: Uploadable;
|
|
74
|
+
/**
|
|
75
|
+
* The consent recording ID (for example, `cons_1234`).
|
|
76
|
+
*/
|
|
77
|
+
consent: string;
|
|
78
|
+
/**
|
|
79
|
+
* The name of the new voice.
|
|
80
|
+
*/
|
|
81
|
+
name: string;
|
|
82
|
+
/**
|
|
83
|
+
* The voice creation method. Defaults to `audio_sample` when omitted.
|
|
84
|
+
*/
|
|
85
|
+
type?: 'audio_sample';
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Creates a synthetic voice from a text description. Supports application/json or
|
|
89
|
+
* multipart/form-data.
|
|
90
|
+
*/
|
|
91
|
+
interface Prompt {
|
|
92
|
+
/**
|
|
93
|
+
* The name of the new voice.
|
|
94
|
+
*/
|
|
95
|
+
name: string;
|
|
96
|
+
/**
|
|
97
|
+
* A description of the desired voice. Must not contain only whitespace.
|
|
98
|
+
*/
|
|
99
|
+
prompt: string;
|
|
100
|
+
/**
|
|
101
|
+
* Set to `prompt` to create a voice from a text description.
|
|
102
|
+
*/
|
|
103
|
+
type: 'prompt';
|
|
104
|
+
/**
|
|
105
|
+
* The voice creation model to use. Defaults to `auto`.
|
|
106
|
+
*/
|
|
107
|
+
model?: string | 'auto' | '2026-10-01';
|
|
108
|
+
/**
|
|
109
|
+
* Optional text for the voice to speak during creation. If omitted, a script is
|
|
110
|
+
* generated from the prompt. Must not be blank after trimming whitespace; scripts
|
|
111
|
+
* that are too short are rejected.
|
|
112
|
+
*/
|
|
113
|
+
script_hint?: string;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export declare namespace Voices {
|
|
117
|
+
export { type Voice as Voice, type VoiceCreateParams as VoiceCreateParams };
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=voices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.d.ts","sourceRoot":"","sources":["../../src/resources/audio/voices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,8BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAUhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;CAQ7E;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;;OAGG;IACH,IAAI,EAAE,cAAc,GAAG,QAAQ,CAAC;CACjC;AAED,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC;AAErF,MAAM,CAAC,OAAO,WAAW,iBAAiB,CAAC;IACzC;;;OAGG;IACH,UAAiB,OAAO;QACtB;;;;;WAKG;QACH,YAAY,EAAE,UAAU,CAAC;QAEzB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,CAAC,EAAE,cAAc,CAAC;KACvB;IAED;;;OAGG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,IAAI,EAAE,QAAQ,CAAC;QAEf;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;QAEvC;;;;WAIG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC7E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Voices = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const uploads_1 = require("../../internal/uploads.js");
|
|
7
|
+
function resolveResourceRequestOptions(options, buildOptions) {
|
|
8
|
+
return Promise.resolve(options).then(buildOptions);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Turn audio into text or text into audio.
|
|
12
|
+
*/
|
|
13
|
+
class Voices extends resource_1.APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Creates a voice from a text prompt or from a consent recording and an audio
|
|
16
|
+
* sample.
|
|
17
|
+
*
|
|
18
|
+
* For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as
|
|
19
|
+
* JSON or multipart form data. For creation from an audio sample, send
|
|
20
|
+
* `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID
|
|
21
|
+
* as multipart form data. The type defaults to `audio_sample` when omitted.
|
|
22
|
+
*
|
|
23
|
+
* Returns the saved voice's metadata. Voices created from text prompts are
|
|
24
|
+
* supported only in Live, not in Realtime or the speech endpoint. The response
|
|
25
|
+
* does not include preview audio.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const voice = await client.audio.voices.create({
|
|
30
|
+
* audio_sample: fs.createReadStream('path/to/file'),
|
|
31
|
+
* consent: 'consent',
|
|
32
|
+
* name: 'x',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
create(body, options) {
|
|
37
|
+
return this._client.post('/audio/voices', resolveResourceRequestOptions(options, (options) => (0, uploads_1.multipartFormRequestOptions)({ body, ...options, __security: { bearerAuth: true } }, this._client)));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Voices = Voices;
|
|
41
|
+
//# sourceMappingURL=voices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.js","sourceRoot":"","sources":["../../src/resources/audio/voices.ts"],"names":[],"mappings":";AAAA,qFAAqF;;;AAErF,qDAAkD;AAIlD,uDAAqE;AAErE,SAAS,6BAA6B,CACpC,OAAmC,EACnC,YAA+F;IAE/F,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,eAAe,EACf,6BAA6B,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CACjD,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAClG,CACF,CAAC;IACJ,CAAC;CACF;AA/BD,wBA+BC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
|
|
4
|
+
function resolveResourceRequestOptions(options, buildOptions) {
|
|
5
|
+
return Promise.resolve(options).then(buildOptions);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Turn audio into text or text into audio.
|
|
9
|
+
*/
|
|
10
|
+
export class Voices extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Creates a voice from a text prompt or from a consent recording and an audio
|
|
13
|
+
* sample.
|
|
14
|
+
*
|
|
15
|
+
* For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as
|
|
16
|
+
* JSON or multipart form data. For creation from an audio sample, send
|
|
17
|
+
* `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID
|
|
18
|
+
* as multipart form data. The type defaults to `audio_sample` when omitted.
|
|
19
|
+
*
|
|
20
|
+
* Returns the saved voice's metadata. Voices created from text prompts are
|
|
21
|
+
* supported only in Live, not in Realtime or the speech endpoint. The response
|
|
22
|
+
* does not include preview audio.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const voice = await client.audio.voices.create({
|
|
27
|
+
* audio_sample: fs.createReadStream('path/to/file'),
|
|
28
|
+
* consent: 'consent',
|
|
29
|
+
* name: 'x',
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
create(body, options) {
|
|
34
|
+
return this._client.post('/audio/voices', resolveResourceRequestOptions(options, (options) => multipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client)));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=voices.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.mjs","sourceRoot":"","sources":["../../src/resources/audio/voices.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,2BAA2B,EAAE,mCAA+B;AAErE,SAAS,6BAA6B,CACpC,OAAmC,EACnC,YAA+F;IAE/F,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,eAAe,EACf,6BAA6B,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CACjD,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAClG,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import * as AgentsAPI from "./agents.mjs";
|
|
3
|
-
import * as TurnsAPI from "./sessions/turns.mjs";
|
|
3
|
+
import * as TurnsAPI from "./sessions/turns/turns.mjs";
|
|
4
4
|
import * as EnvironmentsAPI from "./environments/environments.mjs";
|
|
5
5
|
import { EnvironmentInfo, Environments } from "./environments/environments.mjs";
|
|
6
6
|
import * as SessionsAPI from "./sessions/sessions.mjs";
|
|
@@ -2913,8 +2913,8 @@ export declare namespace EnvironmentParam {
|
|
|
2913
2913
|
*/
|
|
2914
2914
|
files?: Array<AgentsAPI.HostedEnvironmentFileParam> | null;
|
|
2915
2915
|
/**
|
|
2916
|
-
* Network access policy for the environment.
|
|
2917
|
-
*
|
|
2916
|
+
* Network access policy for the environment. If omitted, the API version
|
|
2917
|
+
* determines whether network access is enabled or disabled.
|
|
2918
2918
|
*/
|
|
2919
2919
|
network?: EnvironmentParamOpenAIHosted.Network | null;
|
|
2920
2920
|
/**
|
|
@@ -2947,8 +2947,8 @@ export declare namespace EnvironmentParam {
|
|
|
2947
2947
|
enabled: boolean;
|
|
2948
2948
|
}
|
|
2949
2949
|
/**
|
|
2950
|
-
* Network access policy for the environment.
|
|
2951
|
-
*
|
|
2950
|
+
* Network access policy for the environment. If omitted, the API version
|
|
2951
|
+
* determines whether network access is enabled or disabled.
|
|
2952
2952
|
*/
|
|
2953
2953
|
interface Network {
|
|
2954
2954
|
/**
|
|
@@ -3907,6 +3907,12 @@ export interface SessionTurnError {
|
|
|
3907
3907
|
* - `session_budget_exceeded` - The session has reached its usage budget.
|
|
3908
3908
|
* - `usage_limit_exceeded` - The organization has reached a usage, plan, or
|
|
3909
3909
|
* billing limit.
|
|
3910
|
+
* - `project_spend_limit_exceeded` - The project has reached its enforced spend
|
|
3911
|
+
* limit.
|
|
3912
|
+
* - `organization_spend_limit_exceeded` - The organization has reached its
|
|
3913
|
+
* enforced spend limit.
|
|
3914
|
+
* - `organization_usage_limit_exceeded` - The organization has reached its
|
|
3915
|
+
* OpenAI-assigned usage limit.
|
|
3910
3916
|
* - `credit_balance_exhausted` - The organization has no API credits remaining.
|
|
3911
3917
|
* - `rate_limit_exceeded` - The request exceeds the available rate limit.
|
|
3912
3918
|
* - `flex_unavailable` - Flex processing is temporarily unavailable.
|
|
@@ -3929,7 +3935,7 @@ export interface SessionTurnError {
|
|
|
3929
3935
|
* - `internal_error` - An unexpected internal error prevented the session request
|
|
3930
3936
|
* from completing.
|
|
3931
3937
|
*/
|
|
3932
|
-
code: 'context_length_exceeded' | 'session_budget_exceeded' | 'usage_limit_exceeded' | 'credit_balance_exhausted' | 'rate_limit_exceeded' | 'flex_unavailable' | 'server_overloaded' | 'cyber_policy' | 'misalignment_policy_violation' | 'connection_failed' | 'server_error' | 'authentication_error' | 'invalid_request' | 'resource_not_found' | 'sandbox_error' | 'executor_version_incompatible' | 'active_turn_not_steerable' | 'request_timeout' | 'internal_error';
|
|
3938
|
+
code: 'context_length_exceeded' | 'session_budget_exceeded' | 'usage_limit_exceeded' | 'project_spend_limit_exceeded' | 'organization_spend_limit_exceeded' | 'organization_usage_limit_exceeded' | 'credit_balance_exhausted' | 'rate_limit_exceeded' | 'flex_unavailable' | 'server_overloaded' | 'cyber_policy' | 'misalignment_policy_violation' | 'connection_failed' | 'server_error' | 'authentication_error' | 'invalid_request' | 'resource_not_found' | 'sandbox_error' | 'executor_version_incompatible' | 'active_turn_not_steerable' | 'request_timeout' | 'internal_error';
|
|
3933
3939
|
/**
|
|
3934
3940
|
* A customer-safe explanation of the failure.
|
|
3935
3941
|
*/
|
|
@@ -4213,9 +4219,8 @@ export interface AgentCreateParams {
|
|
|
4213
4219
|
* - `flex` - Uses the flex service tier.
|
|
4214
4220
|
* - `priority` - Uses the priority service tier.
|
|
4215
4221
|
* - `fast` - Uses the fast service tier.
|
|
4216
|
-
* - `ultrafast` - Uses the ultrafast service tier.
|
|
4217
4222
|
*/
|
|
4218
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' |
|
|
4223
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | null;
|
|
4219
4224
|
/**
|
|
4220
4225
|
* Configuration for generated text. Defaults to the `text` format and medium
|
|
4221
4226
|
* verbosity.
|
|
@@ -4265,9 +4270,8 @@ export interface AgentUpdateParams {
|
|
|
4265
4270
|
* - `flex` - Uses the flex service tier.
|
|
4266
4271
|
* - `priority` - Uses the priority service tier.
|
|
4267
4272
|
* - `fast` - Uses the fast service tier.
|
|
4268
|
-
* - `ultrafast` - Uses the ultrafast service tier.
|
|
4269
4273
|
*/
|
|
4270
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' |
|
|
4274
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | null;
|
|
4271
4275
|
/**
|
|
4272
4276
|
* Configuration for text generated by the agent.
|
|
4273
4277
|
*/
|