cogito-client 1.0.67 → 1.0.69
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.d.ts +151 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare interface CogitoAgent {
|
|
|
4
4
|
id: string;
|
|
5
5
|
greeting?: CogitoMessage[];
|
|
6
6
|
prompt: string;
|
|
7
|
+
tts?: CogitoTTSConfig;
|
|
7
8
|
tools?: {
|
|
8
9
|
[k: string]: CogitoTool;
|
|
9
10
|
};
|
|
@@ -31,6 +32,10 @@ export declare interface CogitoApprovalCardSurface {
|
|
|
31
32
|
export declare interface CogitoAssistantMessage {
|
|
32
33
|
role: "assistant";
|
|
33
34
|
id?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The ID of the assistant that delivered this message
|
|
37
|
+
*/
|
|
38
|
+
assistantId?: string;
|
|
34
39
|
date?: string;
|
|
35
40
|
content: string;
|
|
36
41
|
/**
|
|
@@ -195,24 +200,8 @@ export declare interface CogitoConfig {
|
|
|
195
200
|
message?: string;
|
|
196
201
|
[k: string]: unknown;
|
|
197
202
|
};
|
|
198
|
-
stt?:
|
|
199
|
-
|
|
200
|
-
language?: string;
|
|
201
|
-
[k: string]: unknown;
|
|
202
|
-
};
|
|
203
|
-
tts?: {
|
|
204
|
-
model?: string;
|
|
205
|
-
voice?: string;
|
|
206
|
-
language?: string;
|
|
207
|
-
voiceOverrides?: {
|
|
208
|
-
voice?: string;
|
|
209
|
-
language?: string;
|
|
210
|
-
}[];
|
|
211
|
-
pronunciation?: {
|
|
212
|
-
[k: string]: string;
|
|
213
|
-
};
|
|
214
|
-
[k: string]: unknown;
|
|
215
|
-
};
|
|
203
|
+
stt?: CogitoSTTConfig;
|
|
204
|
+
tts?: CogitoTTSConfig;
|
|
216
205
|
llm?: {
|
|
217
206
|
model?: string;
|
|
218
207
|
extra_kwargs?: {
|
|
@@ -389,7 +378,7 @@ export declare interface CogitoHandoffTool {
|
|
|
389
378
|
*/
|
|
390
379
|
targetName?: string;
|
|
391
380
|
/**
|
|
392
|
-
* The message to say to the caller before putting them on hold during the transfer process
|
|
381
|
+
* The message to say to the caller before putting them on hold during the warm transfer process or before handing them to another agent
|
|
393
382
|
*/
|
|
394
383
|
messageToCaller?: string;
|
|
395
384
|
/**
|
|
@@ -966,6 +955,20 @@ export declare interface CogitoStatsDisplaySurface {
|
|
|
966
955
|
};
|
|
967
956
|
}
|
|
968
957
|
|
|
958
|
+
export declare interface CogitoSTTConfig {
|
|
959
|
+
model?: string;
|
|
960
|
+
language?: string;
|
|
961
|
+
smartFormat?: SmartFormat;
|
|
962
|
+
punctuate?: Punctuation;
|
|
963
|
+
numerals?: Numerals;
|
|
964
|
+
profanityFilter?: ProfanityFilter;
|
|
965
|
+
fillerWords?: KeepFillerWords;
|
|
966
|
+
endpointing?: EndpointingMs;
|
|
967
|
+
keyterms?: KeyTerms;
|
|
968
|
+
extra_kwargs?: ExtraOptions;
|
|
969
|
+
[k: string]: unknown;
|
|
970
|
+
}
|
|
971
|
+
|
|
969
972
|
export declare interface CogitoSurfaceActionPayload {
|
|
970
973
|
type: "surface-action";
|
|
971
974
|
/**
|
|
@@ -1107,6 +1110,32 @@ export declare interface CogitoToolMessage {
|
|
|
1107
1110
|
isError?: boolean;
|
|
1108
1111
|
}
|
|
1109
1112
|
|
|
1113
|
+
export declare interface CogitoTTSConfig {
|
|
1114
|
+
model?: string;
|
|
1115
|
+
voice?: string;
|
|
1116
|
+
language?: string;
|
|
1117
|
+
speed?: Speed;
|
|
1118
|
+
stability?: Stability;
|
|
1119
|
+
similarityBoost?: SimilarityBoost;
|
|
1120
|
+
style?: StyleExaggeration;
|
|
1121
|
+
useSpeakerBoost?: SpeakerBoost;
|
|
1122
|
+
voiceOverrides?: {
|
|
1123
|
+
voice?: string;
|
|
1124
|
+
language?: string;
|
|
1125
|
+
speed?: Speed1;
|
|
1126
|
+
stability?: Stability1;
|
|
1127
|
+
similarityBoost?: SimilarityBoost1;
|
|
1128
|
+
style?: StyleExaggeration1;
|
|
1129
|
+
useSpeakerBoost?: SpeakerBoost1;
|
|
1130
|
+
extra_kwargs?: ExtraOptions1;
|
|
1131
|
+
}[];
|
|
1132
|
+
pronunciation?: {
|
|
1133
|
+
[k: string]: string;
|
|
1134
|
+
};
|
|
1135
|
+
extra_kwargs?: ExtraOptions2;
|
|
1136
|
+
[k: string]: unknown;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1110
1139
|
export declare interface CogitoUserMessage {
|
|
1111
1140
|
role: "user";
|
|
1112
1141
|
userName?: string;
|
|
@@ -1388,6 +1417,109 @@ export declare type CogitoWebhookPayload = CogitoMessageWebhook | CogitoCallComp
|
|
|
1388
1417
|
|
|
1389
1418
|
export declare type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
1390
1419
|
|
|
1420
|
+
/**
|
|
1421
|
+
* Silence in milliseconds before an utterance is considered finished.
|
|
1422
|
+
*/
|
|
1423
|
+
export declare type EndpointingMs = number;
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* Escape hatch for provider STT options not promoted to typed fields.
|
|
1427
|
+
*/
|
|
1428
|
+
export declare interface ExtraOptions {
|
|
1429
|
+
[k: string]: unknown;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
export declare interface ExtraOptions1 {
|
|
1433
|
+
[k: string]: unknown;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* Escape hatch for provider TTS options not promoted to typed fields.
|
|
1438
|
+
*/
|
|
1439
|
+
export declare interface ExtraOptions2 {
|
|
1440
|
+
[k: string]: unknown;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Keep filler words (um, uh) in transcripts.
|
|
1445
|
+
*/
|
|
1446
|
+
export declare type KeepFillerWords = boolean;
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Boost recognition of domain words/names (nova-3 only).
|
|
1450
|
+
*/
|
|
1451
|
+
export declare type KeyTerms = string[];
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Convert spoken numbers to digits.
|
|
1455
|
+
*/
|
|
1456
|
+
export declare type Numerals = boolean;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* Mask profanity in transcripts.
|
|
1460
|
+
*/
|
|
1461
|
+
export declare type ProfanityFilter = boolean;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Add punctuation to transcripts.
|
|
1465
|
+
*/
|
|
1466
|
+
export declare type Punctuation = boolean;
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* How closely the output matches the original voice.
|
|
1470
|
+
*/
|
|
1471
|
+
export declare type SimilarityBoost = number;
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* Inherits from top-level TTS when unset.
|
|
1475
|
+
*/
|
|
1476
|
+
export declare type SimilarityBoost1 = number;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* Apply Deepgram smart formatting (dates, times, currency, etc.).
|
|
1480
|
+
*/
|
|
1481
|
+
export declare type SmartFormat = boolean;
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Boosts similarity to the original speaker (adds slight latency).
|
|
1485
|
+
*/
|
|
1486
|
+
export declare type SpeakerBoost = boolean;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* Inherits from top-level TTS when unset.
|
|
1490
|
+
*/
|
|
1491
|
+
export declare type SpeakerBoost1 = boolean;
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* Speech rate. 1.0 = normal.
|
|
1495
|
+
*/
|
|
1496
|
+
export declare type Speed = number;
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* Speech rate. 1.0 = normal. Inherits from top-level TTS when unset.
|
|
1500
|
+
*/
|
|
1501
|
+
export declare type Speed1 = number;
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
* Lower = more expressive/variable, higher = more consistent/flat.
|
|
1505
|
+
*/
|
|
1506
|
+
export declare type Stability = number;
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* Inherits from top-level TTS when unset.
|
|
1510
|
+
*/
|
|
1511
|
+
export declare type Stability1 = number;
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Amplifies the speaker's style. 0 = off (lowest latency).
|
|
1515
|
+
*/
|
|
1516
|
+
export declare type StyleExaggeration = number;
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Inherits from top-level TTS when unset.
|
|
1520
|
+
*/
|
|
1521
|
+
export declare type StyleExaggeration1 = number;
|
|
1522
|
+
|
|
1391
1523
|
export declare function useCogito({ mode, server, configuration, applicationId, tenantId, id }: UseCogitoOptions): {
|
|
1392
1524
|
messages: CogitoMessage[];
|
|
1393
1525
|
connectionState: ConnectionState;
|