openai 4.77.3 → 4.78.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 +16 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/resources/beta/beta.d.ts +4 -0
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +4 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +4 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.ts +1 -0
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +10 -8
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/realtime/index.d.ts +3 -0
- package/resources/beta/realtime/index.d.ts.map +1 -0
- package/resources/beta/realtime/index.js +9 -0
- package/resources/beta/realtime/index.js.map +1 -0
- package/resources/beta/realtime/index.mjs +4 -0
- package/resources/beta/realtime/index.mjs.map +1 -0
- package/resources/beta/realtime/realtime.d.ts +1584 -0
- package/resources/beta/realtime/realtime.d.ts.map +1 -0
- package/resources/beta/realtime/realtime.js +39 -0
- package/resources/beta/realtime/realtime.js.map +1 -0
- package/resources/beta/realtime/realtime.mjs +12 -0
- package/resources/beta/realtime/realtime.mjs.map +1 -0
- package/resources/beta/realtime/sessions.d.ts +455 -0
- package/resources/beta/realtime/sessions.d.ts.map +1 -0
- package/resources/beta/realtime/sessions.js +25 -0
- package/resources/beta/realtime/sessions.js.map +1 -0
- package/resources/beta/realtime/sessions.mjs +21 -0
- package/resources/beta/realtime/sessions.mjs.map +1 -0
- package/src/resources/beta/beta.ts +6 -0
- package/src/resources/beta/index.ts +1 -0
- package/src/resources/beta/realtime/index.ts +4 -0
- package/src/resources/beta/realtime/realtime.ts +1904 -0
- package/src/resources/beta/realtime/sessions.ts +546 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs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WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,kBAAkB,IAAI,OAAO,EAClC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.Realtime = void 0;
|
|
28
|
+
const resource_1 = require("../../../resource.js");
|
|
29
|
+
const SessionsAPI = __importStar(require("./sessions.js"));
|
|
30
|
+
const sessions_1 = require("./sessions.js");
|
|
31
|
+
class Realtime extends resource_1.APIResource {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
this.sessions = new SessionsAPI.Sessions(this._client);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.Realtime = Realtime;
|
|
38
|
+
Realtime.Sessions = sessions_1.Sessions;
|
|
39
|
+
//# sourceMappingURL=realtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.js","sourceRoot":"","sources":["../../../src/resources/beta/realtime/realtime.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,mDAAgD;AAEhD,2DAA0C;AAC1C,4CAKoB;AAEpB,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1E,CAAC;CAAA;AAFD,4BAEC;AAw1DD,QAAQ,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../resource.mjs";
|
|
3
|
+
import * as SessionsAPI from "./sessions.mjs";
|
|
4
|
+
import { Sessions, } from "./sessions.mjs";
|
|
5
|
+
export class Realtime extends APIResource {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.sessions = new SessionsAPI.Sessions(this._client);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
Realtime.Sessions = Sessions;
|
|
12
|
+
//# sourceMappingURL=realtime.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.mjs","sourceRoot":"","sources":["../../../src/resources/beta/realtime/realtime.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,WAAW;OAChB,EAIL,QAAQ,GACT;AAED,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1E,CAAC;CAAA;AAw1DD,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import { APIResource } from "../../../resource.js";
|
|
2
|
+
import * as Core from "../../../core.js";
|
|
3
|
+
export declare class Sessions extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create an ephemeral API token for use in client-side applications with the
|
|
6
|
+
* Realtime API. Can be configured with the same session parameters as the
|
|
7
|
+
* `session.update` client event.
|
|
8
|
+
*
|
|
9
|
+
* It responds with a session object, plus a `client_secret` key which contains a
|
|
10
|
+
* usable ephemeral API token that can be used to authenticate browser clients for
|
|
11
|
+
* the Realtime API.
|
|
12
|
+
*/
|
|
13
|
+
create(body: SessionCreateParams, options?: Core.RequestOptions): Core.APIPromise<SessionCreateResponse>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Realtime session object configuration.
|
|
17
|
+
*/
|
|
18
|
+
export interface Session {
|
|
19
|
+
/**
|
|
20
|
+
* Unique identifier for the session object.
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
|
25
|
+
*/
|
|
26
|
+
input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
|
|
27
|
+
/**
|
|
28
|
+
* Configuration for input audio transcription, defaults to off and can be set to
|
|
29
|
+
* `null` to turn off once on. Input audio transcription is not native to the
|
|
30
|
+
* model, since the model consumes audio directly. Transcription runs
|
|
31
|
+
* asynchronously through Whisper and should be treated as rough guidance rather
|
|
32
|
+
* than the representation understood by the model.
|
|
33
|
+
*/
|
|
34
|
+
input_audio_transcription?: Session.InputAudioTranscription;
|
|
35
|
+
/**
|
|
36
|
+
* The default system instructions (i.e. system message) prepended to model calls.
|
|
37
|
+
* This field allows the client to guide the model on desired responses. The model
|
|
38
|
+
* can be instructed on response content and format, (e.g. "be extremely succinct",
|
|
39
|
+
* "act friendly", "here are examples of good responses") and on audio behavior
|
|
40
|
+
* (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
|
|
41
|
+
* instructions are not guaranteed to be followed by the model, but they provide
|
|
42
|
+
* guidance to the model on the desired behavior.
|
|
43
|
+
*
|
|
44
|
+
* Note that the server sets default instructions which will be used if this field
|
|
45
|
+
* is not set and are visible in the `session.created` event at the start of the
|
|
46
|
+
* session.
|
|
47
|
+
*/
|
|
48
|
+
instructions?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Maximum number of output tokens for a single assistant response, inclusive of
|
|
51
|
+
* tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
|
52
|
+
* `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
|
53
|
+
*/
|
|
54
|
+
max_response_output_tokens?: number | 'inf';
|
|
55
|
+
/**
|
|
56
|
+
* The set of modalities the model can respond with. To disable audio, set this to
|
|
57
|
+
* ["text"].
|
|
58
|
+
*/
|
|
59
|
+
modalities?: Array<'text' | 'audio'>;
|
|
60
|
+
/**
|
|
61
|
+
* The Realtime model used for this session.
|
|
62
|
+
*/
|
|
63
|
+
model?: (string & {}) | 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-realtime-preview-2024-12-17' | 'gpt-4o-mini-realtime-preview' | 'gpt-4o-mini-realtime-preview-2024-12-17';
|
|
64
|
+
/**
|
|
65
|
+
* The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
|
66
|
+
*/
|
|
67
|
+
output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
|
|
68
|
+
/**
|
|
69
|
+
* Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.
|
|
70
|
+
*/
|
|
71
|
+
temperature?: number;
|
|
72
|
+
/**
|
|
73
|
+
* How the model chooses tools. Options are `auto`, `none`, `required`, or specify
|
|
74
|
+
* a function.
|
|
75
|
+
*/
|
|
76
|
+
tool_choice?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Tools (functions) available to the model.
|
|
79
|
+
*/
|
|
80
|
+
tools?: Array<Session.Tool>;
|
|
81
|
+
/**
|
|
82
|
+
* Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
|
83
|
+
* means that the model will detect the start and end of speech based on audio
|
|
84
|
+
* volume and respond at the end of user speech.
|
|
85
|
+
*/
|
|
86
|
+
turn_detection?: Session.TurnDetection | null;
|
|
87
|
+
/**
|
|
88
|
+
* The voice the model uses to respond. Voice cannot be changed during the session
|
|
89
|
+
* once the model has responded with audio at least once. Current voice options are
|
|
90
|
+
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
|
|
91
|
+
*/
|
|
92
|
+
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
|
|
93
|
+
}
|
|
94
|
+
export declare namespace Session {
|
|
95
|
+
/**
|
|
96
|
+
* Configuration for input audio transcription, defaults to off and can be set to
|
|
97
|
+
* `null` to turn off once on. Input audio transcription is not native to the
|
|
98
|
+
* model, since the model consumes audio directly. Transcription runs
|
|
99
|
+
* asynchronously through Whisper and should be treated as rough guidance rather
|
|
100
|
+
* than the representation understood by the model.
|
|
101
|
+
*/
|
|
102
|
+
interface InputAudioTranscription {
|
|
103
|
+
/**
|
|
104
|
+
* The model to use for transcription, `whisper-1` is the only currently supported
|
|
105
|
+
* model.
|
|
106
|
+
*/
|
|
107
|
+
model?: string;
|
|
108
|
+
}
|
|
109
|
+
interface Tool {
|
|
110
|
+
/**
|
|
111
|
+
* The description of the function, including guidance on when and how to call it,
|
|
112
|
+
* and guidance about what to tell the user when calling (if anything).
|
|
113
|
+
*/
|
|
114
|
+
description?: string;
|
|
115
|
+
/**
|
|
116
|
+
* The name of the function.
|
|
117
|
+
*/
|
|
118
|
+
name?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Parameters of the function in JSON Schema.
|
|
121
|
+
*/
|
|
122
|
+
parameters?: unknown;
|
|
123
|
+
/**
|
|
124
|
+
* The type of the tool, i.e. `function`.
|
|
125
|
+
*/
|
|
126
|
+
type?: 'function';
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
|
130
|
+
* means that the model will detect the start and end of speech based on audio
|
|
131
|
+
* volume and respond at the end of user speech.
|
|
132
|
+
*/
|
|
133
|
+
interface TurnDetection {
|
|
134
|
+
/**
|
|
135
|
+
* Amount of audio to include before the VAD detected speech (in milliseconds).
|
|
136
|
+
* Defaults to 300ms.
|
|
137
|
+
*/
|
|
138
|
+
prefix_padding_ms?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms.
|
|
141
|
+
* With shorter values the model will respond more quickly, but may jump in on
|
|
142
|
+
* short pauses from the user.
|
|
143
|
+
*/
|
|
144
|
+
silence_duration_ms?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher
|
|
147
|
+
* threshold will require louder audio to activate the model, and thus might
|
|
148
|
+
* perform better in noisy environments.
|
|
149
|
+
*/
|
|
150
|
+
threshold?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Type of turn detection, only `server_vad` is currently supported.
|
|
153
|
+
*/
|
|
154
|
+
type?: 'server_vad';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* A new Realtime session configuration, with an ephermeral key. Default TTL for
|
|
159
|
+
* keys is one minute.
|
|
160
|
+
*/
|
|
161
|
+
export interface SessionCreateResponse {
|
|
162
|
+
/**
|
|
163
|
+
* Ephemeral key returned by the API.
|
|
164
|
+
*/
|
|
165
|
+
client_secret?: SessionCreateResponse.ClientSecret;
|
|
166
|
+
/**
|
|
167
|
+
* The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
|
168
|
+
*/
|
|
169
|
+
input_audio_format?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Configuration for input audio transcription, defaults to off and can be set to
|
|
172
|
+
* `null` to turn off once on. Input audio transcription is not native to the
|
|
173
|
+
* model, since the model consumes audio directly. Transcription runs
|
|
174
|
+
* asynchronously through Whisper and should be treated as rough guidance rather
|
|
175
|
+
* than the representation understood by the model.
|
|
176
|
+
*/
|
|
177
|
+
input_audio_transcription?: SessionCreateResponse.InputAudioTranscription;
|
|
178
|
+
/**
|
|
179
|
+
* The default system instructions (i.e. system message) prepended to model calls.
|
|
180
|
+
* This field allows the client to guide the model on desired responses. The model
|
|
181
|
+
* can be instructed on response content and format, (e.g. "be extremely succinct",
|
|
182
|
+
* "act friendly", "here are examples of good responses") and on audio behavior
|
|
183
|
+
* (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
|
|
184
|
+
* instructions are not guaranteed to be followed by the model, but they provide
|
|
185
|
+
* guidance to the model on the desired behavior.
|
|
186
|
+
*
|
|
187
|
+
* Note that the server sets default instructions which will be used if this field
|
|
188
|
+
* is not set and are visible in the `session.created` event at the start of the
|
|
189
|
+
* session.
|
|
190
|
+
*/
|
|
191
|
+
instructions?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Maximum number of output tokens for a single assistant response, inclusive of
|
|
194
|
+
* tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
|
195
|
+
* `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
|
196
|
+
*/
|
|
197
|
+
max_response_output_tokens?: number | 'inf';
|
|
198
|
+
/**
|
|
199
|
+
* The set of modalities the model can respond with. To disable audio, set this to
|
|
200
|
+
* ["text"].
|
|
201
|
+
*/
|
|
202
|
+
modalities?: Array<'text' | 'audio'>;
|
|
203
|
+
/**
|
|
204
|
+
* The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
|
205
|
+
*/
|
|
206
|
+
output_audio_format?: string;
|
|
207
|
+
/**
|
|
208
|
+
* Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.
|
|
209
|
+
*/
|
|
210
|
+
temperature?: number;
|
|
211
|
+
/**
|
|
212
|
+
* How the model chooses tools. Options are `auto`, `none`, `required`, or specify
|
|
213
|
+
* a function.
|
|
214
|
+
*/
|
|
215
|
+
tool_choice?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Tools (functions) available to the model.
|
|
218
|
+
*/
|
|
219
|
+
tools?: Array<SessionCreateResponse.Tool>;
|
|
220
|
+
/**
|
|
221
|
+
* Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
|
222
|
+
* means that the model will detect the start and end of speech based on audio
|
|
223
|
+
* volume and respond at the end of user speech.
|
|
224
|
+
*/
|
|
225
|
+
turn_detection?: SessionCreateResponse.TurnDetection;
|
|
226
|
+
/**
|
|
227
|
+
* The voice the model uses to respond. Voice cannot be changed during the session
|
|
228
|
+
* once the model has responded with audio at least once. Current voice options are
|
|
229
|
+
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
|
|
230
|
+
*/
|
|
231
|
+
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
|
|
232
|
+
}
|
|
233
|
+
export declare namespace SessionCreateResponse {
|
|
234
|
+
/**
|
|
235
|
+
* Ephemeral key returned by the API.
|
|
236
|
+
*/
|
|
237
|
+
interface ClientSecret {
|
|
238
|
+
/**
|
|
239
|
+
* Timestamp for when the token expires. Currently, all tokens expire after one
|
|
240
|
+
* minute.
|
|
241
|
+
*/
|
|
242
|
+
expires_at?: number;
|
|
243
|
+
/**
|
|
244
|
+
* Ephemeral key usable in client environments to authenticate connections to the
|
|
245
|
+
* Realtime API. Use this in client-side environments rather than a standard API
|
|
246
|
+
* token, which should only be used server-side.
|
|
247
|
+
*/
|
|
248
|
+
value?: string;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Configuration for input audio transcription, defaults to off and can be set to
|
|
252
|
+
* `null` to turn off once on. Input audio transcription is not native to the
|
|
253
|
+
* model, since the model consumes audio directly. Transcription runs
|
|
254
|
+
* asynchronously through Whisper and should be treated as rough guidance rather
|
|
255
|
+
* than the representation understood by the model.
|
|
256
|
+
*/
|
|
257
|
+
interface InputAudioTranscription {
|
|
258
|
+
/**
|
|
259
|
+
* The model to use for transcription, `whisper-1` is the only currently supported
|
|
260
|
+
* model.
|
|
261
|
+
*/
|
|
262
|
+
model?: string;
|
|
263
|
+
}
|
|
264
|
+
interface Tool {
|
|
265
|
+
/**
|
|
266
|
+
* The description of the function, including guidance on when and how to call it,
|
|
267
|
+
* and guidance about what to tell the user when calling (if anything).
|
|
268
|
+
*/
|
|
269
|
+
description?: string;
|
|
270
|
+
/**
|
|
271
|
+
* The name of the function.
|
|
272
|
+
*/
|
|
273
|
+
name?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Parameters of the function in JSON Schema.
|
|
276
|
+
*/
|
|
277
|
+
parameters?: unknown;
|
|
278
|
+
/**
|
|
279
|
+
* The type of the tool, i.e. `function`.
|
|
280
|
+
*/
|
|
281
|
+
type?: 'function';
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
|
285
|
+
* means that the model will detect the start and end of speech based on audio
|
|
286
|
+
* volume and respond at the end of user speech.
|
|
287
|
+
*/
|
|
288
|
+
interface TurnDetection {
|
|
289
|
+
/**
|
|
290
|
+
* Amount of audio to include before the VAD detected speech (in milliseconds).
|
|
291
|
+
* Defaults to 300ms.
|
|
292
|
+
*/
|
|
293
|
+
prefix_padding_ms?: number;
|
|
294
|
+
/**
|
|
295
|
+
* Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms.
|
|
296
|
+
* With shorter values the model will respond more quickly, but may jump in on
|
|
297
|
+
* short pauses from the user.
|
|
298
|
+
*/
|
|
299
|
+
silence_duration_ms?: number;
|
|
300
|
+
/**
|
|
301
|
+
* Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher
|
|
302
|
+
* threshold will require louder audio to activate the model, and thus might
|
|
303
|
+
* perform better in noisy environments.
|
|
304
|
+
*/
|
|
305
|
+
threshold?: number;
|
|
306
|
+
/**
|
|
307
|
+
* Type of turn detection, only `server_vad` is currently supported.
|
|
308
|
+
*/
|
|
309
|
+
type?: string;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
export interface SessionCreateParams {
|
|
313
|
+
/**
|
|
314
|
+
* The Realtime model used for this session.
|
|
315
|
+
*/
|
|
316
|
+
model: 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-realtime-preview-2024-12-17' | 'gpt-4o-mini-realtime-preview' | 'gpt-4o-mini-realtime-preview-2024-12-17';
|
|
317
|
+
/**
|
|
318
|
+
* The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
|
319
|
+
*/
|
|
320
|
+
input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
|
|
321
|
+
/**
|
|
322
|
+
* Configuration for input audio transcription, defaults to off and can be set to
|
|
323
|
+
* `null` to turn off once on. Input audio transcription is not native to the
|
|
324
|
+
* model, since the model consumes audio directly. Transcription runs
|
|
325
|
+
* asynchronously through Whisper and should be treated as rough guidance rather
|
|
326
|
+
* than the representation understood by the model.
|
|
327
|
+
*/
|
|
328
|
+
input_audio_transcription?: SessionCreateParams.InputAudioTranscription;
|
|
329
|
+
/**
|
|
330
|
+
* The default system instructions (i.e. system message) prepended to model calls.
|
|
331
|
+
* This field allows the client to guide the model on desired responses. The model
|
|
332
|
+
* can be instructed on response content and format, (e.g. "be extremely succinct",
|
|
333
|
+
* "act friendly", "here are examples of good responses") and on audio behavior
|
|
334
|
+
* (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
|
|
335
|
+
* instructions are not guaranteed to be followed by the model, but they provide
|
|
336
|
+
* guidance to the model on the desired behavior.
|
|
337
|
+
*
|
|
338
|
+
* Note that the server sets default instructions which will be used if this field
|
|
339
|
+
* is not set and are visible in the `session.created` event at the start of the
|
|
340
|
+
* session.
|
|
341
|
+
*/
|
|
342
|
+
instructions?: string;
|
|
343
|
+
/**
|
|
344
|
+
* Maximum number of output tokens for a single assistant response, inclusive of
|
|
345
|
+
* tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
|
346
|
+
* `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
|
347
|
+
*/
|
|
348
|
+
max_response_output_tokens?: number | 'inf';
|
|
349
|
+
/**
|
|
350
|
+
* The set of modalities the model can respond with. To disable audio, set this to
|
|
351
|
+
* ["text"].
|
|
352
|
+
*/
|
|
353
|
+
modalities?: Array<'text' | 'audio'>;
|
|
354
|
+
/**
|
|
355
|
+
* The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
|
356
|
+
*/
|
|
357
|
+
output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
|
|
358
|
+
/**
|
|
359
|
+
* Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.
|
|
360
|
+
*/
|
|
361
|
+
temperature?: number;
|
|
362
|
+
/**
|
|
363
|
+
* How the model chooses tools. Options are `auto`, `none`, `required`, or specify
|
|
364
|
+
* a function.
|
|
365
|
+
*/
|
|
366
|
+
tool_choice?: string;
|
|
367
|
+
/**
|
|
368
|
+
* Tools (functions) available to the model.
|
|
369
|
+
*/
|
|
370
|
+
tools?: Array<SessionCreateParams.Tool>;
|
|
371
|
+
/**
|
|
372
|
+
* Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
|
373
|
+
* means that the model will detect the start and end of speech based on audio
|
|
374
|
+
* volume and respond at the end of user speech.
|
|
375
|
+
*/
|
|
376
|
+
turn_detection?: SessionCreateParams.TurnDetection;
|
|
377
|
+
/**
|
|
378
|
+
* The voice the model uses to respond. Voice cannot be changed during the session
|
|
379
|
+
* once the model has responded with audio at least once. Current voice options are
|
|
380
|
+
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
|
|
381
|
+
*/
|
|
382
|
+
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
|
|
383
|
+
}
|
|
384
|
+
export declare namespace SessionCreateParams {
|
|
385
|
+
/**
|
|
386
|
+
* Configuration for input audio transcription, defaults to off and can be set to
|
|
387
|
+
* `null` to turn off once on. Input audio transcription is not native to the
|
|
388
|
+
* model, since the model consumes audio directly. Transcription runs
|
|
389
|
+
* asynchronously through Whisper and should be treated as rough guidance rather
|
|
390
|
+
* than the representation understood by the model.
|
|
391
|
+
*/
|
|
392
|
+
interface InputAudioTranscription {
|
|
393
|
+
/**
|
|
394
|
+
* The model to use for transcription, `whisper-1` is the only currently supported
|
|
395
|
+
* model.
|
|
396
|
+
*/
|
|
397
|
+
model?: string;
|
|
398
|
+
}
|
|
399
|
+
interface Tool {
|
|
400
|
+
/**
|
|
401
|
+
* The description of the function, including guidance on when and how to call it,
|
|
402
|
+
* and guidance about what to tell the user when calling (if anything).
|
|
403
|
+
*/
|
|
404
|
+
description?: string;
|
|
405
|
+
/**
|
|
406
|
+
* The name of the function.
|
|
407
|
+
*/
|
|
408
|
+
name?: string;
|
|
409
|
+
/**
|
|
410
|
+
* Parameters of the function in JSON Schema.
|
|
411
|
+
*/
|
|
412
|
+
parameters?: unknown;
|
|
413
|
+
/**
|
|
414
|
+
* The type of the tool, i.e. `function`.
|
|
415
|
+
*/
|
|
416
|
+
type?: 'function';
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
|
420
|
+
* means that the model will detect the start and end of speech based on audio
|
|
421
|
+
* volume and respond at the end of user speech.
|
|
422
|
+
*/
|
|
423
|
+
interface TurnDetection {
|
|
424
|
+
/**
|
|
425
|
+
* Whether or not to automatically generate a response when VAD is enabled. `true`
|
|
426
|
+
* by default.
|
|
427
|
+
*/
|
|
428
|
+
create_response?: boolean;
|
|
429
|
+
/**
|
|
430
|
+
* Amount of audio to include before the VAD detected speech (in milliseconds).
|
|
431
|
+
* Defaults to 300ms.
|
|
432
|
+
*/
|
|
433
|
+
prefix_padding_ms?: number;
|
|
434
|
+
/**
|
|
435
|
+
* Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms.
|
|
436
|
+
* With shorter values the model will respond more quickly, but may jump in on
|
|
437
|
+
* short pauses from the user.
|
|
438
|
+
*/
|
|
439
|
+
silence_duration_ms?: number;
|
|
440
|
+
/**
|
|
441
|
+
* Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher
|
|
442
|
+
* threshold will require louder audio to activate the model, and thus might
|
|
443
|
+
* perform better in noisy environments.
|
|
444
|
+
*/
|
|
445
|
+
threshold?: number;
|
|
446
|
+
/**
|
|
447
|
+
* Type of turn detection, only `server_vad` is currently supported.
|
|
448
|
+
*/
|
|
449
|
+
type?: string;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
export declare namespace Sessions {
|
|
453
|
+
export { type Session as Session, type SessionCreateResponse as SessionCreateResponse, type SessionCreateParams as SessionCreateParams, };
|
|
454
|
+
}
|
|
455
|
+
//# sourceMappingURL=sessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/realtime/sessions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAEtC,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,IAA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,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Sessions = void 0;
|
|
5
|
+
const resource_1 = require("../../../resource.js");
|
|
6
|
+
class Sessions extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create an ephemeral API token for use in client-side applications with the
|
|
9
|
+
* Realtime API. Can be configured with the same session parameters as the
|
|
10
|
+
* `session.update` client event.
|
|
11
|
+
*
|
|
12
|
+
* It responds with a session object, plus a `client_secret` key which contains a
|
|
13
|
+
* usable ephemeral API token that can be used to authenticate browser clients for
|
|
14
|
+
* the Realtime API.
|
|
15
|
+
*/
|
|
16
|
+
create(body, options) {
|
|
17
|
+
return this._client.post('/realtime/sessions', {
|
|
18
|
+
body,
|
|
19
|
+
...options,
|
|
20
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Sessions = Sessions;
|
|
25
|
+
//# sourceMappingURL=sessions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../../src/resources/beta/realtime/sessions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAGhD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC7C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;CACF;AAjBD,4BAiBC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../resource.mjs";
|
|
3
|
+
export class Sessions extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create an ephemeral API token for use in client-side applications with the
|
|
6
|
+
* Realtime API. Can be configured with the same session parameters as the
|
|
7
|
+
* `session.update` client event.
|
|
8
|
+
*
|
|
9
|
+
* It responds with a session object, plus a `client_secret` key which contains a
|
|
10
|
+
* usable ephemeral API token that can be used to authenticate browser clients for
|
|
11
|
+
* the Realtime API.
|
|
12
|
+
*/
|
|
13
|
+
create(body, options) {
|
|
14
|
+
return this._client.post('/realtime/sessions', {
|
|
15
|
+
body,
|
|
16
|
+
...options,
|
|
17
|
+
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=sessions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.mjs","sourceRoot":"","sources":["../../../src/resources/beta/realtime/sessions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC7C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -21,6 +21,8 @@ import {
|
|
|
21
21
|
RunStreamEvent,
|
|
22
22
|
ThreadStreamEvent,
|
|
23
23
|
} from './assistants';
|
|
24
|
+
import * as RealtimeAPI from './realtime/realtime';
|
|
25
|
+
import { Realtime } from './realtime/realtime';
|
|
24
26
|
import * as ThreadsAPI from './threads/threads';
|
|
25
27
|
import {
|
|
26
28
|
AssistantResponseFormatOption,
|
|
@@ -58,12 +60,14 @@ import {
|
|
|
58
60
|
import { Chat } from './chat/chat';
|
|
59
61
|
|
|
60
62
|
export class Beta extends APIResource {
|
|
63
|
+
realtime: RealtimeAPI.Realtime = new RealtimeAPI.Realtime(this._client);
|
|
61
64
|
vectorStores: VectorStoresAPI.VectorStores = new VectorStoresAPI.VectorStores(this._client);
|
|
62
65
|
chat: ChatAPI.Chat = new ChatAPI.Chat(this._client);
|
|
63
66
|
assistants: AssistantsAPI.Assistants = new AssistantsAPI.Assistants(this._client);
|
|
64
67
|
threads: ThreadsAPI.Threads = new ThreadsAPI.Threads(this._client);
|
|
65
68
|
}
|
|
66
69
|
|
|
70
|
+
Beta.Realtime = Realtime;
|
|
67
71
|
Beta.VectorStores = VectorStores;
|
|
68
72
|
Beta.VectorStoresPage = VectorStoresPage;
|
|
69
73
|
Beta.Assistants = Assistants;
|
|
@@ -71,6 +75,8 @@ Beta.AssistantsPage = AssistantsPage;
|
|
|
71
75
|
Beta.Threads = Threads;
|
|
72
76
|
|
|
73
77
|
export declare namespace Beta {
|
|
78
|
+
export { Realtime as Realtime };
|
|
79
|
+
|
|
74
80
|
export {
|
|
75
81
|
VectorStores as VectorStores,
|
|
76
82
|
type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam,
|