153153 * @property {ItemType[] } output
154154 * @property {UsageType|null } usage
155155 */
156+ /**
157+ * RealtimeClient Settings
158+ * @typedef {Object } RealtimeClientSettings
159+ * @property {string } [url] - The URL for the realtime client
160+ * @property {string } [apiKey] - The API key
161+ * @property {string } [model] - The model name to use
162+ * @property {boolean } [dangerouslyAllowAPIKeyInBrowser] - Whether to allow API key in browser
163+ * @property {boolean } [debug] - Enable debug mode
164+ */
156165/**
157166 * RealtimeClient Class
158167 * @class
159168 */
160169export class RealtimeClient extends RealtimeEventHandler {
161170 /**
162171 * Create a new RealtimeClient instance
163- * @param {{url?: string, apiKey?: string, dangerouslyAllowAPIKeyInBrowser?: boolean, debug?: boolean} } [settings]
172+ * @param {RealtimeClientSettings } [settings]
164173 */
165- constructor ( { url, apiKey, dangerouslyAllowAPIKeyInBrowser, debug } ?: {
166- url ?: string ;
167- apiKey ?: string ;
168- dangerouslyAllowAPIKeyInBrowser ?: boolean ;
169- debug ?: boolean ;
170- } ) ;
174+ constructor ( { url, apiKey, model, dangerouslyAllowAPIKeyInBrowser, debug, } ?: RealtimeClientSettings ) ;
171175 defaultSessionConfig : {
172176 modalities : string [ ] ;
173177 instructions : string ;
@@ -181,6 +185,7 @@ export class RealtimeClient extends RealtimeEventHandler {
181185 temperature : number ;
182186 max_response_output_tokens : number ;
183187 } ;
188+ realtimeModel : string ;
184189 sessionConfig : { } ;
185190 transcriptionModels : {
186191 model : string ;
@@ -336,8 +341,7 @@ export type SessionResourceType = {
336341 model ?: string ;
337342 modalities ?: string [ ] ;
338343 instructions ?: string ;
339- voice ?: "alloy" | "ash" | "ballad" | "coral" | "echo" | "sage" | "shimmer" | "verse" ;
340-
344+ voice ?: "alloy" | "ash" | "ballad" | "coral" | "echo" | "sage" | "shimmer" | "verse" ;
341345 input_audio_format ?: AudioFormatType ;
342346 output_audio_format ?: AudioFormatType ;
343347 input_audio_transcription ?: AudioTranscriptionType | null ;
@@ -454,7 +458,32 @@ export type ResponseResourceType = {
454458 output : ItemType [ ] ;
455459 usage : UsageType | null ;
456460} ;
461+ /**
462+ * RealtimeClient Settings
463+ */
464+ export type RealtimeClientSettings = {
465+ /**
466+ * - The URL for the realtime client
467+ */
468+ url ?: string ;
469+ /**
470+ * - The API key
471+ */
472+ apiKey ?: string ;
473+ /**
474+ * - The model name to use
475+ */
476+ model ?: string ;
477+ /**
478+ * - Whether to allow API key in browser
479+ */
480+ dangerouslyAllowAPIKeyInBrowser ?: boolean ;
481+ /**
482+ * - Enable debug mode
483+ */
484+ debug ?: boolean ;
485+ } ;
457486import { RealtimeEventHandler } from './event_handler.js' ;
458487import { RealtimeAPI } from './api.js' ;
459488import { RealtimeConversation } from './conversation.js' ;
460- //# sourceMappingURL=client.d.ts.map
489+ //# sourceMappingURL=client.d.ts.map
0 commit comments