Skip to content

Commit 821fed7

Browse files
committed
Update client.js
1 parent e0ab899 commit 821fed7

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

lib/client.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,32 @@ import { RealtimeUtils } from './utils.js';
182182
* @property {UsageType|null} usage
183183
*/
184184

185+
/**
186+
* RealtimeClient Settings
187+
* @typedef {Object} RealtimeClientSettings
188+
* @property {string} [url] - The URL for the realtime client
189+
* @property {string} [apiKey] - The API key
190+
* @property {string} [model] - The model name to use
191+
* @property {boolean} [dangerouslyAllowAPIKeyInBrowser] - Whether to allow API key in browser
192+
* @property {boolean} [debug] - Enable debug mode
193+
*/
194+
185195
/**
186196
* RealtimeClient Class
187197
* @class
188198
*/
189199
export class RealtimeClient extends RealtimeEventHandler {
190200
/**
191201
* Create a new RealtimeClient instance
192-
* @param {{url?: string, apiKey?: string, model?: string, dangerouslyAllowAPIKeyInBrowser?: boolean, debug?: boolean}} [settings]
202+
* @param {RealtimeClientSettings} [settings]
193203
*/
194-
constructor({ url, apiKey, model, dangerouslyAllowAPIKeyInBrowser, debug } = {}) {
204+
constructor({
205+
url,
206+
apiKey,
207+
model,
208+
dangerouslyAllowAPIKeyInBrowser,
209+
debug,
210+
} = {}) {
195211
super();
196212
this.defaultSessionConfig = {
197213
modalities: ['text', 'audio'],

0 commit comments

Comments
 (0)