diff --git a/lib/client.js b/lib/client.js index be37288..a6353ba 100644 --- a/lib/client.js +++ b/lib/client.js @@ -387,13 +387,14 @@ export class RealtimeClient extends RealtimeEventHandler { /** * Connects to the Realtime WebSocket API * Updates session config and conversation config + * @param {{model?: string|undefined}} [settings] * @returns {Promise} */ - async connect() { + async connect({ model } = {}) { if (this.isConnected()) { throw new Error(`Already connected, use .disconnect() first`); } - await this.realtime.connect(); + await this.realtime.connect({ model }); this.updateSession(); return true; }