@cognigy/rest-api-client 0.17.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 +6 -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 +330 -153
- 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/transcriptAssist.js +40 -2
- 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/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 +28 -12
- 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 +17 -13
- package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +4 -4
- package/build/shared/charts/descriptors/voice/nodes/play.js +8 -1
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +44 -45
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +0 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +31 -39
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +17 -25
- package/build/shared/charts/helpers/generativeAI/generativeAIPrompts.js +55 -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 +32 -3
- package/build/shared/interfaces/handover.js +2 -1
- package/build/shared/interfaces/messageAPI/endpoints.js +15 -2
- package/build/shared/interfaces/messageAPI/handover.js +5 -1
- 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 +84 -75
- package/build/shared/interfaces/resources/TResourceType.js +12 -5
- package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -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/IPermission.js +4 -2
- package/build/shared/interfaces/security/index.js +1 -1
- package/package.json +2 -2
- package/types/index.d.ts +938 -285
- package/build/shared/charts/descriptors/nlu/extractAnswer.js +0 -115
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EXTRACT_ANSWER = void 0;
|
|
4
|
-
/* Custom modules */
|
|
5
|
-
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
|
-
/**
|
|
7
|
-
* Node name: 'extractAnswer'
|
|
8
|
-
*
|
|
9
|
-
* Purpose:
|
|
10
|
-
* Answers a question based on a given context with the built-in question answering module
|
|
11
|
-
*/
|
|
12
|
-
exports.EXTRACT_ANSWER = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
13
|
-
type: "extractAnswer",
|
|
14
|
-
defaultLabel: "Extract Answer",
|
|
15
|
-
summary: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__SUMMARY",
|
|
16
|
-
appearance: {
|
|
17
|
-
showIcon: false
|
|
18
|
-
},
|
|
19
|
-
fields: [
|
|
20
|
-
{
|
|
21
|
-
key: "text",
|
|
22
|
-
type: "cognigyText",
|
|
23
|
-
label: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__TEXT__LABEL",
|
|
24
|
-
defaultValue: ""
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
key: "question",
|
|
28
|
-
type: "cognigyText",
|
|
29
|
-
label: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__QUESTION__LABEL",
|
|
30
|
-
params: {
|
|
31
|
-
required: true
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: "storeLocation",
|
|
36
|
-
type: "select",
|
|
37
|
-
label: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__STORE_LOCATION__LABEL",
|
|
38
|
-
params: {
|
|
39
|
-
options: [
|
|
40
|
-
{
|
|
41
|
-
label: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__STORE_LOCATION__OPTIONS__INPUT__LABEL",
|
|
42
|
-
value: "input"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__STORE_LOCATION__OPTIONS__CONTEXT__LABEL",
|
|
46
|
-
value: "context"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
required: true
|
|
50
|
-
},
|
|
51
|
-
defaultValue: "input"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
key: "inputKey",
|
|
55
|
-
type: "cognigyText",
|
|
56
|
-
label: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__INPUT_KEY__LABEL",
|
|
57
|
-
description: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__INPUT_KEY__DESCRIPTION",
|
|
58
|
-
defaultValue: "extractAnswer",
|
|
59
|
-
condition: {
|
|
60
|
-
key: "storeLocation",
|
|
61
|
-
value: "input"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
key: "contextKey",
|
|
66
|
-
type: "cognigyText",
|
|
67
|
-
label: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__CONETEXT_KEY__LABEL",
|
|
68
|
-
description: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__FIELDS__CONETEXT_KEY__DESCRIPTION",
|
|
69
|
-
defaultValue: "extractAnswer",
|
|
70
|
-
condition: {
|
|
71
|
-
key: "storeLocation",
|
|
72
|
-
value: "context"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
sections: [
|
|
77
|
-
{
|
|
78
|
-
key: "storage",
|
|
79
|
-
label: "UI__NODE_EDITOR__NLU__EXTRACT_ANSWER__SECTIONS__STORAGE__LABEL",
|
|
80
|
-
defaultCollapsed: true,
|
|
81
|
-
fields: [
|
|
82
|
-
"storeLocation",
|
|
83
|
-
"inputKey",
|
|
84
|
-
"contextKey",
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
form: [
|
|
89
|
-
{ type: "field", key: "text" },
|
|
90
|
-
{ type: "field", key: "question" },
|
|
91
|
-
{ type: "field", key: "maxTextLength" },
|
|
92
|
-
{ type: "section", key: "storage" },
|
|
93
|
-
],
|
|
94
|
-
preview: {
|
|
95
|
-
key: "text",
|
|
96
|
-
type: "text",
|
|
97
|
-
},
|
|
98
|
-
tags: ["nlu"],
|
|
99
|
-
function: async (extractAnswerParams) => {
|
|
100
|
-
const { cognigy, config } = extractAnswerParams;
|
|
101
|
-
const { api } = cognigy;
|
|
102
|
-
const { question, storeLocation, contextKey, inputKey } = config;
|
|
103
|
-
if (!question) {
|
|
104
|
-
throw new Error("Unable to answer question. Question is missing.");
|
|
105
|
-
}
|
|
106
|
-
if (storeLocation === "context" && !contextKey) {
|
|
107
|
-
throw new Error("Unable to answer question. Context Key is missing.");
|
|
108
|
-
}
|
|
109
|
-
if (storeLocation === "input" && !inputKey) {
|
|
110
|
-
throw new Error("Unable to answer question. Input Key is missing.");
|
|
111
|
-
}
|
|
112
|
-
return await api.extractAnswer(extractAnswerParams);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
//# sourceMappingURL=extractAnswer.js.map
|