@nuancelabs/js-sdk 0.8.0 → 0.9.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/index.d.ts +6 -0
- package/index.js +6 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -344,6 +344,12 @@ export declare interface CreateNuanceConversationOptions {
|
|
|
344
344
|
* ```
|
|
345
345
|
*/
|
|
346
346
|
personality?: PersonalityChoice;
|
|
347
|
+
/**
|
|
348
|
+
* The longest the conversation may run, in seconds. The server holds it to
|
|
349
|
+
* the account's maximum, so a longer value runs for that maximum; left out,
|
|
350
|
+
* the conversation runs for the maximum.
|
|
351
|
+
*/
|
|
352
|
+
maxSessionSeconds?: number;
|
|
347
353
|
/**
|
|
348
354
|
* Capture constraints for the user's camera.
|
|
349
355
|
*
|
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ function isRecord(value) {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
// src/core/sdk-version.ts
|
|
7
|
-
var SDK_HEADER = `js/${"0.
|
|
7
|
+
var SDK_HEADER = `js/${"0.9.0"}`;
|
|
8
8
|
|
|
9
9
|
// src/utils.ts
|
|
10
10
|
function normalizeHost(host) {
|
|
@@ -2236,6 +2236,7 @@ class NuanceConversation {
|
|
|
2236
2236
|
sessionOverrides;
|
|
2237
2237
|
personality;
|
|
2238
2238
|
variant;
|
|
2239
|
+
maxSessionSeconds;
|
|
2239
2240
|
videoCapture;
|
|
2240
2241
|
startOn;
|
|
2241
2242
|
mediaDevices;
|
|
@@ -2273,6 +2274,7 @@ class NuanceConversation {
|
|
|
2273
2274
|
this.sessionOverrides = options.sessionOverrides ?? {};
|
|
2274
2275
|
this.personality = options.personality;
|
|
2275
2276
|
this.variant = options.variant;
|
|
2277
|
+
this.maxSessionSeconds = options.maxSessionSeconds;
|
|
2276
2278
|
this.videoCapture = options.videoCapture;
|
|
2277
2279
|
this.startOn = options.startOn ?? "first-frame";
|
|
2278
2280
|
this.mediaDevices = options.mediaDevices;
|
|
@@ -2309,6 +2311,9 @@ class NuanceConversation {
|
|
|
2309
2311
|
request.personality = this.personality;
|
|
2310
2312
|
if (this.variant)
|
|
2311
2313
|
request.variant = this.variant;
|
|
2314
|
+
if (this.maxSessionSeconds !== undefined) {
|
|
2315
|
+
request.max_session_seconds = this.maxSessionSeconds;
|
|
2316
|
+
}
|
|
2312
2317
|
conversation = await this.createWhenNotBusy(request, attempt);
|
|
2313
2318
|
} catch (error) {
|
|
2314
2319
|
if (error instanceof ApiError && error.status === 409) {
|