@hamsa-ai/voice-agents-sdk 0.4.1-beta.5 → 0.4.1-beta.7
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/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/classes/livekit-connection.d.ts +1 -1
- package/types/main.d.ts +10 -4
package/package.json
CHANGED
|
@@ -201,7 +201,7 @@ export declare class LiveKitConnection extends EventEmitter {
|
|
|
201
201
|
* @example
|
|
202
202
|
* ```typescript
|
|
203
203
|
* const connection = new LiveKitConnection(
|
|
204
|
-
* 'wss://rtc.tryhamsa.com',
|
|
204
|
+
* 'wss://rtc.eu.tryhamsa.com',
|
|
205
205
|
* 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
|
|
206
206
|
* );
|
|
207
207
|
*
|
package/types/main.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ declare class HamsaApiError extends Error {
|
|
|
19
19
|
type HamsaVoiceAgentConfig = {
|
|
20
20
|
/** Base URL for the Hamsa API. Defaults to 'https://api.tryhamsa.com' */
|
|
21
21
|
API_URL?: string;
|
|
22
|
+
/** LiveKit RTC WebSocket URL. Defaults to 'wss://rtc.eu.tryhamsa.com' */
|
|
23
|
+
LIVEKIT_URL?: string;
|
|
22
24
|
};
|
|
23
25
|
/**
|
|
24
26
|
* Configuration options for starting a voice agent conversation
|
|
@@ -306,6 +308,8 @@ declare class HamsaVoiceAgent extends EventEmitter {
|
|
|
306
308
|
apiKey: string;
|
|
307
309
|
/** Base URL for Hamsa API endpoints */
|
|
308
310
|
API_URL: string;
|
|
311
|
+
/** LiveKit RTC WebSocket URL */
|
|
312
|
+
LIVEKIT_URL: string;
|
|
309
313
|
/** Job ID for tracking conversation completion status */
|
|
310
314
|
jobId: string | null;
|
|
311
315
|
/** Screen wake lock manager to prevent device sleep during calls */
|
|
@@ -318,21 +322,23 @@ declare class HamsaVoiceAgent extends EventEmitter {
|
|
|
318
322
|
* @param apiKey - Your Hamsa API key (get from https://dashboard.tryhamsa.com)
|
|
319
323
|
* @param config - Optional configuration settings
|
|
320
324
|
* @param config.API_URL - Custom API endpoint URL (defaults to https://api.tryhamsa.com)
|
|
325
|
+
* @param config.LIVEKIT_URL - Custom LiveKit RTC URL (defaults to wss://rtc.eu.tryhamsa.com)
|
|
321
326
|
*
|
|
322
327
|
* @example
|
|
323
328
|
* ```typescript
|
|
324
|
-
* // Using default
|
|
329
|
+
* // Using default endpoints
|
|
325
330
|
* const agent = new HamsaVoiceAgent('hamsa_api_key_here');
|
|
326
331
|
*
|
|
327
|
-
* // Using custom
|
|
332
|
+
* // Using custom endpoints
|
|
328
333
|
* const agent = new HamsaVoiceAgent('hamsa_api_key_here', {
|
|
329
|
-
* API_URL: 'https://custom-api.example.com'
|
|
334
|
+
* API_URL: 'https://custom-api.example.com',
|
|
335
|
+
* LIVEKIT_URL: 'wss://custom-rtc.example.com'
|
|
330
336
|
* });
|
|
331
337
|
* ```
|
|
332
338
|
*
|
|
333
339
|
* @throws {Error} If apiKey is not provided or invalid
|
|
334
340
|
*/
|
|
335
|
-
constructor(apiKey: string, { API_URL }?: HamsaVoiceAgentConfig);
|
|
341
|
+
constructor(apiKey: string, { API_URL, LIVEKIT_URL, }?: HamsaVoiceAgentConfig);
|
|
336
342
|
/**
|
|
337
343
|
* Adjusts the volume level for voice agent audio playback
|
|
338
344
|
*
|