@cognigy/rest-api-client 0.16.0 → 0.18.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/CHANGELOG.md +12 -0
- package/build/GenericTusFn.js +6 -1
- package/build/GenericUploadFn.js +3 -5
- package/build/apigroups/ResourcesAPIGroup_2_0.js +12 -1
- package/build/connector/AxiosAdapter.js +35 -15
- package/build/shared/charts/createNodeDescriptor.js +5 -5
- package/build/shared/charts/descriptors/agentAssist/constants/constants.js +16 -1
- package/build/shared/charts/descriptors/agentAssist/helpers/agentAssistTranslator.helper.js +19 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/getFontSizeFieldOptions.js +84 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/getLanguageName.helper.js +33 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/answerExtraction.helper.js +59 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/configValidator.helper.js +20 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/errorHandler.helper.js +64 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/followUpDetection.helper.js +72 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/knowledgeSearch.helper.js +58 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/sentiment.helper.js +7 -13
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/identityAssistTemplate.js +17 -18
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +345 -152
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/nextActionWidgetTemplate.js +212 -80
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/sentimentAnalysisTemplate.js +11 -6
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/transcriptAssistTemplate.js +15 -13
- package/build/shared/charts/descriptors/agentAssist/identityAssist.js +87 -14
- package/build/shared/charts/descriptors/agentAssist/knowledgeAssist.js +192 -327
- package/build/shared/charts/descriptors/agentAssist/locales/cs.locale.js +11 -0
- package/build/shared/charts/descriptors/agentAssist/locales/de.locale.js +11 -0
- package/build/shared/charts/descriptors/agentAssist/locales/en.locale.js +11 -0
- package/build/shared/charts/descriptors/agentAssist/locales/es.locale.js +11 -0
- package/build/shared/charts/descriptors/agentAssist/locales/fr.locale.js +11 -0
- package/build/shared/charts/descriptors/agentAssist/locales/index.js +22 -0
- package/build/shared/charts/descriptors/agentAssist/locales/ja.locale.js +11 -0
- package/build/shared/charts/descriptors/agentAssist/locales/ko.locale.js +11 -0
- package/build/shared/charts/descriptors/agentAssist/locales/pt.locale.js +11 -0
- package/build/shared/charts/descriptors/agentAssist/nextActionAssist.js +485 -10
- package/build/shared/charts/descriptors/agentAssist/sentimentAssist.js +31 -8
- package/build/shared/charts/descriptors/agentAssist/setAgentAssistGrid.js +31 -16
- package/build/shared/charts/descriptors/agentAssist/transcriptAssist.js +40 -2
- package/build/shared/charts/descriptors/allFields.js +6 -0
- package/build/shared/charts/descriptors/analytics/requestRating.js +56 -2
- package/build/shared/charts/descriptors/index.js +1 -3
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +1 -1
- package/build/shared/charts/descriptors/logic/goTo.js +3 -3
- package/build/shared/charts/descriptors/message/question/optionalQuestion.js +1 -1
- package/build/shared/charts/descriptors/message/question/question.js +123 -2
- package/build/shared/charts/descriptors/message/question/utils/evaluateQuestionAnswer.js +44 -3
- package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +27 -7
- package/build/shared/charts/descriptors/nlu/index.js +1 -3
- package/build/shared/charts/descriptors/service/GPTPrompt.js +320 -22
- package/build/shared/charts/descriptors/service/LLMEntityExtract.js +274 -0
- package/build/shared/charts/descriptors/service/httpRequest.js +33 -1
- package/build/shared/charts/descriptors/service/index.js +3 -1
- package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +35 -25
- package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +15 -11
- package/build/shared/charts/descriptors/voice/nodes/play.js +8 -1
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +51 -75
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +0 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +38 -71
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +17 -25
- package/build/shared/charts/helpers/generativeAI/generativeAIPrompts.js +55 -0
- package/build/shared/helper/BaseContext.js +31 -0
- package/build/shared/interfaces/appsession/IAppSession.js +3 -0
- package/build/shared/interfaces/appsession/ISetAppState.js +3 -0
- package/build/shared/interfaces/appsession/index.js +3 -0
- package/build/shared/interfaces/fileStorage.js +6 -0
- package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +33 -2
- package/build/shared/interfaces/handover.js +2 -1
- package/build/shared/interfaces/messageAPI/endpoints.js +17 -2
- package/build/shared/interfaces/messageAPI/handover.js +9 -5
- package/build/shared/interfaces/nlu/nlu.js +3 -0
- package/build/shared/interfaces/resources/IAuditEvent.js +10 -9
- package/build/shared/interfaces/resources/ILargeLanguageModel.js +34 -20
- package/build/shared/interfaces/resources/IMilestone.js +50 -0
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +85 -75
- package/build/shared/interfaces/resources/TResourceType.js +12 -5
- package/build/shared/interfaces/resources/TSocketChannelType.js +5 -1
- package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
- package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/ICallCounterAggregatedValue_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/IGetCallCounterOrganisationRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/IGetCallCounterRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/ICloneMilestoneRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/ICreateMilestoneRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IDeleteMilestoneRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IIndexMilestonesRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestoneIndexItem_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestoneStepMetric_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestoneStep_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestone_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IReadMilestoneRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IUpdateMilestoneRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/IUploadResumableRest_2_0.js +3 -1
- package/build/shared/interfaces/security/ICallCounterAggregatedValue.js +3 -0
- package/build/shared/interfaces/security/IPermission.js +5 -2
- package/build/shared/interfaces/security/IRole.js +6 -0
- package/build/shared/interfaces/security/index.js +2 -1
- package/build/shared/interfaces/trainer/ITrainerRecord.js +2 -0
- package/package.json +2 -2
- package/types/index.d.ts +1053 -169
- package/build/shared/charts/descriptors/nlu/extractAnswer.js +0 -115
|
@@ -8,22 +8,6 @@ const setSessionConfig_mapper_1 = require("../mappers/setSessionConfig.mapper");
|
|
|
8
8
|
const design_1 = require("../utils/design");
|
|
9
9
|
const vgConstants_1 = require("../utils/vgConstants");
|
|
10
10
|
exports.voiceConfigFields = [
|
|
11
|
-
{
|
|
12
|
-
key: "sttVendor",
|
|
13
|
-
type: "sttSelect",
|
|
14
|
-
label: "_unused_",
|
|
15
|
-
description: "_unused_",
|
|
16
|
-
defaultValue: "",
|
|
17
|
-
params: {
|
|
18
|
-
languageKey: "config.sttLanguage"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
key: "sttLanguage",
|
|
23
|
-
type: "sttSelect",
|
|
24
|
-
defaultValue: "",
|
|
25
|
-
label: "_unused_",
|
|
26
|
-
},
|
|
27
11
|
{
|
|
28
12
|
key: "sttHints",
|
|
29
13
|
type: "textArray",
|
|
@@ -97,32 +81,12 @@ exports.voiceConfigFields = [
|
|
|
97
81
|
]
|
|
98
82
|
}
|
|
99
83
|
},
|
|
100
|
-
{
|
|
101
|
-
key: "sttDeepgramTier",
|
|
102
|
-
type: "sttTierModelSelect",
|
|
103
|
-
label: "_unused_",
|
|
104
|
-
description: "_unused_",
|
|
105
|
-
defaultValue: "base",
|
|
106
|
-
params: {
|
|
107
|
-
languageKey: "config.sttDeepgramModel",
|
|
108
|
-
},
|
|
109
|
-
condition: {
|
|
110
|
-
key: "sttVendor",
|
|
111
|
-
value: "deepgram"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
key: "sttDeepgramModel",
|
|
116
|
-
type: "sttTierModelSelect",
|
|
117
|
-
defaultValue: "general",
|
|
118
|
-
label: "_unused_",
|
|
119
|
-
},
|
|
120
84
|
{
|
|
121
85
|
key: "deepgramEndpointing",
|
|
122
86
|
type: "toggle",
|
|
123
87
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING__LABEL",
|
|
124
88
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING__DESCRIPTION",
|
|
125
|
-
defaultValue:
|
|
89
|
+
defaultValue: true,
|
|
126
90
|
condition: {
|
|
127
91
|
key: "sttVendor",
|
|
128
92
|
value: "deepgram"
|
|
@@ -133,7 +97,7 @@ exports.voiceConfigFields = [
|
|
|
133
97
|
type: "number",
|
|
134
98
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING_TIME__LABEL",
|
|
135
99
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING_TIME__DESCRIPTION",
|
|
136
|
-
defaultValue:
|
|
100
|
+
defaultValue: 250,
|
|
137
101
|
params: {
|
|
138
102
|
min: 10,
|
|
139
103
|
max: 1000
|
|
@@ -167,7 +131,11 @@ exports.voiceConfigFields = [
|
|
|
167
131
|
type: "toggle",
|
|
168
132
|
label: "UI__NODE_EDITOR__ENABLE_ADVANCED_STT_CONFIG__LABEL",
|
|
169
133
|
description: "UI__NODE_EDITOR__ENABLE_ADVANCED_STT_CONFIG__DESCRIPTION",
|
|
170
|
-
defaultValue: false
|
|
134
|
+
defaultValue: false,
|
|
135
|
+
condition: {
|
|
136
|
+
key: "sttVendor",
|
|
137
|
+
value: "microsoft"
|
|
138
|
+
}
|
|
171
139
|
},
|
|
172
140
|
{
|
|
173
141
|
key: "azureSttContextId",
|
|
@@ -254,59 +222,68 @@ exports.voiceConfigFields = [
|
|
|
254
222
|
],
|
|
255
223
|
},
|
|
256
224
|
},
|
|
257
|
-
{
|
|
258
|
-
key: "enableAdvancedTTSConfig",
|
|
259
|
-
type: "toggle",
|
|
260
|
-
label: "UI__NODE_EDITOR__ENABLE_ADVANCED_TTS_CONFIG__LABEL",
|
|
261
|
-
description: "UI__NODE_EDITOR__ENABLE_ADVANCED_TTS_CONFIG__DESCRIPTION",
|
|
262
|
-
defaultValue: false,
|
|
263
|
-
condition: {
|
|
264
|
-
key: "ttsVendor",
|
|
265
|
-
value: "microsoft"
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
key: "azureTtsDeploymentId",
|
|
270
|
-
type: "cognigyText",
|
|
271
|
-
label: "UI__NODE_EDITOR__AZURE_TTS_DEPLOYMENT_ID__LABEL",
|
|
272
|
-
description: "UI__NODE_EDITOR__AZURE_TTS_DEPLOYMENT_ID__DESCRIPTION",
|
|
273
|
-
defaultValue: "",
|
|
274
|
-
condition: {
|
|
275
|
-
and: [
|
|
276
|
-
{
|
|
277
|
-
key: "enableAdvancedTTSConfig",
|
|
278
|
-
value: true
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
key: "ttsVendor",
|
|
282
|
-
value: "microsoft"
|
|
283
|
-
}
|
|
284
|
-
]
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
225
|
{
|
|
288
226
|
key: "ttsVendor",
|
|
289
|
-
defaultValue: "",
|
|
290
227
|
type: "ttsSelect",
|
|
291
228
|
label: "_unused_",
|
|
292
229
|
description: "_unused_",
|
|
230
|
+
defaultValue: "",
|
|
293
231
|
params: {
|
|
232
|
+
modelKey: "config.ttsModel",
|
|
294
233
|
languageKey: "config.ttsLanguage",
|
|
295
234
|
voiceKey: "config.ttsVoice"
|
|
296
235
|
}
|
|
297
236
|
},
|
|
237
|
+
{
|
|
238
|
+
key: "ttsModel",
|
|
239
|
+
type: "ttsSelect",
|
|
240
|
+
label: "_unused_",
|
|
241
|
+
description: "_unused_",
|
|
242
|
+
defaultValue: "",
|
|
243
|
+
},
|
|
298
244
|
{
|
|
299
245
|
key: "ttsVoice",
|
|
300
246
|
type: "ttsSelect",
|
|
247
|
+
label: "_unused_",
|
|
248
|
+
description: "_unused_",
|
|
301
249
|
defaultValue: "",
|
|
302
|
-
label: "_unused_"
|
|
303
250
|
},
|
|
304
251
|
{
|
|
305
252
|
key: "ttsLanguage",
|
|
306
253
|
type: "ttsSelect",
|
|
254
|
+
label: "_unused_",
|
|
255
|
+
description: "_unused_",
|
|
256
|
+
defaultValue: "",
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
key: "sttVendor",
|
|
260
|
+
type: "sttSelect",
|
|
261
|
+
label: "_unused_",
|
|
262
|
+
description: "_unused_",
|
|
263
|
+
defaultValue: "",
|
|
264
|
+
params: {
|
|
265
|
+
languageKey: "config.sttLanguage",
|
|
266
|
+
modelKey: "config.sttDeepgramModel",
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
key: "sttLanguage",
|
|
271
|
+
type: "sttSelect",
|
|
272
|
+
label: "_unused_",
|
|
273
|
+
description: "_unused_",
|
|
307
274
|
defaultValue: "",
|
|
308
|
-
|
|
309
|
-
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
key: "sttDeepgramModel",
|
|
278
|
+
type: "sttSelect",
|
|
279
|
+
label: "_unused_",
|
|
280
|
+
description: "_unused_",
|
|
281
|
+
defaultValue: "",
|
|
282
|
+
condition: {
|
|
283
|
+
key: "sttVendor",
|
|
284
|
+
value: "deepgram"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
310
287
|
];
|
|
311
288
|
exports.SESSION_SPEECH_PARAMETERS = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
312
289
|
type: "sessionSpeechParameters",
|
|
@@ -324,7 +301,6 @@ exports.SESSION_SPEECH_PARAMETERS = (0, createNodeDescriptor_1.createNodeDescrip
|
|
|
324
301
|
defaultCollapsed: true,
|
|
325
302
|
fields: [
|
|
326
303
|
"sttVendor",
|
|
327
|
-
"sttDeepgramTier",
|
|
328
304
|
"deepgramEndpointing",
|
|
329
305
|
"deepgramEndpointingValue",
|
|
330
306
|
"deepgramSmartFormatting",
|
|
@@ -341,7 +317,7 @@ exports.SESSION_SPEECH_PARAMETERS = (0, createNodeDescriptor_1.createNodeDescrip
|
|
|
341
317
|
key: "params_tts",
|
|
342
318
|
label: "UI__NODE_EDITOR__SESSION_SPEECH_PARAMETERS__SECTIONS__PARAMS_TTS__LABEL",
|
|
343
319
|
defaultCollapsed: true,
|
|
344
|
-
fields: ["ttsVendor"
|
|
320
|
+
fields: ["ttsVendor"],
|
|
345
321
|
},
|
|
346
322
|
],
|
|
347
323
|
form: [
|
|
@@ -35,48 +35,12 @@ exports.voiceConfigFields = [
|
|
|
35
35
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__BARGE_IN_ON_DTMF__DESCRIPTION",
|
|
36
36
|
defaultValue: false
|
|
37
37
|
},
|
|
38
|
-
{
|
|
39
|
-
key: "sttVendor",
|
|
40
|
-
type: "sttSelect",
|
|
41
|
-
label: "_unused_",
|
|
42
|
-
description: "_unused_",
|
|
43
|
-
defaultValue: "",
|
|
44
|
-
params: {
|
|
45
|
-
languageKey: "config.sttLanguage",
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
key: "sttLanguage",
|
|
50
|
-
type: "sttSelect",
|
|
51
|
-
defaultValue: "",
|
|
52
|
-
label: "_unused_",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
key: "sttDeepgramTier",
|
|
56
|
-
type: "sttTierModelSelect",
|
|
57
|
-
label: "_unused_",
|
|
58
|
-
description: "_unused_",
|
|
59
|
-
defaultValue: "base",
|
|
60
|
-
params: {
|
|
61
|
-
languageKey: "config.sttDeepgramModel",
|
|
62
|
-
},
|
|
63
|
-
condition: {
|
|
64
|
-
key: "sttVendor",
|
|
65
|
-
value: "deepgram"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
key: "sttDeepgramModel",
|
|
70
|
-
type: "sttTierModelSelect",
|
|
71
|
-
defaultValue: "general",
|
|
72
|
-
label: "_unused_",
|
|
73
|
-
},
|
|
74
38
|
{
|
|
75
39
|
key: "deepgramEndpointing",
|
|
76
40
|
type: "toggle",
|
|
77
41
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING__LABEL",
|
|
78
42
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING__DESCRIPTION",
|
|
79
|
-
defaultValue:
|
|
43
|
+
defaultValue: true,
|
|
80
44
|
condition: {
|
|
81
45
|
key: "sttVendor",
|
|
82
46
|
value: "deepgram"
|
|
@@ -87,7 +51,7 @@ exports.voiceConfigFields = [
|
|
|
87
51
|
type: "number",
|
|
88
52
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING_TIME__LABEL",
|
|
89
53
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING_TIME__DESCRIPTION",
|
|
90
|
-
defaultValue:
|
|
54
|
+
defaultValue: 250,
|
|
91
55
|
params: {
|
|
92
56
|
min: 10,
|
|
93
57
|
max: 1000
|
|
@@ -275,6 +239,35 @@ exports.voiceConfigFields = [
|
|
|
275
239
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_DISABLE_CACHE__DESCRIPTION",
|
|
276
240
|
defaultValue: false
|
|
277
241
|
},
|
|
242
|
+
{
|
|
243
|
+
key: "sttVendor",
|
|
244
|
+
type: "sttSelect",
|
|
245
|
+
label: "_unused_",
|
|
246
|
+
description: "_unused_",
|
|
247
|
+
defaultValue: "",
|
|
248
|
+
params: {
|
|
249
|
+
languageKey: "config.sttLanguage",
|
|
250
|
+
modelKey: "config.sttDeepgramModel",
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
key: "sttLanguage",
|
|
255
|
+
type: "sttSelect",
|
|
256
|
+
label: "_unused_",
|
|
257
|
+
description: "_unused_",
|
|
258
|
+
defaultValue: "",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
key: "sttDeepgramModel",
|
|
262
|
+
type: "sttSelect",
|
|
263
|
+
label: "_unused_",
|
|
264
|
+
description: "_unused_",
|
|
265
|
+
defaultValue: "",
|
|
266
|
+
condition: {
|
|
267
|
+
key: "sttVendor",
|
|
268
|
+
value: "deepgram"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
278
271
|
{
|
|
279
272
|
key: "ttsVendor",
|
|
280
273
|
defaultValue: "",
|
|
@@ -283,9 +276,16 @@ exports.voiceConfigFields = [
|
|
|
283
276
|
description: "_unused_",
|
|
284
277
|
params: {
|
|
285
278
|
languageKey: "config.ttsLanguage",
|
|
279
|
+
modelKey: "config.ttsModel",
|
|
286
280
|
voiceKey: "config.ttsVoice"
|
|
287
281
|
}
|
|
288
282
|
},
|
|
283
|
+
{
|
|
284
|
+
key: "ttsModel",
|
|
285
|
+
type: "ttsSelect",
|
|
286
|
+
defaultValue: "",
|
|
287
|
+
label: "_unused_"
|
|
288
|
+
},
|
|
289
289
|
{
|
|
290
290
|
key: "ttsVoice",
|
|
291
291
|
type: "ttsSelect",
|
|
@@ -663,36 +663,6 @@ exports.voiceConfigFields = [
|
|
|
663
663
|
],
|
|
664
664
|
},
|
|
665
665
|
},
|
|
666
|
-
{
|
|
667
|
-
key: "enableAdvancedTTSConfig",
|
|
668
|
-
type: "toggle",
|
|
669
|
-
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__ENABLE_ADVANCED_TTS_CONFIG__LABEL",
|
|
670
|
-
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__ENABLE_ADVANCED_TTS_CONFIG__DESCRIPTION",
|
|
671
|
-
defaultValue: false,
|
|
672
|
-
condition: {
|
|
673
|
-
key: "ttsVendor",
|
|
674
|
-
value: "microsoft",
|
|
675
|
-
}
|
|
676
|
-
},
|
|
677
|
-
{
|
|
678
|
-
key: "azureTtsDeploymentId",
|
|
679
|
-
type: "cognigyText",
|
|
680
|
-
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__AZURE_TTS_DEPLOYMENT_ID__LABEL",
|
|
681
|
-
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__AZURE_TTS_DEPLOYMENT_ID__DESCRIPTION",
|
|
682
|
-
defaultValue: "",
|
|
683
|
-
condition: {
|
|
684
|
-
and: [
|
|
685
|
-
{
|
|
686
|
-
key: "enableAdvancedTTSConfig",
|
|
687
|
-
value: true
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
key: "ttsVendor",
|
|
691
|
-
value: "microsoft"
|
|
692
|
-
}
|
|
693
|
-
]
|
|
694
|
-
}
|
|
695
|
-
},
|
|
696
666
|
{
|
|
697
667
|
key: "sessionParams",
|
|
698
668
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__SESSION_PARAMS__LABEL",
|
|
@@ -719,7 +689,6 @@ exports.setSessionConfigNode = (0, createNodeDescriptor_1.createNodeDescriptor)(
|
|
|
719
689
|
fields: [
|
|
720
690
|
"sttVendor",
|
|
721
691
|
"sttLabel",
|
|
722
|
-
"sttDeepgramTier",
|
|
723
692
|
"deepgramEndpointing",
|
|
724
693
|
"deepgramEndpointingValue",
|
|
725
694
|
"deepgramSmartFormatting",
|
|
@@ -746,8 +715,6 @@ exports.setSessionConfigNode = (0, createNodeDescriptor_1.createNodeDescriptor)(
|
|
|
746
715
|
fields: [
|
|
747
716
|
"ttsVendor",
|
|
748
717
|
"ttsLabel",
|
|
749
|
-
"enableAdvancedTTSConfig",
|
|
750
|
-
"azureTtsDeploymentId",
|
|
751
718
|
"ttsDisableCache",
|
|
752
719
|
],
|
|
753
720
|
},
|
|
@@ -242,18 +242,31 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
242
242
|
description: "_unused_",
|
|
243
243
|
defaultValue: "",
|
|
244
244
|
params: {
|
|
245
|
-
languageKey: "config.sttLanguage"
|
|
245
|
+
languageKey: "config.sttLanguage",
|
|
246
|
+
modelKey: "config.sttDeepgramModel"
|
|
246
247
|
},
|
|
247
248
|
condition: {
|
|
248
249
|
key: "transferType",
|
|
249
250
|
value: "dial"
|
|
250
251
|
}
|
|
251
252
|
},
|
|
253
|
+
{
|
|
254
|
+
key: "sttDeepgramModel",
|
|
255
|
+
type: "sttSelect",
|
|
256
|
+
label: "_unused_",
|
|
257
|
+
description: "_unused_",
|
|
258
|
+
defaultValue: "nova-2",
|
|
259
|
+
condition: {
|
|
260
|
+
key: "sttVendor",
|
|
261
|
+
value: "deepgram"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
252
264
|
{
|
|
253
265
|
key: "sttLanguage",
|
|
254
266
|
type: "sttSelect",
|
|
267
|
+
label: "_unused_",
|
|
268
|
+
description: "_unused_",
|
|
255
269
|
defaultValue: "",
|
|
256
|
-
label: "_unused_"
|
|
257
270
|
},
|
|
258
271
|
{
|
|
259
272
|
key: "sttDisablePunctuation",
|
|
@@ -274,26 +287,6 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
274
287
|
]
|
|
275
288
|
}
|
|
276
289
|
},
|
|
277
|
-
{
|
|
278
|
-
key: "sttDeepgramTier",
|
|
279
|
-
type: "sttTierModelSelect",
|
|
280
|
-
label: "_unused_",
|
|
281
|
-
description: "_unused_",
|
|
282
|
-
defaultValue: "base",
|
|
283
|
-
params: {
|
|
284
|
-
languageKey: "config.sttDeepgramModel"
|
|
285
|
-
},
|
|
286
|
-
condition: {
|
|
287
|
-
key: "sttVendor",
|
|
288
|
-
value: "deepgram"
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
key: "sttDeepgramModel",
|
|
293
|
-
type: "sttTierModelSelect",
|
|
294
|
-
defaultValue: "general",
|
|
295
|
-
label: "_unused_"
|
|
296
|
-
},
|
|
297
290
|
{
|
|
298
291
|
key: "deepgramEndpointing",
|
|
299
292
|
type: "toggle",
|
|
@@ -396,7 +389,6 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
396
389
|
"sttVendor",
|
|
397
390
|
"sttLabel",
|
|
398
391
|
"sttDisablePunctuation",
|
|
399
|
-
"sttDeepgramTier",
|
|
400
392
|
"deepgramEndpointing",
|
|
401
393
|
"deepgramEndpointingValue",
|
|
402
394
|
"deepgramSmartFormatting",
|
|
@@ -480,7 +472,7 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
480
472
|
summary: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__SUMMARY",
|
|
481
473
|
function: async ({ cognigy, config, organisationId, projectId }) => {
|
|
482
474
|
const { api, input } = cognigy;
|
|
483
|
-
const { transferType, transferTarget, referredBy, useTransferSipHeaders, transferSipHeaders = {}, transferReason, dialMusic, dialTranscriptionWebhook, dialCallerId, recognitionChannel, sttVendor, sttLanguage, sttDisablePunctuation, dialTimeout, amdEnabled, amdRedirectOnMachineDetected, amdRedirectText, sttLabel, googleModel,
|
|
475
|
+
const { transferType, transferTarget, referredBy, useTransferSipHeaders, transferSipHeaders = {}, transferReason, dialMusic, dialTranscriptionWebhook, dialCallerId, recognitionChannel, sttVendor, sttLanguage, sttDisablePunctuation, dialTimeout, amdEnabled, amdRedirectOnMachineDetected, amdRedirectText, sttLabel, googleModel, sttDeepgramModel, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting, agentAssistEnabled, agentAssistHeadersKey = customHeaderDefaultValue } = config;
|
|
484
476
|
const transferParams = {
|
|
485
477
|
transferType,
|
|
486
478
|
transferReason,
|
|
@@ -539,7 +531,7 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
539
531
|
transferParams.useTransferSipHeaders = false;
|
|
540
532
|
api.log("error", "Invalid JSON in Transfer SIP Headers");
|
|
541
533
|
}
|
|
542
|
-
const payload = transfer_mapper_1.transfer.handleInput("voiceGateway2", transferParams, false, recognitionChannel, sttVendor, sttLanguage, googleModel,
|
|
534
|
+
const payload = transfer_mapper_1.transfer.handleInput("voiceGateway2", transferParams, false, recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting);
|
|
543
535
|
api.say(null, {
|
|
544
536
|
_cognigy: payload,
|
|
545
537
|
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLLMEntityExtractSystemMessage = exports.getLLMEntityExtractPrompt = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Helper function for the LLM Entity Extract functionality
|
|
6
|
+
* @param entityName Name of the entity to extract
|
|
7
|
+
* @param entityDescription Description of the entity to extract
|
|
8
|
+
* @param examples Examples of the entity to extract
|
|
9
|
+
* @param text The text to extract the entity from
|
|
10
|
+
* @returns The prompt for the LLM Entity Extract functionality
|
|
11
|
+
*/
|
|
12
|
+
const getLLMEntityExtractPrompt = (entityName, entityDescription, examples, text) => {
|
|
13
|
+
let formattedExamples = "";
|
|
14
|
+
examples && Object.keys(examples).forEach((key) => {
|
|
15
|
+
formattedExamples += `- "${key}" - { "${entityName}": "` + examples[key] + `" }\n`;
|
|
16
|
+
});
|
|
17
|
+
// add one negative example to formattedExamples
|
|
18
|
+
formattedExamples += `- "sdf sdf sdf" - { "${entityName}": null }\n`;
|
|
19
|
+
const prompt = `Your task is to parse an unstructured text and return a valid JSON with an extracted entity.
|
|
20
|
+
The entity you're to extract is ${entityName} - ${entityDescription}.
|
|
21
|
+
If you can't find a ${entityName}, return { "${entityName}": null }.
|
|
22
|
+
Examples:
|
|
23
|
+
${formattedExamples}
|
|
24
|
+
|
|
25
|
+
The given text is: "${text}"
|
|
26
|
+
|
|
27
|
+
Answer: {"${entityName}":`;
|
|
28
|
+
return prompt;
|
|
29
|
+
};
|
|
30
|
+
exports.getLLMEntityExtractPrompt = getLLMEntityExtractPrompt;
|
|
31
|
+
/**
|
|
32
|
+
* Helper function for the LLM Entity Extract functionality
|
|
33
|
+
* @param entityName Name of the entity to extract
|
|
34
|
+
* @param entityDescription Description of the entity to extract
|
|
35
|
+
* @param examples Examples of the entity to extract
|
|
36
|
+
* @returns The system instrctions for the LLM Entity Extract functionality when using chat models
|
|
37
|
+
*/
|
|
38
|
+
const getLLMEntityExtractSystemMessage = (entityName, entityDescription, examples) => {
|
|
39
|
+
let formattedExamples = "";
|
|
40
|
+
examples && Object.keys(examples).forEach((key) => {
|
|
41
|
+
formattedExamples += `- "${key}" - { "${entityName}": "` + examples[key] + `" }\n`;
|
|
42
|
+
});
|
|
43
|
+
// add one negative example to formattedExamples
|
|
44
|
+
formattedExamples += `- "sdf sdf sdf" - { "${entityName}": null }\n`;
|
|
45
|
+
const prompt = `Your task is to parse an unstructured text and return a valid JSON with an extracted entity.
|
|
46
|
+
The entity you're to extract is ${entityName} - ${entityDescription}.
|
|
47
|
+
If you can't find a ${entityName}, return { "${entityName}": null }.
|
|
48
|
+
Examples:
|
|
49
|
+
${formattedExamples}
|
|
50
|
+
|
|
51
|
+
Answer: {"${entityName}":`;
|
|
52
|
+
return prompt;
|
|
53
|
+
};
|
|
54
|
+
exports.getLLMEntityExtractSystemMessage = getLLMEntityExtractSystemMessage;
|
|
55
|
+
//# sourceMappingURL=generativeAIPrompts.js.map
|
|
@@ -34,6 +34,14 @@ class BaseContext {
|
|
|
34
34
|
createProxy(initial = {}) {
|
|
35
35
|
return new Proxy(initial, {
|
|
36
36
|
set: (obj, prop, value) => {
|
|
37
|
+
if (!prop) {
|
|
38
|
+
logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to set context with an invalid key '${prop === null || prop === void 0 ? void 0 : prop.toString()}' (context with an invalid key cannot be set).`, {
|
|
39
|
+
key: prop,
|
|
40
|
+
module: "BaseContext.ts",
|
|
41
|
+
function: "set:createProxy"
|
|
42
|
+
});
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
37
45
|
if (this.ignoreTrapHandler) {
|
|
38
46
|
obj[prop] = value;
|
|
39
47
|
return true;
|
|
@@ -123,6 +131,14 @@ class BaseContext {
|
|
|
123
131
|
* @memberOf Context
|
|
124
132
|
*/
|
|
125
133
|
getContext(key) {
|
|
134
|
+
if (!key) {
|
|
135
|
+
logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to get context with an invalid key '${key}' (context with an invalid key cannot be accessed).`, {
|
|
136
|
+
key,
|
|
137
|
+
module: "BaseContext.ts",
|
|
138
|
+
function: "getContext"
|
|
139
|
+
});
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
126
142
|
let s = [];
|
|
127
143
|
if (key.indexOf(".") > -1)
|
|
128
144
|
s = key.split(".");
|
|
@@ -159,6 +175,14 @@ class BaseContext {
|
|
|
159
175
|
* @memberOf Context
|
|
160
176
|
*/
|
|
161
177
|
setContext(key, value, traceId) {
|
|
178
|
+
if (!key) {
|
|
179
|
+
logger_1.logger.log("debug", { traceId, disableSensitiveLogging: true }, `Trying to set context with an invalid key '${key}' (context with an invalid key cannot be set).`, {
|
|
180
|
+
key,
|
|
181
|
+
module: "BaseContext.ts",
|
|
182
|
+
function: "setContext"
|
|
183
|
+
});
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
162
186
|
this.context[key] = value;
|
|
163
187
|
}
|
|
164
188
|
/**
|
|
@@ -214,6 +238,13 @@ class BaseContext {
|
|
|
214
238
|
* @memberOf Context
|
|
215
239
|
*/
|
|
216
240
|
delete(key) {
|
|
241
|
+
if (!key) {
|
|
242
|
+
logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to delete key from the context with an invalid key '${key}' (context with an invalid key cannot be accessed).`, {
|
|
243
|
+
key,
|
|
244
|
+
module: "BaseContext.ts",
|
|
245
|
+
function: "delete"
|
|
246
|
+
});
|
|
247
|
+
}
|
|
217
248
|
delete this.context[key];
|
|
218
249
|
}
|
|
219
250
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* MODELS
|
|
4
4
|
**********/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders = exports.generativeAIModels = void 0;
|
|
6
|
+
exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders = exports.modelGroups = exports.generativeAIModels = exports.embeddingModels = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* @openapi
|
|
9
9
|
*
|
|
@@ -18,24 +18,54 @@ exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders
|
|
|
18
18
|
* - gpt-4
|
|
19
19
|
* - text-embedding-ada-002
|
|
20
20
|
* - luminous-extended-control
|
|
21
|
+
* - luminous-embedding-128
|
|
21
22
|
* - claude-v1-100k
|
|
22
23
|
* - claude-instant-v1
|
|
24
|
+
* - claude-3-opus-20240229
|
|
23
25
|
* - text-bison@001
|
|
24
26
|
*/
|
|
25
27
|
/**
|
|
26
28
|
* WARNING: if new models are added for the supported providers make suer we also update the
|
|
27
29
|
* maxAllowed tokens in the openAI.ts and azureOpenAI.ts files
|
|
28
30
|
*/
|
|
31
|
+
exports.embeddingModels = [
|
|
32
|
+
"text-embedding-3-large",
|
|
33
|
+
"text-embedding-ada-002",
|
|
34
|
+
"luminous-embedding-128",
|
|
35
|
+
];
|
|
29
36
|
exports.generativeAIModels = [
|
|
30
37
|
"gpt-3.5-turbo",
|
|
31
38
|
"gpt-3.5-turbo-instruct",
|
|
32
39
|
"gpt-4",
|
|
33
40
|
"text-davinci-003",
|
|
34
|
-
"text-embedding-ada-002",
|
|
35
41
|
"luminous-extended-control",
|
|
36
42
|
"claude-v1-100k",
|
|
37
43
|
"claude-instant-v1",
|
|
44
|
+
"claude-3-opus-20240229",
|
|
45
|
+
"claude-3-haiku-20240307",
|
|
46
|
+
"claude-3-sonnet-20240229",
|
|
38
47
|
"text-bison@001",
|
|
48
|
+
"custom-model",
|
|
49
|
+
...exports.embeddingModels,
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* @openapi
|
|
53
|
+
*
|
|
54
|
+
* components:
|
|
55
|
+
* schemas:
|
|
56
|
+
* TModelGroups:
|
|
57
|
+
* type: string
|
|
58
|
+
* enum:
|
|
59
|
+
* - chat
|
|
60
|
+
* - completion
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
/**
|
|
64
|
+
* this is the model type for the custom models introduced by the user
|
|
65
|
+
*/
|
|
66
|
+
exports.modelGroups = [
|
|
67
|
+
"chat",
|
|
68
|
+
"completion"
|
|
39
69
|
];
|
|
40
70
|
/*************
|
|
41
71
|
* PROVIDERS
|
|
@@ -63,6 +93,7 @@ exports.generativeAIProviders = ["azureOpenAI", "openAI", "alephAlpha", "anthrop
|
|
|
63
93
|
* mongoose schema too. models/settings/generativeAISettings.ts
|
|
64
94
|
*/
|
|
65
95
|
exports.generativeAIUseCases = [
|
|
96
|
+
"nlu",
|
|
66
97
|
"knowledgeSearch",
|
|
67
98
|
"gptPromptNode",
|
|
68
99
|
"gptConversation",
|
|
@@ -119,7 +119,8 @@ exports.foreignSessionDataSchema = {
|
|
|
119
119
|
lastname: { type: "string" },
|
|
120
120
|
nickname: { type: "string" },
|
|
121
121
|
integrationId: { type: "string" },
|
|
122
|
-
conversationId: { type: "string" }
|
|
122
|
+
conversationId: { type: "string" },
|
|
123
|
+
clientPollTimeout: { type: "number" },
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
126
|
exports.rceSettingsSchema = {
|