@cognigy/rest-api-client 4.95.0 → 4.97.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 +10 -0
- package/build/apigroups/ManagementAPIGroup_2_0.js +2 -1
- package/build/apigroups/ResourcesAPIGroup_2_0.js +9 -0
- package/build/authentication/AuthenticationAPI.js +6 -1
- package/build/authentication/JWT/IJwtTokenAuthentication.js +3 -0
- package/build/authentication/JWT/JwtTokenAuthentication.js +22 -0
- package/build/shared/charts/descriptors/allFields.js +6 -0
- package/build/shared/charts/descriptors/analytics/addMemory.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +6 -2
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAICompatibleProviderConnection.js +11 -0
- package/build/shared/charts/descriptors/connectionNodes/speechProviders/deepgramSpeechProviderConnection.js +11 -0
- package/build/shared/charts/descriptors/connectionNodes/speechProviders/index.js +2 -0
- package/build/shared/charts/descriptors/index.js +6 -0
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +13 -1
- package/build/shared/charts/descriptors/message/question/question.js +21 -13
- package/build/shared/charts/descriptors/message/say.js +25 -2
- package/build/shared/charts/descriptors/service/GPTPrompt.js +10 -2
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +184 -51
- package/build/shared/charts/descriptors/service/checkAgentAvailability.js +63 -3
- package/build/shared/charts/descriptors/service/handoverConnections.js +51 -0
- package/build/shared/charts/descriptors/service/handoverV2.js +124 -64
- package/build/shared/charts/descriptors/service/index.js +8 -1
- package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +4 -1
- package/build/shared/charts/descriptors/voice/nodes/bargeIn.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/continuousAsr.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/dtmf.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/hangup.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/noUserInput.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/play.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/sendMetadata.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/transfer.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/record.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +47 -2
- package/build/shared/constants.js +10 -1
- package/build/shared/helper/nlu/textCleaner.js +10 -2
- package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +3 -0
- package/build/shared/interfaces/handover.js +74 -10
- package/build/shared/interfaces/handoverProviders.js +23 -0
- package/build/shared/interfaces/messageAPI/endpoints.js +2 -0
- package/build/shared/interfaces/messageAPI/handover.js +25 -5
- package/build/shared/interfaces/resources/IAiAgent.js +10 -0
- package/build/shared/interfaces/resources/IExternalModel.js +3 -0
- package/build/shared/interfaces/resources/IHandoverProvider.js +3 -0
- package/build/shared/interfaces/resources/ILargeLanguageModel.js +13 -2
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +9 -5
- package/build/shared/interfaces/resources/TResourceType.js +6 -0
- package/build/shared/interfaces/resources/intent/IDefaultReply.js +0 -1
- package/build/shared/interfaces/resources/settings/IAudioPreviewSettings.js +8 -2
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/ICreateHandoverProviderRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IDeleteHandoverProviderRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IHandoverProvider_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IHandoverService_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IIndexHandoverProvidersRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IIndexHandoverServicesRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IReadHandoverProviderRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IUpdateHandoverProviderRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/handoverProvider/v2.0/index.js +3 -0
- package/build/shared/interfaces/security/IPermission.js +2 -0
- package/build/shared/interfaces/security/IRole.js +2 -0
- package/build/shared/interfaces/security/index.js +1 -1
- package/dist/esm/apigroups/ManagementAPIGroup_2_0.js +2 -1
- package/dist/esm/apigroups/ResourcesAPIGroup_2_0.js +9 -0
- package/dist/esm/authentication/AuthenticationAPI.js +6 -1
- package/dist/esm/authentication/JWT/IJwtTokenAuthentication.js +2 -0
- package/dist/esm/authentication/JWT/JwtTokenAuthentication.js +21 -0
- package/dist/esm/shared/charts/descriptors/allFields.js +6 -0
- package/dist/esm/shared/charts/descriptors/analytics/addMemory.js +1 -1
- package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +4 -1
- package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAICompatibleProviderConnection.js +8 -0
- package/dist/esm/shared/charts/descriptors/connectionNodes/speechProviders/deepgramSpeechProviderConnection.js +8 -0
- package/dist/esm/shared/charts/descriptors/connectionNodes/speechProviders/index.js +2 -0
- package/dist/esm/shared/charts/descriptors/index.js +7 -1
- package/dist/esm/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +13 -1
- package/dist/esm/shared/charts/descriptors/message/question/question.js +21 -13
- package/dist/esm/shared/charts/descriptors/message/say.js +25 -2
- package/dist/esm/shared/charts/descriptors/service/GPTPrompt.js +10 -2
- package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +184 -51
- package/dist/esm/shared/charts/descriptors/service/checkAgentAvailability.js +63 -3
- package/dist/esm/shared/charts/descriptors/service/handoverConnections.js +48 -0
- package/dist/esm/shared/charts/descriptors/service/handoverV2.js +124 -64
- package/dist/esm/shared/charts/descriptors/service/index.js +1 -0
- package/dist/esm/shared/charts/descriptors/voice/mappers/transfer.mapper.js +4 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/bargeIn.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/continuousAsr.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/dtmf.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/hangup.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/noUserInput.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/play.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/sendMetadata.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/transfer.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/hangup.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/play.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/record.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/refer.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/transfer.js +47 -2
- package/dist/esm/shared/constants.js +9 -0
- package/dist/esm/shared/helper/nlu/textCleaner.js +10 -2
- package/dist/esm/shared/interfaces/generativeAI/IGenerativeAIModels.js +3 -0
- package/dist/esm/shared/interfaces/handover.js +73 -9
- package/dist/esm/shared/interfaces/handoverProviders.js +20 -0
- package/dist/esm/shared/interfaces/messageAPI/endpoints.js +2 -0
- package/dist/esm/shared/interfaces/messageAPI/handover.js +24 -4
- package/dist/esm/shared/interfaces/resources/IAiAgent.js +10 -0
- package/dist/esm/shared/interfaces/resources/IExternalModel.js +2 -0
- package/dist/esm/shared/interfaces/resources/IHandoverProvider.js +2 -0
- package/dist/esm/shared/interfaces/resources/ILargeLanguageModel.js +12 -1
- package/dist/esm/shared/interfaces/resources/INodeDescriptorSet.js +9 -5
- package/dist/esm/shared/interfaces/resources/TResourceType.js +6 -0
- package/dist/esm/shared/interfaces/resources/intent/IDefaultReply.js +0 -1
- package/dist/esm/shared/interfaces/resources/settings/IAudioPreviewSettings.js +8 -2
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/ICreateHandoverProviderRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IDeleteHandoverProviderRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IHandoverProvider_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IHandoverService_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IIndexHandoverProvidersRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IIndexHandoverServicesRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IReadHandoverProviderRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/IUpdateHandoverProviderRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/resources/handoverProvider/v2.0/index.js +2 -0
- package/dist/esm/shared/interfaces/security/IPermission.js +2 -0
- package/dist/esm/shared/interfaces/security/IRole.js +2 -0
- package/dist/esm/shared/interfaces/security/index.js +1 -1
- package/package.json +2 -2
- package/types/index.d.ts +626 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
# 4.97.0
|
|
2
|
+
Released: March 18th, 2025
|
|
3
|
+
|
|
4
|
+
Released state of package up to date with Cognigy.AI v4.97.0
|
|
5
|
+
|
|
1
6
|
# 4.95.0
|
|
2
7
|
Released: February 19th, 2025
|
|
3
8
|
|
|
4
9
|
Released state of package up to date with Cognigy.AI v4.95.0
|
|
5
10
|
|
|
11
|
+
# 4.94.0
|
|
12
|
+
Released: February 07th, 2025
|
|
13
|
+
|
|
14
|
+
Released state of package up to date with Cognigy.AI v4.94.0
|
|
15
|
+
|
|
6
16
|
# 4.93.0
|
|
7
17
|
Released: Jan 22nd, 2025
|
|
8
18
|
|
|
@@ -41,7 +41,8 @@ function ManagementAPIGroup_2_0(instance) {
|
|
|
41
41
|
deleteUserManagement: ({ userId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/users/${userId}`, "DELETE", self)(undefined, options),
|
|
42
42
|
impersonateUserManagement: ({ userId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/users/${userId}/impersonate`, "POST", self)(undefined, options),
|
|
43
43
|
createApiKeyManagement: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/v2.0/organisations/apikeys", "POST", self)(args, options),
|
|
44
|
-
createSystemMessage: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/v2.0/system/createsystemmessage", "POST", self)(args, options)
|
|
44
|
+
createSystemMessage: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/v2.0/system/createsystemmessage", "POST", self)(args, options),
|
|
45
|
+
generateAuthenticationToken: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/auth/token", "POST", self)(args, options)
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
exports.ManagementAPIGroup_2_0 = ManagementAPIGroup_2_0;
|
|
@@ -185,6 +185,15 @@ const ResourcesAPIGroup_2_0 = (instance) => {
|
|
|
185
185
|
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/goals/${goalId}`, "PATCH", self)(args, options);
|
|
186
186
|
},
|
|
187
187
|
deleteGoal: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/goals/${args.goalId}`, "DELETE", self)(undefined, options),
|
|
188
|
+
indexHandoverServices: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/services?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
189
|
+
indexHandoverProviders: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/providers?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
190
|
+
createHandoverProvider: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/handover/providers", "POST", self)(args, options),
|
|
191
|
+
readHandoverProvider: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/providers/${args.handoverProviderId}`, "GET", self)(undefined, options),
|
|
192
|
+
updateHandoverProvider: (_a, options) => {
|
|
193
|
+
var { handoverProviderId } = _a, args = __rest(_a, ["handoverProviderId"]);
|
|
194
|
+
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/providers/${handoverProviderId}`, "PATCH", self)(args, options);
|
|
195
|
+
},
|
|
196
|
+
deleteHandoverProvider: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/providers/${args.handoverProviderId}?${(0, query_1.stringifyQuery)({ projectId: args.projectId })}`, "DELETE", self)(undefined, options),
|
|
188
197
|
indexPlaybooks: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
189
198
|
batchPlaybooks: (_a, options) => {
|
|
190
199
|
var { projectId } = _a, args = __rest(_a, ["projectId"]);
|
|
@@ -17,6 +17,7 @@ const GenericAPIFn_1 = require("../GenericAPIFn");
|
|
|
17
17
|
const ApiKeyAuthentication_1 = require("./ApiKey/ApiKeyAuthentication");
|
|
18
18
|
const BasicAuthentication_1 = require("./BasicAuthentication/BasicAuthentication");
|
|
19
19
|
const OAuth2Authentication_1 = require("./OAuth2/OAuth2Authentication");
|
|
20
|
+
const JwtTokenAuthentication_1 = require("./JWT/JwtTokenAuthentication");
|
|
20
21
|
const rest_1 = require("../shared/helper/rest");
|
|
21
22
|
function AuthenticationAPI(instance) {
|
|
22
23
|
const self = instance;
|
|
@@ -32,6 +33,9 @@ function AuthenticationAPI(instance) {
|
|
|
32
33
|
case "OAuth2":
|
|
33
34
|
self.authenticationHandler = new OAuth2Authentication_1.OAuth2Authentication(credentials, self);
|
|
34
35
|
break;
|
|
36
|
+
case "JWT":
|
|
37
|
+
self.authenticationHandler = new JwtTokenAuthentication_1.default(credentials, self);
|
|
38
|
+
break;
|
|
35
39
|
}
|
|
36
40
|
},
|
|
37
41
|
login: async (data) => {
|
|
@@ -63,7 +67,8 @@ function AuthenticationAPI(instance) {
|
|
|
63
67
|
exchangeOneTimeTokenForRefreshToken: (_a, options) => {
|
|
64
68
|
var { loginToken } = _a, args = __rest(_a, ["loginToken"]);
|
|
65
69
|
return (0, GenericAPIFn_1.GenericAPIFn)(`/auth/exchangetoken?${(0, rest_1.stringifyQuery)({ loginToken })}`, "GET", self)(args, Object.assign({ withAuthentication: false }, options));
|
|
66
|
-
}
|
|
70
|
+
},
|
|
71
|
+
generateManagementUIAuthToken: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/auth/token", "POST", self)(args, options)
|
|
67
72
|
};
|
|
68
73
|
}
|
|
69
74
|
exports.AuthenticationAPI = AuthenticationAPI;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const JwtTokenAuthentication = function (credentials, self) {
|
|
4
|
+
if (!(this instanceof JwtTokenAuthentication)) {
|
|
5
|
+
return new JwtTokenAuthentication(credentials, self);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
self.credentials = {
|
|
9
|
+
token: credentials.token,
|
|
10
|
+
type: credentials.type
|
|
11
|
+
};
|
|
12
|
+
const JwtTokenAuthentication = function () { };
|
|
13
|
+
JwtTokenAuthentication.prototype.getAuthenticationHeaders = async () => {
|
|
14
|
+
const headers = {};
|
|
15
|
+
headers["Authorization"] = `Bearer ${credentials.token}`;
|
|
16
|
+
return headers;
|
|
17
|
+
};
|
|
18
|
+
return new JwtTokenAuthentication(credentials, self);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.default = JwtTokenAuthentication;
|
|
22
|
+
//# sourceMappingURL=JwtTokenAuthentication.js.map
|
|
@@ -70,6 +70,12 @@ exports.ALL_FIELDS = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
70
70
|
locale: "de-DE",
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
|
+
{
|
|
74
|
+
key: "handoverProvider",
|
|
75
|
+
type: "handoverProvider",
|
|
76
|
+
label: "Handover Provider Configuration",
|
|
77
|
+
description: "Select and configure a handover provider",
|
|
78
|
+
},
|
|
73
79
|
{
|
|
74
80
|
key: "select",
|
|
75
81
|
type: "select",
|
|
@@ -30,7 +30,7 @@ exports.ADD_MEMORY = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
30
30
|
var _a, _b;
|
|
31
31
|
const { memory: memoryText } = config;
|
|
32
32
|
const { api } = cognigy;
|
|
33
|
-
if (memoryText) {
|
|
33
|
+
if (memoryText !== undefined && memoryText !== null && memoryText !== "") {
|
|
34
34
|
let memoryToAdd;
|
|
35
35
|
if (typeof memoryText === 'string') {
|
|
36
36
|
memoryToAdd = memoryText;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cognigyGenerativeAIProviderModule = exports.AWS_BEDROCK_PROVIDER_CONNECTION = exports.ALEPH_ALPHA_PROVIDER_CONNECTION = exports.GOOGLE_VERTEXAI_PROVIDER_CONNECTION = exports.ANTHROPIC_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_OAUTH2_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_V2_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_PROVIDER_CONNECTION = exports.OPEN_AI_PROVIDER_CONNECTION = void 0;
|
|
3
|
+
exports.cognigyGenerativeAIProviderModule = exports.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION = exports.AWS_BEDROCK_PROVIDER_CONNECTION = exports.ALEPH_ALPHA_PROVIDER_CONNECTION = exports.GOOGLE_VERTEXAI_PROVIDER_CONNECTION = exports.ANTHROPIC_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_OAUTH2_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_V2_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_PROVIDER_CONNECTION = exports.OPEN_AI_PROVIDER_CONNECTION = void 0;
|
|
4
4
|
/* Custom modules */
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const openAIProviderConnection_1 = require("./openAIProviderConnection");
|
|
@@ -11,6 +11,7 @@ const anthropicProviderConnection_1 = require("./anthropicProviderConnection");
|
|
|
11
11
|
const googleVertexAIProviderConnection_1 = require("./googleVertexAIProviderConnection");
|
|
12
12
|
const alephAlphaProviderConnection_1 = require("./alephAlphaProviderConnection");
|
|
13
13
|
const awsBedrockProviderConnection_1 = require("./awsBedrockProviderConnection");
|
|
14
|
+
const openAICompatibleProviderConnection_1 = require("./openAICompatibleProviderConnection");
|
|
14
15
|
var openAIProviderConnection_2 = require("./openAIProviderConnection");
|
|
15
16
|
Object.defineProperty(exports, "OPEN_AI_PROVIDER_CONNECTION", { enumerable: true, get: function () { return openAIProviderConnection_2.OPEN_AI_PROVIDER_CONNECTION; } });
|
|
16
17
|
var azureOpenAIProviderConnection_2 = require("./azureOpenAIProviderConnection");
|
|
@@ -27,6 +28,8 @@ var alephAlphaProviderConnection_2 = require("./alephAlphaProviderConnection");
|
|
|
27
28
|
Object.defineProperty(exports, "ALEPH_ALPHA_PROVIDER_CONNECTION", { enumerable: true, get: function () { return alephAlphaProviderConnection_2.ALEPH_ALPHA_PROVIDER_CONNECTION; } });
|
|
28
29
|
var awsBedrockProviderConnection_2 = require("./awsBedrockProviderConnection");
|
|
29
30
|
Object.defineProperty(exports, "AWS_BEDROCK_PROVIDER_CONNECTION", { enumerable: true, get: function () { return awsBedrockProviderConnection_2.AWS_BEDROCK_PROVIDER_CONNECTION; } });
|
|
31
|
+
var openAICompatibleProviderConnection_2 = require("./openAICompatibleProviderConnection");
|
|
32
|
+
Object.defineProperty(exports, "OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION", { enumerable: true, get: function () { return openAICompatibleProviderConnection_2.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION; } });
|
|
30
33
|
exports.cognigyGenerativeAIProviderModule = (0, createNodeDescriptor_1.createExtension)({
|
|
31
34
|
nodes: [],
|
|
32
35
|
connections: [
|
|
@@ -37,7 +40,8 @@ exports.cognigyGenerativeAIProviderModule = (0, createNodeDescriptor_1.createExt
|
|
|
37
40
|
anthropicProviderConnection_1.ANTHROPIC_PROVIDER_CONNECTION,
|
|
38
41
|
googleVertexAIProviderConnection_1.GOOGLE_VERTEXAI_PROVIDER_CONNECTION,
|
|
39
42
|
alephAlphaProviderConnection_1.ALEPH_ALPHA_PROVIDER_CONNECTION,
|
|
40
|
-
awsBedrockProviderConnection_1.AWS_BEDROCK_PROVIDER_CONNECTION
|
|
43
|
+
awsBedrockProviderConnection_1.AWS_BEDROCK_PROVIDER_CONNECTION,
|
|
44
|
+
openAICompatibleProviderConnection_1.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION
|
|
41
45
|
]
|
|
42
46
|
});
|
|
43
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION = void 0;
|
|
4
|
+
exports.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION = {
|
|
5
|
+
type: "OpenAICompatibleProvider",
|
|
6
|
+
label: "UI__NODE_EDITOR__OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION__LABEL",
|
|
7
|
+
fields: [
|
|
8
|
+
{ fieldName: "apiKey", label: "UI__CONNECTION_EDITOR__FIELD_API_KEY" },
|
|
9
|
+
]
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=openAICompatibleProviderConnection.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEEPGRAM_SPEECH_PROVIDER_CONNECTION = void 0;
|
|
4
|
+
exports.DEEPGRAM_SPEECH_PROVIDER_CONNECTION = {
|
|
5
|
+
type: "DeepgramSpeechProvider",
|
|
6
|
+
label: "UI__NODE_EDITOR__DEEPGRAM_SPEECH_PROVIDER__LABEL",
|
|
7
|
+
fields: [
|
|
8
|
+
{ fieldName: "apiKey", label: "UI__CONNECTION_EDITOR__FIELD_API_KEY" },
|
|
9
|
+
]
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=deepgramSpeechProviderConnection.js.map
|
|
@@ -6,6 +6,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
|
6
6
|
const awsSpeechProviderConnection_1 = require("./awsSpeechProviderConnection");
|
|
7
7
|
const microsoftSpeechProviderConnection_1 = require("./microsoftSpeechProviderConnection");
|
|
8
8
|
const googleSpeechProviderConnection_1 = require("./googleSpeechProviderConnection");
|
|
9
|
+
const deepgramSpeechProviderConnection_1 = require("./deepgramSpeechProviderConnection");
|
|
9
10
|
var awsSpeechProviderConnection_2 = require("./awsSpeechProviderConnection");
|
|
10
11
|
Object.defineProperty(exports, "AWS_SPEECH_PROVIDER_CONNECTION", { enumerable: true, get: function () { return awsSpeechProviderConnection_2.AWS_SPEECH_PROVIDER_CONNECTION; } });
|
|
11
12
|
var microsoftSpeechProviderConnection_2 = require("./microsoftSpeechProviderConnection");
|
|
@@ -18,6 +19,7 @@ exports.cognigySpeechProviderModule = (0, createNodeDescriptor_1.createExtension
|
|
|
18
19
|
awsSpeechProviderConnection_1.AWS_SPEECH_PROVIDER_CONNECTION,
|
|
19
20
|
microsoftSpeechProviderConnection_1.MICROSOFT_SPEECH_PROVIDER_CONNECTION,
|
|
20
21
|
googleSpeechProviderConnection_1.GOOGLE_SPEECH_PROVIDER_CONNECTION,
|
|
22
|
+
deepgramSpeechProviderConnection_1.DEEPGRAM_SPEECH_PROVIDER_CONNECTION,
|
|
21
23
|
]
|
|
22
24
|
});
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -156,6 +156,12 @@ exports.cognigyBasicModule = (0, createNodeDescriptor_1.createExtension)({
|
|
|
156
156
|
service_1.HTTP_CONNECTION_APIKEYXKEY,
|
|
157
157
|
service_1.HTTP_CONNECTION_OAUTH2,
|
|
158
158
|
service_1.JWT_SECRET_CONNECTION,
|
|
159
|
+
service_1.LIVE_AGENT_CONNECTION,
|
|
160
|
+
service_1.RINGCENTRAL_ENGAGE_CONNECTION,
|
|
161
|
+
service_1.CHATWOOT_CONNECTION,
|
|
162
|
+
service_1.EIGHT_BY_EIGHT_CONNECTION,
|
|
163
|
+
service_1.GENESYS_CLOUD_CONNECTION,
|
|
164
|
+
service_1.GENESYS_CLOUD_CONNECTION_OM
|
|
159
165
|
],
|
|
160
166
|
});
|
|
161
167
|
var mongoDB_1 = require("./connectionNodes/mongoDB");
|
|
@@ -5,6 +5,7 @@ exports.SEARCH_EXTRACT_OUTPUT = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
6
|
const logic_1 = require("../logic");
|
|
7
7
|
const prompt_1 = require("../nlu/generativeSlotFiller/prompt");
|
|
8
|
+
const crypto_1 = require("crypto");
|
|
8
9
|
const errors_1 = require("../../../errors");
|
|
9
10
|
/**
|
|
10
11
|
* Returns the simplified english name for a language given a language code
|
|
@@ -638,6 +639,10 @@ New: `;
|
|
|
638
639
|
message: (error === null || error === void 0 ? void 0 : error.message) || error,
|
|
639
640
|
};
|
|
640
641
|
api.logDebugError(JSON.stringify(compactError, undefined, 2), "Search Extract Output: Error");
|
|
642
|
+
api.emitToOpsCenter({
|
|
643
|
+
subComponent: "KnowledgeAIQueries",
|
|
644
|
+
title: error === null || error === void 0 ? void 0 : error.message
|
|
645
|
+
});
|
|
641
646
|
if ((_a = error === null || error === void 0 ? void 0 : error.originalErrorDetails) === null || _a === void 0 ? void 0 : _a.code) {
|
|
642
647
|
compactError["code"] = error.originalErrorDetails.code;
|
|
643
648
|
}
|
|
@@ -761,6 +766,8 @@ New: `;
|
|
|
761
766
|
if (documents && (mode !== "s")) {
|
|
762
767
|
// check if we received streamed output at all
|
|
763
768
|
let streamedOutput = false;
|
|
769
|
+
const isStreamingChannel = input.channel === "webchat3" || input.channel === "adminconsole";
|
|
770
|
+
const _messageId = (0, crypto_1.randomUUID)();
|
|
764
771
|
const promptData = {
|
|
765
772
|
prompt,
|
|
766
773
|
temperature,
|
|
@@ -773,9 +780,14 @@ New: `;
|
|
|
773
780
|
stream: outputMode === "stream" && mode === "seo",
|
|
774
781
|
streamOnDataHandler: (text) => {
|
|
775
782
|
streamedOutput = true;
|
|
776
|
-
api.output(text,
|
|
783
|
+
api.output(text, {
|
|
784
|
+
_cognigy: {
|
|
785
|
+
_messageId,
|
|
786
|
+
}
|
|
787
|
+
});
|
|
777
788
|
},
|
|
778
789
|
streamStopTokens,
|
|
790
|
+
preventNewLineRemoval: isStreamingChannel ? true : false,
|
|
779
791
|
// set the detailed results to true to get the token usage
|
|
780
792
|
detailedResults: true
|
|
781
793
|
};
|
|
@@ -540,6 +540,13 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
540
540
|
description: "UI__NODE_EDITOR__MESSAGE__QUESTION__QUESTION__FIELDS__MAX_EXECUTION_DIFF__DESCRIPTION",
|
|
541
541
|
defaultValue: 1
|
|
542
542
|
},
|
|
543
|
+
{
|
|
544
|
+
key: "preventTranscript",
|
|
545
|
+
type: "toggle",
|
|
546
|
+
defaultValue: false,
|
|
547
|
+
label: "UI__NODE_EDITOR__MESSAGE__SAY__FIELDS__PREVENT_TRANSCRIPT__LABEL",
|
|
548
|
+
description: "UI__NODE_EDITOR__MESSAGE__SAY__FIELDS__PREVENT_TRANSCRIPT__DESCRIPTION",
|
|
549
|
+
},
|
|
543
550
|
{
|
|
544
551
|
key: "escalateAnswersAction",
|
|
545
552
|
type: "select",
|
|
@@ -1740,7 +1747,8 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
1740
1747
|
"onlyAcceptEscalationIntents",
|
|
1741
1748
|
"additionalValidation",
|
|
1742
1749
|
"resultLocation",
|
|
1743
|
-
"maxExecutionDiff"
|
|
1750
|
+
"maxExecutionDiff",
|
|
1751
|
+
"preventTranscript"
|
|
1744
1752
|
]
|
|
1745
1753
|
},
|
|
1746
1754
|
{
|
|
@@ -1832,7 +1840,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
1832
1840
|
//#endregion DescriptorFields
|
|
1833
1841
|
function: async ({ cognigy, nodeId, organisationId, config, inputOptions }) => {
|
|
1834
1842
|
var _a, _b, _c;
|
|
1835
|
-
const { say, type, validationMessage, repromptLLMProvider, repromptType = "text", repromptLLMPrompt, repromptLLMTurns, repromptLLMStream, repromptLLMStreamStopTokens, repromptSay, repromptFlowNode, repromptParseIntents, repromptParseKeyphrases, repromptAbsorbContext, validationRepeat, storeResultInContext, contextKey, storeInContactProfile, profileKey, storeDetailedResults, parseResultOnEntry, repromptCondition, maxExecutionDiff, resultLocation, skipRepromptOnIntent, onlyAcceptEscalationIntents, escalateAnswersAction, escalateAnswersThreshold, escalateAnswersGotoTarget, escalateAnswersExecuteTarget, escalateAnswersGotoExecutionMode, escalateAnswersInjectedText, escalateAnswersInjectedData, escalateAnswersMessage, escalateAnswersRepromptPrevention, escalateAnswersOnce, escalateAnswersHandoverText, escalateAnswersRepeatHandoverMessage, escalateAnswersHandoverCancelIntent, escalateAnswersHandoverQuickReply, escalateAnswersHandoverChatwootInboxId, escalateAnswersHandoverLiveAgentInboxId, escalateAnswersHandoverAdditionalCategoryIds, escalateAnswersHandoverSendTranscriptAsFirstMessage, escalateAnswersHandoverSalesforcePrechatEntities, escalateAnswersHandoverSalesforcePrechatDetails, escalateAnswersHandoverGenesysLanguage, escalateAnswersHandoverGenesysSkills, escalateAnswersHandoverGenesysPriority, escalateAnswersHandoverGenesysCustomAttributes, escalateAnswersHandoverEightByEightChannelId, escalateAnswersHandoverEightByEightQueueId, escalateAnswersHandoverEightByEightJSONProps, escalateAnswersHandoverSendResolveEvent, escalateAnswersHandoverResolveBehavior, escalateAnswersAgentAssistInitMessage, escalateAnswersAllowAgentInject, escalateAnswersSendOnActiveEvent, escalateAnswersSendOnQueueEvent, escalateIntentsAction, escalateIntentsValidIntents, escalateIntentsThreshold, escalateIntentsGotoTarget, escalateIntentsExecuteTarget, escalateIntentsGotoExecutionMode, escalateIntentsInjectedText, escalateIntentsInjectedData, escalateIntentsMessage, escalateIntentsHandoverText, escalateIntentsRepeatHandoverMessage, escalateIntentsHandoverCancelIntent, escalateIntentsHandoverQuickReply, escalateIntentsHandoverChatwootInboxId, escalateIntentsHandoverLiveAgentInboxId, escalateIntentsHandoverAdditionalCategoryIds, escalateIntentHandoverSendTranscriptAsFirstMessage, escalateIntentsHandoverSalesforcePrechatEntities, escalateIntentsHandoverSalesforcePrechatDetails, escalateIntentsHandoverGenesysLanguage, escalateIntentsHandoverGenesysSkills, escalateIntentsHandoverGenesysPriority, escalateIntentsHandoverGenesysCustomAttributes, escalateIntentsHandoverEightByEightChannelId, escalateIntentsHandoverEightByEightQueueId, escalateIntentsHandoverEightByEightJSONProps, escalateIntentsRepromptPrevention, escalateIntentsHandoverSendResolveEvent, escalateIntentsHandoverResolveBehavior, escalateIntentsAgentAssistInitMessage, escalateIntentsAllowAgentInject, escalateIntentsSendOnActiveEvent, escalateIntentsSendOnQueueEvent, reconfirmationBehaviour, reconfirmationQuestion, reconfirmationQuestionReprompt, handoverOutput, cleanTextLocale, cleanDisallowedSymbols, additionalAllowedCharacters, additionalSpecialPhrases, resolveSpelledOutNumbers, resolvePhoneticAlphabet, additionalPhoneticAlphabet, replaceSpecialWords, additionalMappedSymbols, resolveSpelledOutAlphabet, resolvePhoneticCounters, contractSingleCharacters, contractNumberGroups, trimResult, runNLUAfterCleaning, overwrittenBaseAnswer } = config;
|
|
1843
|
+
const { say, type, validationMessage, repromptLLMProvider, repromptType = "text", repromptLLMPrompt, repromptLLMTurns, repromptLLMStream, repromptLLMStreamStopTokens, repromptSay, repromptFlowNode, repromptParseIntents, repromptParseKeyphrases, repromptAbsorbContext, validationRepeat, storeResultInContext, contextKey, storeInContactProfile, profileKey, storeDetailedResults, parseResultOnEntry, repromptCondition, maxExecutionDiff, resultLocation, skipRepromptOnIntent, onlyAcceptEscalationIntents, preventTranscript, escalateAnswersAction, escalateAnswersThreshold, escalateAnswersGotoTarget, escalateAnswersExecuteTarget, escalateAnswersGotoExecutionMode, escalateAnswersInjectedText, escalateAnswersInjectedData, escalateAnswersMessage, escalateAnswersRepromptPrevention, escalateAnswersOnce, escalateAnswersHandoverText, escalateAnswersRepeatHandoverMessage, escalateAnswersHandoverCancelIntent, escalateAnswersHandoverQuickReply, escalateAnswersHandoverChatwootInboxId, escalateAnswersHandoverLiveAgentInboxId, escalateAnswersHandoverAdditionalCategoryIds, escalateAnswersHandoverSendTranscriptAsFirstMessage, escalateAnswersHandoverSalesforcePrechatEntities, escalateAnswersHandoverSalesforcePrechatDetails, escalateAnswersHandoverGenesysLanguage, escalateAnswersHandoverGenesysSkills, escalateAnswersHandoverGenesysPriority, escalateAnswersHandoverGenesysCustomAttributes, escalateAnswersHandoverEightByEightChannelId, escalateAnswersHandoverEightByEightQueueId, escalateAnswersHandoverEightByEightJSONProps, escalateAnswersHandoverSendResolveEvent, escalateAnswersHandoverResolveBehavior, escalateAnswersAgentAssistInitMessage, escalateAnswersAllowAgentInject, escalateAnswersSendOnActiveEvent, escalateAnswersSendOnQueueEvent, escalateIntentsAction, escalateIntentsValidIntents, escalateIntentsThreshold, escalateIntentsGotoTarget, escalateIntentsExecuteTarget, escalateIntentsGotoExecutionMode, escalateIntentsInjectedText, escalateIntentsInjectedData, escalateIntentsMessage, escalateIntentsHandoverText, escalateIntentsRepeatHandoverMessage, escalateIntentsHandoverCancelIntent, escalateIntentsHandoverQuickReply, escalateIntentsHandoverChatwootInboxId, escalateIntentsHandoverLiveAgentInboxId, escalateIntentsHandoverAdditionalCategoryIds, escalateIntentHandoverSendTranscriptAsFirstMessage, escalateIntentsHandoverSalesforcePrechatEntities, escalateIntentsHandoverSalesforcePrechatDetails, escalateIntentsHandoverGenesysLanguage, escalateIntentsHandoverGenesysSkills, escalateIntentsHandoverGenesysPriority, escalateIntentsHandoverGenesysCustomAttributes, escalateIntentsHandoverEightByEightChannelId, escalateIntentsHandoverEightByEightQueueId, escalateIntentsHandoverEightByEightJSONProps, escalateIntentsRepromptPrevention, escalateIntentsHandoverSendResolveEvent, escalateIntentsHandoverResolveBehavior, escalateIntentsAgentAssistInitMessage, escalateIntentsAllowAgentInject, escalateIntentsSendOnActiveEvent, escalateIntentsSendOnQueueEvent, reconfirmationBehaviour, reconfirmationQuestion, reconfirmationQuestionReprompt, handoverOutput, cleanTextLocale, cleanDisallowedSymbols, additionalAllowedCharacters, additionalSpecialPhrases, resolveSpelledOutNumbers, resolvePhoneticAlphabet, additionalPhoneticAlphabet, replaceSpecialWords, additionalMappedSymbols, resolveSpelledOutAlphabet, resolvePhoneticCounters, contractSingleCharacters, contractNumberGroups, trimResult, runNLUAfterCleaning, overwrittenBaseAnswer } = config;
|
|
1836
1844
|
const { input, context, profile, api } = cognigy;
|
|
1837
1845
|
const rephraseWithAIParams = {
|
|
1838
1846
|
generativeAI_rephraseOutputMode: config.generativeAI_rephraseOutputMode,
|
|
@@ -1975,11 +1983,11 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
1975
1983
|
}
|
|
1976
1984
|
// output reconfirmation reprompt
|
|
1977
1985
|
if (reconfirmationQuestionReprompt) {
|
|
1978
|
-
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, say: { type: "text", text: [reconfirmationQuestionReprompt] } } });
|
|
1986
|
+
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestionReprompt] } } });
|
|
1979
1987
|
}
|
|
1980
1988
|
// output reconfirmationQuestion
|
|
1981
1989
|
const tentativeAnswerShortform = (activeQuestion === null || activeQuestion === void 0 ? void 0 : activeQuestion.tentativeAnswerShortform) || "";
|
|
1982
|
-
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", tentativeAnswerShortform)] } } });
|
|
1990
|
+
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", tentativeAnswerShortform)] } } });
|
|
1983
1991
|
// set myself as next node and stop
|
|
1984
1992
|
api.setNextNode(nodeId);
|
|
1985
1993
|
api.stopExecution();
|
|
@@ -2045,7 +2053,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
2045
2053
|
if (isFirstExecution && !parseResultOnEntry) {
|
|
2046
2054
|
rephraseWithAIParams.promptType = "question";
|
|
2047
2055
|
rephraseWithAIParams.questionType = config.type;
|
|
2048
|
-
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ say }, rephraseWithAIParams) });
|
|
2056
|
+
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, say }, rephraseWithAIParams) });
|
|
2049
2057
|
if (config.type === "date" && !config.datepicker_hidePicker) {
|
|
2050
2058
|
(0, datepickerUtils_1.showDatePicker)(cognigy, config);
|
|
2051
2059
|
}
|
|
@@ -2083,7 +2091,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
2083
2091
|
// remember a shortform of the given answer in the activeQuestion object
|
|
2084
2092
|
activeQuestion.tentativeAnswerShortform = (0, generateAnswerShortForm_1.generateAnswerShortForm)(type, result, cognigy.input.text);
|
|
2085
2093
|
// Output reconfirmationQuestion
|
|
2086
|
-
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", activeQuestion.tentativeAnswerShortform)] } } });
|
|
2094
|
+
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", activeQuestion.tentativeAnswerShortform)] } } });
|
|
2087
2095
|
// remember that we are in reconfirmation mode and stop
|
|
2088
2096
|
api.setSystemContext("reconfirmationQuestionInProgress", true);
|
|
2089
2097
|
// we need to store the input, to be able to restore it afterwards
|
|
@@ -2208,7 +2216,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
2208
2216
|
childConfigs: [],
|
|
2209
2217
|
nodeId,
|
|
2210
2218
|
organisationId,
|
|
2211
|
-
config: { handoverOutput, say: escalateIntentsMessage }
|
|
2219
|
+
config: { handoverOutput, preventTranscript, say: escalateIntentsMessage }
|
|
2212
2220
|
});
|
|
2213
2221
|
if (escalateIntentsRepromptPrevention) {
|
|
2214
2222
|
sayReprompt = false;
|
|
@@ -2357,7 +2365,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
2357
2365
|
childConfigs: [],
|
|
2358
2366
|
nodeId,
|
|
2359
2367
|
organisationId,
|
|
2360
|
-
config: { handoverOutput, say: escalateAnswersMessage }
|
|
2368
|
+
config: { handoverOutput, preventTranscript, say: escalateAnswersMessage }
|
|
2361
2369
|
});
|
|
2362
2370
|
if (escalateAnswersRepromptPrevention) {
|
|
2363
2371
|
sayReprompt = false;
|
|
@@ -2435,7 +2443,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
2435
2443
|
if (sayReprompt) {
|
|
2436
2444
|
switch (repromptType) {
|
|
2437
2445
|
case "say":
|
|
2438
|
-
await say_1.SAY.function(Object.assign({ cognigy, childConfigs: [], nodeId, organisationId, config: { say: repromptSay } }, rephraseWithAIParams));
|
|
2446
|
+
await say_1.SAY.function(Object.assign({ cognigy, childConfigs: [], nodeId, organisationId, config: { preventTranscript, say: repromptSay } }, rephraseWithAIParams));
|
|
2439
2447
|
break;
|
|
2440
2448
|
case "execute":
|
|
2441
2449
|
// if a question reprompt is set to execute flow and we have just executed
|
|
@@ -2484,11 +2492,11 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
2484
2492
|
}
|
|
2485
2493
|
const repromptMessage = await api.runGenerativeAIPrompt(data, "gptPromptNode");
|
|
2486
2494
|
if (!repromptLLMStream) {
|
|
2487
|
-
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ handoverOutput, say: { type: "text", text: [repromptMessage] } }, rephraseWithAIParams) });
|
|
2495
|
+
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [repromptMessage] } }, rephraseWithAIParams) });
|
|
2488
2496
|
}
|
|
2489
2497
|
break;
|
|
2490
2498
|
default: // this is also "text"
|
|
2491
|
-
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ handoverOutput, say: { type: "text", text: [validationMessage] } }, rephraseWithAIParams) });
|
|
2499
|
+
await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [validationMessage] } }, rephraseWithAIParams) });
|
|
2492
2500
|
}
|
|
2493
2501
|
}
|
|
2494
2502
|
/* If repeat toggle is on, also output question (and maybe datepicker) again */
|
|
@@ -2500,7 +2508,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
2500
2508
|
childConfigs: [],
|
|
2501
2509
|
nodeId,
|
|
2502
2510
|
organisationId,
|
|
2503
|
-
config: Object.assign({ say }, rephraseWithAIParams)
|
|
2511
|
+
config: Object.assign({ preventTranscript, say }, rephraseWithAIParams)
|
|
2504
2512
|
});
|
|
2505
2513
|
if (config.type === "date" && !config.datepicker_hidePicker) {
|
|
2506
2514
|
(0, datepickerUtils_1.showDatePicker)(cognigy, config);
|
|
@@ -2516,7 +2524,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
|
|
|
2516
2524
|
childConfigs: [],
|
|
2517
2525
|
nodeId,
|
|
2518
2526
|
organisationId,
|
|
2519
|
-
config: Object.assign({ say }, rephraseWithAIParams)
|
|
2527
|
+
config: Object.assign({ preventTranscript, say }, rephraseWithAIParams)
|
|
2520
2528
|
});
|
|
2521
2529
|
if (config.type === "date" && !config.datepicker_hidePicker) {
|
|
2522
2530
|
(0, datepickerUtils_1.showDatePicker)(cognigy, config);
|
|
@@ -49,6 +49,13 @@ exports.SAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
49
49
|
],
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
key: "preventTranscript",
|
|
54
|
+
type: "toggle",
|
|
55
|
+
defaultValue: false,
|
|
56
|
+
label: "UI__NODE_EDITOR__MESSAGE__SAY__FIELDS__PREVENT_TRANSCRIPT__LABEL",
|
|
57
|
+
description: "UI__NODE_EDITOR__MESSAGE__SAY__FIELDS__PREVENT_TRANSCRIPT__DESCRIPTION",
|
|
58
|
+
},
|
|
52
59
|
...(0, getRephraseWithAIFields_1.getRephraseWithAIFields)(),
|
|
53
60
|
].filter(field => !!field),
|
|
54
61
|
sections: [
|
|
@@ -60,12 +67,21 @@ exports.SAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
60
67
|
fields: [
|
|
61
68
|
"handoverOutput",
|
|
62
69
|
]
|
|
63
|
-
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: "advanced",
|
|
73
|
+
label: "UI__NODE_EDITOR__MESSAGE__SAY__SECTIONS__ADVANCED__LABEL",
|
|
74
|
+
defaultCollapsed: true,
|
|
75
|
+
fields: [
|
|
76
|
+
"preventTranscript",
|
|
77
|
+
],
|
|
78
|
+
},
|
|
64
79
|
].filter(section => !!section),
|
|
65
80
|
form: [
|
|
66
81
|
{ type: "field", key: "say" },
|
|
67
82
|
{ type: "section", key: "aiEnhancedOutput" },
|
|
68
83
|
{ type: "section", key: "handoverSettings" },
|
|
84
|
+
{ type: "section", key: "advanced" }
|
|
69
85
|
],
|
|
70
86
|
preview: {
|
|
71
87
|
key: "say",
|
|
@@ -123,6 +139,9 @@ exports.SAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
123
139
|
if ((_a = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _a === void 0 ? void 0 : _a._default) {
|
|
124
140
|
delete _data._cognigy._default;
|
|
125
141
|
}
|
|
142
|
+
if (config.preventTranscript) {
|
|
143
|
+
_data._cognigy = Object.assign(Object.assign({}, _data._cognigy), { _preventTranscript: true });
|
|
144
|
+
}
|
|
126
145
|
outputText = await (0, rephraseSentenceWithAi_1.rephraseSentenceWithAI)(outputText, config, api, organisationId);
|
|
127
146
|
await api.say(outputText, _data, settings);
|
|
128
147
|
}
|
|
@@ -147,11 +166,15 @@ exports.SAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
147
166
|
else if ((_f = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _f === void 0 ? void 0 : _f.fallbackText) {
|
|
148
167
|
_cognigyDefault[typeKey].fallbackText = await (0, rephraseSentenceWithAi_1.rephraseSentenceWithAI)(_cognigyDefault[typeKey].fallbackText, config, api, organisationId);
|
|
149
168
|
}
|
|
169
|
+
const data = config.say;
|
|
170
|
+
if (config.preventTranscript) {
|
|
171
|
+
data._cognigy = Object.assign(Object.assign({}, data._cognigy), { _preventTranscript: true });
|
|
172
|
+
}
|
|
150
173
|
/**
|
|
151
174
|
* This is a say node which is set to a type other than 'text' -
|
|
152
175
|
* so we have one of the new rich-media types such as 'gallery'
|
|
153
176
|
*/
|
|
154
|
-
await api.say(null,
|
|
177
|
+
await api.say(null, data, settings);
|
|
155
178
|
}
|
|
156
179
|
},
|
|
157
180
|
});
|
|
@@ -4,6 +4,7 @@ exports.GPT_PROMPT = void 0;
|
|
|
4
4
|
/* Custom modules */
|
|
5
5
|
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
6
|
const logic_1 = require("../logic");
|
|
7
|
+
const crypto_1 = require("crypto");
|
|
7
8
|
const prompt_1 = require("../nlu/generativeSlotFiller/prompt");
|
|
8
9
|
const errors_1 = require("../../../errors");
|
|
9
10
|
exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
@@ -626,6 +627,8 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
626
627
|
}
|
|
627
628
|
};
|
|
628
629
|
try {
|
|
630
|
+
const isStreamingChannel = input.channel === "webchat3" || input.channel === "adminconsole";
|
|
631
|
+
const _messageId = (0, crypto_1.randomUUID)();
|
|
629
632
|
const data = {
|
|
630
633
|
prompt,
|
|
631
634
|
temperature,
|
|
@@ -637,13 +640,18 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
637
640
|
useCase: "promptNode",
|
|
638
641
|
stream: storeLocation === "stream",
|
|
639
642
|
streamOnDataHandler: (text) => {
|
|
640
|
-
text = text
|
|
643
|
+
text = isStreamingChannel ? text : text.trim();
|
|
641
644
|
if (text) {
|
|
642
|
-
api.output(text,
|
|
645
|
+
api.output(text, {
|
|
646
|
+
_cognigy: {
|
|
647
|
+
_messageId,
|
|
648
|
+
}
|
|
649
|
+
});
|
|
643
650
|
}
|
|
644
651
|
},
|
|
645
652
|
streamStopTokens,
|
|
646
653
|
streamStopTokenOverrides,
|
|
654
|
+
preventNewLineRemoval: isStreamingChannel ? true : false,
|
|
647
655
|
// set to true in order to get token usage
|
|
648
656
|
detailedResults: true,
|
|
649
657
|
seed: Number(seed) ? Number(seed) : undefined,
|