@cognigy/rest-api-client 0.19.0 → 0.20.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/build/RestAPIClient.js +7 -0
- package/build/apigroups/AdministrationAPIGroup_2_0.js +6 -1
- package/build/apigroups/JWTAuthAPIGroup_2_0.js +12 -0
- package/build/apigroups/ResourcesAPIGroup_2_0.js +19 -8
- package/build/apigroups/index.js +3 -1
- package/build/shared/charts/descriptors/agentAssist/index.js +3 -1
- package/build/shared/charts/descriptors/agentAssist/sendData.js +74 -0
- package/build/shared/charts/descriptors/analytics/addMemory.js +51 -0
- package/build/shared/charts/descriptors/analytics/completeGoal.js +4 -3
- package/build/shared/charts/descriptors/analytics/helper.js +20 -0
- package/build/shared/charts/descriptors/analytics/index.js +5 -3
- package/build/shared/charts/descriptors/analytics/{trackMilestone.js → trackGoal.js} +32 -25
- package/build/shared/charts/descriptors/data/copySlotsToContext.js +1 -1
- package/build/shared/charts/descriptors/index.js +14 -2
- package/build/shared/charts/descriptors/knowledgeSearch/knowledgeSearchV2.js +1 -1
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +26 -16
- package/build/shared/charts/descriptors/logic/disableSlotFillers.js +1 -1
- package/build/shared/charts/descriptors/logic/enableSlotFillers.js +1 -1
- package/build/shared/charts/descriptors/logic/thinkV2.js +111 -4
- package/build/shared/charts/descriptors/nlu/cleanText.js +1 -1
- package/build/shared/charts/descriptors/nlu/executeCognigyNLU.js +1 -1
- package/build/shared/charts/descriptors/nlu/fuzzySearch.js +1 -1
- package/build/shared/charts/descriptors/nlu/generativeSlotFiller/generativeSlotFiller.js +1 -1
- package/build/shared/charts/descriptors/nlu/generativeSlotFiller/generativeSlotFillerFallback.js +1 -1
- package/build/shared/charts/descriptors/nlu/generativeSlotFiller/generativeSlotFillerSuccess.js +1 -1
- package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +4 -5
- package/build/shared/charts/descriptors/nlu/matchPattern.js +1 -1
- package/build/shared/charts/descriptors/nlu/regexSlotFiller.js +1 -1
- package/build/shared/charts/descriptors/service/GPTConversation.js +1 -1
- package/build/shared/charts/descriptors/service/GPTPrompt.js +26 -32
- package/build/shared/charts/descriptors/service/LLMEntityExtract.js +1 -1
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentHandover.js +92 -0
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +1146 -0
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJobDefault.js +31 -0
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJobTool.js +139 -0
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentToolAnswer.js +120 -0
- package/build/shared/charts/descriptors/service/aiAgent/helper.js +222 -0
- package/build/shared/charts/descriptors/service/handoverV2.js +68 -13
- package/build/shared/charts/descriptors/service/index.js +11 -1
- package/build/shared/charts/descriptors/transcripts/addTranscriptStep.js +413 -0
- package/build/shared/charts/descriptors/transcripts/getTranscript.js +104 -0
- package/build/shared/charts/descriptors/transcripts/index.js +8 -0
- package/build/shared/charts/descriptors/voice/mappers/base.mapper.js +20 -0
- package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +183 -107
- package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +6 -9
- package/build/shared/charts/descriptors/voice/nodes/continuousAsr.js +3 -4
- package/build/shared/charts/descriptors/voicegateway/nodes/callRecording.js +8 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/handover.js +4 -2
- package/build/shared/charts/descriptors/voicegateway/nodes/hangup.js +4 -2
- package/build/shared/charts/descriptors/voicegateway/nodes/helper/utils.js +14 -0
- package/build/shared/charts/descriptors/voicegateway/nodes/playURL.js +4 -5
- package/build/shared/charts/descriptors/voicegateway/nodes/sendMessage.js +8 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/sendMetaData.js +7 -3
- package/build/shared/charts/descriptors/voicegateway/nodes/setSessionParams.js +8 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +15 -4
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +15 -3
- package/build/shared/constants.js +7 -1
- package/build/shared/handoverClients/interfaces/THandoverEventType.js +1 -0
- package/build/shared/helper/logFullConfigToDebugMode.js +1 -1
- package/build/shared/helper/nlu/textCleaner.js +1 -1
- package/build/shared/interfaces/{restAPI/resources/milestone/v2.0/IMilestoneStep_2_0.js → IEndpointSettings.js} +1 -1
- package/build/shared/interfaces/IProfile.js +1 -0
- package/build/shared/interfaces/IProfileSchema.js +1 -0
- package/build/shared/interfaces/analytics/IAnalyticsSourceData.js +22 -20
- package/build/shared/interfaces/{restAPI/resources/milestone/v2.0/IMilestone_2_0.js → analytics/IGoalAnalytics.js} +1 -1
- package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +19 -2
- package/build/shared/interfaces/generativeAI/tools.js +3 -0
- package/build/shared/interfaces/handover.js +3 -1
- package/build/shared/interfaces/messageAPI/endpoints.js +6 -1
- package/build/shared/interfaces/messageAPI/handover.js +2 -0
- package/build/shared/interfaces/resources/IAiAgent.js +52 -0
- package/build/shared/interfaces/resources/IAuditEvent.js +2 -1
- package/build/shared/interfaces/resources/IEndpoint.js +2 -1
- package/build/shared/interfaces/resources/{IMilestone.js → IGoal.js} +14 -14
- package/build/shared/interfaces/resources/ILargeLanguageModel.js +29 -2
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +4 -1
- package/build/shared/interfaces/resources/TResourceType.js +16 -8
- package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +5 -1
- package/build/shared/interfaces/restAPI/{resources/milestone/v2.0/ICloneMilestoneRest_2_0.js → administration/user/v2.0/IGetPinnedResources_2_0.js} +1 -1
- package/build/shared/interfaces/restAPI/administration/user/v2.0/IPinResourceRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/IAiAgentHiringTemplate_2_0.js +32 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/IAiAgent_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/ICreateAiAgentRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/IDeleteAiAgentRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/IGetAiAgentHiringTemplates_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/IHireAiAgent_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/IIndexAiAgentRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/IReadAiAgentRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/aiAgent/v2.0/IUpdateAiAgentRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/{milestone/v2.0/ICreateMilestoneRest_2_0.js → aiAgent/v2.0/IValidateAiAgentNameRest_2_0.js} +1 -1
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/ICloneGoalRest_2_0.js +3 -0
- package/build/shared/interfaces/{analytics/IMilestoneAnalytics.js → restAPI/resources/goal/v2.0/ICreateGoalRest_2_0.js} +1 -1
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/IDeleteGoalRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/IGoalIndexItem_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/IGoalStepMetric_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/IGoalStep_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/IGoal_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/IIndexGoalsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/IReadGoalRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/goal/v2.0/IUpdateGoalRest_2_0.js +3 -0
- package/build/shared/interfaces/security/IPermission.js +6 -2
- package/build/shared/interfaces/security/IPinnedResource.js +3 -0
- package/build/shared/interfaces/security/index.js +1 -1
- package/build/shared/interfaces/transcripts/transcripts.js +33 -0
- package/package.json +1 -1
- package/types/index.d.ts +931 -224
- package/build/shared/interfaces/license.js.map +0 -1
- package/build/shared/interfaces/restAPI/resources/knowledgeSearchIndex/v2.0/ICreateKnowledgeSearchIndexRest_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/knowledgeSearchIndex/v2.0/IDeleteKnowledgeSearchIndexRest_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IDeleteMilestoneRest_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IIndexMilestonesRest_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestoneIndexItem_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestoneStepMetric_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IReadMilestoneRest_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IUpdateMilestoneRest_2_0.js +0 -3
- package/build/test.js +0 -27
- /package/build/shared/interfaces/restAPI/resources/{knowledgeSearchIndex → aiAgent}/v2.0/index.js +0 -0
- /package/build/shared/interfaces/restAPI/resources/{milestone → goal}/v2.0/index.js +0 -0
|
@@ -521,6 +521,17 @@ exports.voiceConfigFields = [
|
|
|
521
521
|
required: true
|
|
522
522
|
}
|
|
523
523
|
},
|
|
524
|
+
{
|
|
525
|
+
key: "flowNoInputFail",
|
|
526
|
+
type: "toggle",
|
|
527
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__FLOW_NO_INPUT_FAIL_ERROR__LABEL",
|
|
528
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__FLOW_NO_INPUT_FAIL_ERROR__DESCRIPTION",
|
|
529
|
+
defaultValue: false,
|
|
530
|
+
condition: {
|
|
531
|
+
key: "flowNoInputTimeoutEnable",
|
|
532
|
+
value: true
|
|
533
|
+
},
|
|
534
|
+
},
|
|
524
535
|
{
|
|
525
536
|
key: "dtmfEnable",
|
|
526
537
|
type: "toggle",
|
|
@@ -605,9 +616,9 @@ exports.voiceConfigFields = [
|
|
|
605
616
|
type: "number",
|
|
606
617
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__ASR_TIMEOUT__LABEL",
|
|
607
618
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__ASR_TIMEOUT__DESCRIPTION",
|
|
608
|
-
defaultValue:
|
|
619
|
+
defaultValue: 2000,
|
|
609
620
|
params: {
|
|
610
|
-
min:
|
|
621
|
+
min: 2000
|
|
611
622
|
},
|
|
612
623
|
condition: {
|
|
613
624
|
key: "asrEnabled",
|
|
@@ -1000,6 +1011,7 @@ exports.setSessionConfigNode = (0, createNodeDescriptor_1.createNodeDescriptor)(
|
|
|
1000
1011
|
"flowNoInputUrl",
|
|
1001
1012
|
"flowNoInputTimeout",
|
|
1002
1013
|
"flowNoInputRetries",
|
|
1014
|
+
"flowNoInputFail"
|
|
1003
1015
|
],
|
|
1004
1016
|
},
|
|
1005
1017
|
{
|
|
@@ -1045,8 +1057,7 @@ exports.setSessionConfigNode = (0, createNodeDescriptor_1.createNodeDescriptor)(
|
|
|
1045
1057
|
{ type: "section", key: "params_stt" },
|
|
1046
1058
|
{ type: "section", key: "params_bargein" },
|
|
1047
1059
|
{ type: "section", key: "params_user_timeouts" },
|
|
1048
|
-
|
|
1049
|
-
// { type: "section", key: "params_flow_timeouts" },
|
|
1060
|
+
{ type: "section", key: "params_flow_timeouts" },
|
|
1050
1061
|
{ type: "section", key: "params_dtmf" },
|
|
1051
1062
|
{ type: "section", key: "params_continuous_asr" },
|
|
1052
1063
|
{ type: "section", key: "params_azure_config" },
|
|
@@ -70,6 +70,17 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
70
70
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__FIELDS__TRANSFER_REASON__DESCRIPTION",
|
|
71
71
|
defaultValue: "Bot initiated a transfer.",
|
|
72
72
|
},
|
|
73
|
+
{
|
|
74
|
+
key: "anchorMedia",
|
|
75
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__FIELDS__ANCHOR_MEDIA__LABEL",
|
|
76
|
+
type: "toggle",
|
|
77
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__FIELDS__ANCHOR_MEDIA__DESCRIPTION",
|
|
78
|
+
defaultValue: false,
|
|
79
|
+
condition: {
|
|
80
|
+
key: "transferType",
|
|
81
|
+
value: "dial"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
73
84
|
{
|
|
74
85
|
key: "useTransferSipHeaders",
|
|
75
86
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__FIELDS__USE_TRANSFER_SIP_HEADERS__LABEL",
|
|
@@ -114,7 +125,7 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
114
125
|
{
|
|
115
126
|
key: "dialTranscriptionWebhook",
|
|
116
127
|
label: "UI__NODE_EDITOR__TRANSFER__FIELDS__DIAL_TRANSCRIPTION_WEBHOOK__LABEL",
|
|
117
|
-
type: "
|
|
128
|
+
type: "cognigyText",
|
|
118
129
|
description: "UI__NODE_EDITOR__TRANSFER__FIELDS__DIAL_TRANSCRIPTION_WEBHOOK__DESCRIPTION",
|
|
119
130
|
condition: {
|
|
120
131
|
key: "transferType",
|
|
@@ -418,6 +429,7 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
418
429
|
defaultCollapsed: true,
|
|
419
430
|
fields: [
|
|
420
431
|
"referredBy",
|
|
432
|
+
"anchorMedia",
|
|
421
433
|
"useTransferSipHeaders",
|
|
422
434
|
"transferSipHeaders",
|
|
423
435
|
"enableAnsweringMachineDetection"
|
|
@@ -473,7 +485,7 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
473
485
|
summary: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__SUMMARY",
|
|
474
486
|
function: async ({ cognigy, config, }) => {
|
|
475
487
|
const { api, input } = cognigy;
|
|
476
|
-
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;
|
|
488
|
+
const { transferType, transferTarget, referredBy, anchorMedia, useTransferSipHeaders, transferSipHeaders = {}, transferReason, dialMusic, dialTranscriptionWebhook, dialCallerId, recognitionChannel, sttVendor, sttLanguage, sttDisablePunctuation, dialTimeout, amdEnabled, amdRedirectOnMachineDetected, amdRedirectText, sttLabel, googleModel, sttDeepgramModel, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting, agentAssistEnabled, agentAssistHeadersKey = customHeaderDefaultValue } = config;
|
|
477
489
|
const transferParams = {
|
|
478
490
|
transferType,
|
|
479
491
|
transferReason,
|
|
@@ -534,7 +546,7 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
534
546
|
transferParams.useTransferSipHeaders = false;
|
|
535
547
|
api.log("error", "Invalid JSON in Transfer SIP Headers");
|
|
536
548
|
}
|
|
537
|
-
const payload = transfer_mapper_1.transfer.handleInput("voiceGateway2", transferParams, false, recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting);
|
|
549
|
+
const payload = transfer_mapper_1.transfer.handleInput("voiceGateway2", transferParams, false, recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting, anchorMedia);
|
|
538
550
|
api.say(null, {
|
|
539
551
|
_cognigy: payload,
|
|
540
552
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IP_NOT_AVAILABLE = exports.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS = exports.DOCUMENT_PARSER_PROVIDER_EXTENSION = exports.TRANSLATION_PROVIDER_EXTENSION = exports.AUDIO_PREVIEW_PROVIDER_EXTENSION = exports.GENERATIVE_AI_PROVIDER_EXTENSION = exports.ADMIN_CONSOLE_URL_TOKEN = exports.X_COGNIGY_ORIGIN = exports.EMBEDDED_EXTENSION = exports.INTERNAL_STORAGE_PROVIDER_EXTENSION = exports.VOICE_GATEWAY_2_EXTENSION = exports.MICROSOFT_EXTENSION = exports.VOICE_GATEWAY_EXTENSION = exports.SMTP_EXTENSION = exports.SQL_EXTENSION = exports.MONGO_DB_EXTENSION = exports.BASIC_EXTENSION = exports.MAX_INT32 = exports.PASSWORD_RESET_TOKEN_TTL_IN_SECONDS = exports.SCOPED_USER = exports.SYSTEM_EMAIL = exports.SYSTEM = exports.CREATED_BY_SSO = void 0;
|
|
3
|
+
exports.SECONDS_PER_MINUTE = exports.IP_NOT_AVAILABLE = exports.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS = exports.DOCUMENT_PARSER_PROVIDER_EXTENSION = exports.TRANSLATION_PROVIDER_EXTENSION = exports.AUDIO_PREVIEW_PROVIDER_EXTENSION = exports.GENERATIVE_AI_PROVIDER_EXTENSION = exports.ADMIN_CONSOLE_URL_TOKEN = exports.X_COGNIGY_ORIGIN = exports.EMBEDDED_EXTENSION = exports.INTERNAL_STORAGE_PROVIDER_EXTENSION = exports.VOICE_GATEWAY_2_EXTENSION = exports.MICROSOFT_EXTENSION = exports.VOICE_GATEWAY_EXTENSION = exports.SMTP_EXTENSION = exports.SQL_EXTENSION = exports.MONGO_DB_EXTENSION = exports.BASIC_EXTENSION = exports.MAX_INT32 = exports.PASSWORD_RESET_TOKEN_TTL_IN_SECONDS = exports.SCOPED_USER = exports.SYSTEM_EMAIL = exports.SYSTEM = exports.CREATED_BY_SSO = void 0;
|
|
4
4
|
exports.CREATED_BY_SSO = "000000000000000000000550";
|
|
5
5
|
exports.SYSTEM = "000000000000000000000000";
|
|
6
6
|
exports.SYSTEM_EMAIL = "system@mail.com";
|
|
@@ -45,6 +45,12 @@ exports.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS = {
|
|
|
45
45
|
MAXIMUM_QUEUE_POSITION: "maximumQueuePosition",
|
|
46
46
|
MAXIMUM_ESTIMATED_WAIT_TIME: "maximumEstimatedWaitTime",
|
|
47
47
|
ALTERNATIVE_TEXT: "alternativeText",
|
|
48
|
+
ENABLE_HANDOVER_DISCONNECT_MESSAGE: "enableHandoverDisconnectMessageLiveAgent",
|
|
49
|
+
ENABLE_HANDOVER_CONNECT_MESSAGE: "enableHandoverConnectMessageLiveAgent",
|
|
48
50
|
};
|
|
49
51
|
exports.IP_NOT_AVAILABLE = "not available";
|
|
52
|
+
/**
|
|
53
|
+
* Number of seconds in one minute.
|
|
54
|
+
*/
|
|
55
|
+
exports.SECONDS_PER_MINUTE = 60;
|
|
50
56
|
//# sourceMappingURL=constants.js.map
|
|
@@ -15,7 +15,7 @@ function logFullConfigToDebugMode(cognigy, config, header) {
|
|
|
15
15
|
if (typeof config[key] === "object") {
|
|
16
16
|
totalSettingsString += `${key}:<br>`;
|
|
17
17
|
Object.keys(config[key]).forEach((subkey) => {
|
|
18
|
-
totalSettingsString += `- ${subkey}: ${config[key][subkey]}<br>`;
|
|
18
|
+
totalSettingsString += `- ${subkey}: ${JSON.stringify(config[key][subkey])}<br>`;
|
|
19
19
|
});
|
|
20
20
|
totalSettingsString += `<br>`;
|
|
21
21
|
}
|
|
@@ -231,7 +231,7 @@ class TextCleaner {
|
|
|
231
231
|
if (match) {
|
|
232
232
|
const start = match.index;
|
|
233
233
|
const stop = start + match[0].length;
|
|
234
|
-
const letter = this.dictNumbers[repeat]
|
|
234
|
+
const letter = `${this.dictNumbers[repeat]}`.repeat(Number(phrase.slice(start, stop).slice(-1)));
|
|
235
235
|
phrase = phrase.slice(0, start) + letter + phrase.slice(stop);
|
|
236
236
|
}
|
|
237
237
|
else {
|
|
@@ -5,6 +5,7 @@ exports.profileQuerySchema = exports.profileSchema = exports.profileDataSchema =
|
|
|
5
5
|
const createQuerySchema_1 = require("../helper/createQuerySchema");
|
|
6
6
|
const IEntityMeta_1 = require("./resources/IEntityMeta");
|
|
7
7
|
;
|
|
8
|
+
;
|
|
8
9
|
exports.profileDataSchema = {
|
|
9
10
|
title: "profileDataSchema",
|
|
10
11
|
type: "object",
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.customerEditableAnalyticsSchema = exports.customerUpdatableAnalyticsSchema = void 0;
|
|
4
4
|
const TEntrypointType_1 = require("../TEntrypointType");
|
|
5
5
|
const TAnalyticsMode_1 = require("./TAnalyticsMode");
|
|
6
|
+
// Set the default max length for custom fields from environment variable or fallback to 1024
|
|
7
|
+
const INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH = parseInt(process.env.INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH || "1024", 10);
|
|
6
8
|
exports.customerUpdatableAnalyticsSchema = {
|
|
7
9
|
title: "customerUpdatableAnalyticsSchema",
|
|
8
10
|
type: "object",
|
|
@@ -80,43 +82,43 @@ exports.customerUpdatableAnalyticsSchema = {
|
|
|
80
82
|
},
|
|
81
83
|
custom1: {
|
|
82
84
|
type: ["string", "null"],
|
|
83
|
-
maxLength:
|
|
85
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
84
86
|
},
|
|
85
87
|
custom2: {
|
|
86
88
|
type: ["string", "null"],
|
|
87
|
-
maxLength:
|
|
89
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
88
90
|
},
|
|
89
91
|
custom3: {
|
|
90
92
|
type: ["string", "null"],
|
|
91
|
-
maxLength:
|
|
93
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
92
94
|
},
|
|
93
95
|
custom4: {
|
|
94
96
|
type: ["string", "null"],
|
|
95
|
-
maxLength:
|
|
97
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
96
98
|
},
|
|
97
99
|
custom5: {
|
|
98
100
|
type: ["string", "null"],
|
|
99
|
-
maxLength:
|
|
101
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
100
102
|
},
|
|
101
103
|
custom6: {
|
|
102
104
|
type: ["string", "null"],
|
|
103
|
-
maxLength:
|
|
105
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
104
106
|
},
|
|
105
107
|
custom7: {
|
|
106
108
|
type: ["string", "null"],
|
|
107
|
-
maxLength:
|
|
109
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
108
110
|
},
|
|
109
111
|
custom8: {
|
|
110
112
|
type: ["string", "null"],
|
|
111
|
-
maxLength:
|
|
113
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
112
114
|
},
|
|
113
115
|
custom9: {
|
|
114
116
|
type: ["string", "null"],
|
|
115
|
-
maxLength:
|
|
117
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
116
118
|
},
|
|
117
119
|
custom10: {
|
|
118
120
|
type: ["string", "null"],
|
|
119
|
-
maxLength:
|
|
121
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
120
122
|
},
|
|
121
123
|
},
|
|
122
124
|
};
|
|
@@ -173,43 +175,43 @@ exports.customerEditableAnalyticsSchema = {
|
|
|
173
175
|
},
|
|
174
176
|
custom1: {
|
|
175
177
|
type: ["string", "null"],
|
|
176
|
-
maxLength:
|
|
178
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
177
179
|
},
|
|
178
180
|
custom2: {
|
|
179
181
|
type: ["string", "null"],
|
|
180
|
-
maxLength:
|
|
182
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
181
183
|
},
|
|
182
184
|
custom3: {
|
|
183
185
|
type: ["string", "null"],
|
|
184
|
-
maxLength:
|
|
186
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
185
187
|
},
|
|
186
188
|
custom4: {
|
|
187
189
|
type: ["string", "null"],
|
|
188
|
-
maxLength:
|
|
190
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
189
191
|
},
|
|
190
192
|
custom5: {
|
|
191
193
|
type: ["string", "null"],
|
|
192
|
-
maxLength:
|
|
194
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
193
195
|
},
|
|
194
196
|
custom6: {
|
|
195
197
|
type: ["string", "null"],
|
|
196
|
-
maxLength:
|
|
198
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
197
199
|
},
|
|
198
200
|
custom7: {
|
|
199
201
|
type: ["string", "null"],
|
|
200
|
-
maxLength:
|
|
202
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
201
203
|
},
|
|
202
204
|
custom8: {
|
|
203
205
|
type: ["string", "null"],
|
|
204
|
-
maxLength:
|
|
206
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
205
207
|
},
|
|
206
208
|
custom9: {
|
|
207
209
|
type: ["string", "null"],
|
|
208
|
-
maxLength:
|
|
210
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
209
211
|
},
|
|
210
212
|
custom10: {
|
|
211
213
|
type: ["string", "null"],
|
|
212
|
-
maxLength:
|
|
214
|
+
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
|
|
213
215
|
},
|
|
214
216
|
},
|
|
215
217
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders = exports.generativeAIModels = exports.embeddingModels = void 0;
|
|
3
|
+
exports.modeType = exports.generativeAIUseCases = exports.generativeAIProvidersLabels = exports.generativeAIProviders = exports.generativeAIModels = exports.embeddingModels = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* WARNING: If you update the generativeAI models, providers please also
|
|
6
6
|
* update their counterparts in the llm-providers package
|
|
@@ -23,9 +23,16 @@ exports.generativeAIModels = [
|
|
|
23
23
|
"claude-3-opus-20240229",
|
|
24
24
|
"claude-3-haiku-20240307",
|
|
25
25
|
"claude-3-sonnet-20240229",
|
|
26
|
+
"claude-3-5-sonnet-20241022",
|
|
26
27
|
"text-bison@001",
|
|
27
28
|
"custom-model",
|
|
28
29
|
"gemini-1.0-pro",
|
|
30
|
+
"gemini-1.5-pro",
|
|
31
|
+
"gemini-1.5-flash",
|
|
32
|
+
"amazon.nova-lite-v1:0",
|
|
33
|
+
"amazon.nova-pro-v1:0",
|
|
34
|
+
"amazon.nova-micro-v1:0",
|
|
35
|
+
"anthropic.claude-3-5-sonnet-20240620-v1:0",
|
|
29
36
|
...exports.embeddingModels,
|
|
30
37
|
];
|
|
31
38
|
exports.generativeAIProviders = [
|
|
@@ -37,6 +44,15 @@ exports.generativeAIProviders = [
|
|
|
37
44
|
"googleGemini",
|
|
38
45
|
"awsBedrock", // Bedrock models https://aws.amazon.com/bedrock/
|
|
39
46
|
];
|
|
47
|
+
exports.generativeAIProvidersLabels = {
|
|
48
|
+
"azureOpenAI": "Azure OpenAI",
|
|
49
|
+
"openAI": "OpenAI",
|
|
50
|
+
"alephAlpha": "Aleph Alpha",
|
|
51
|
+
"anthropic": "Anthropic",
|
|
52
|
+
"googleVertexAI": "Google Vertex AI",
|
|
53
|
+
"googleGemini": "Google Gemini",
|
|
54
|
+
"awsBedrock": "AWS Bedrock",
|
|
55
|
+
};
|
|
40
56
|
/**
|
|
41
57
|
* WARNING: If you update the generativeAI useCases, please update the generativeAI
|
|
42
58
|
* mongoose schema too. models/settings/generativeAISettings.ts
|
|
@@ -47,8 +63,8 @@ exports.generativeAIProviders = [
|
|
|
47
63
|
exports.generativeAIUseCases = [
|
|
48
64
|
"nlu",
|
|
49
65
|
"knowledgeSearch",
|
|
66
|
+
"aiAgent",
|
|
50
67
|
"gptPromptNode",
|
|
51
|
-
"gptConversation",
|
|
52
68
|
"aiEnhancedOutputs",
|
|
53
69
|
"sentimentAnalysis",
|
|
54
70
|
"intentSentenceGeneration",
|
|
@@ -56,6 +72,7 @@ exports.generativeAIUseCases = [
|
|
|
56
72
|
"generateNodeOutput",
|
|
57
73
|
"lexiconGeneration",
|
|
58
74
|
"answerExtraction",
|
|
75
|
+
"gptConversation",
|
|
59
76
|
];
|
|
60
77
|
/***********************************
|
|
61
78
|
* GENERATIVE AI MODELS MODE TYPES
|
|
@@ -111,7 +111,9 @@ exports.handoverRequestSettingsSchema = {
|
|
|
111
111
|
type: "object",
|
|
112
112
|
additionalProperties: false,
|
|
113
113
|
properties: {
|
|
114
|
-
additionalCategoryIds: { type: "array" }
|
|
114
|
+
additionalCategoryIds: { type: "array" },
|
|
115
|
+
enableHandoverDisconnectMessageRingCentralEngage: { type: "boolean" },
|
|
116
|
+
enableHandoverConnectMessageRingCentralEngage: { type: "boolean" }
|
|
115
117
|
}
|
|
116
118
|
};
|
|
117
119
|
exports.foreignSessionDataSchema = {
|
|
@@ -110,6 +110,7 @@ const callEvents = [
|
|
|
110
110
|
"RECOGNIZED_SPEECH",
|
|
111
111
|
"RECOGNIZED_DTMF",
|
|
112
112
|
"CALL_CREATED",
|
|
113
|
+
"CALL_IN_PROGRESS",
|
|
113
114
|
"CALL_RECONNECTED",
|
|
114
115
|
"CALL_COMPLETED",
|
|
115
116
|
"CALL_FAILED",
|
|
@@ -128,6 +129,7 @@ const callFailoverSettingsSchema = {
|
|
|
128
129
|
additionalProperties: false,
|
|
129
130
|
properties: {
|
|
130
131
|
enabled: { type: "boolean" },
|
|
132
|
+
enabledForSpeech: { type: "boolean" },
|
|
131
133
|
type: { type: "string", enum: [...transferTypes] },
|
|
132
134
|
headers: { type: "string" },
|
|
133
135
|
to: { type: "string" },
|
|
@@ -147,7 +149,8 @@ const callFailoverSettingsSchema = {
|
|
|
147
149
|
deepgramSmartFormatting: { type: "boolean" },
|
|
148
150
|
deepgramEndpointing: { type: "boolean" },
|
|
149
151
|
deepgramEndpointingValue: { type: "number" },
|
|
150
|
-
dialTranscribeDeepgramTier: { type: "string" }
|
|
152
|
+
dialTranscribeDeepgramTier: { type: "string" },
|
|
153
|
+
anchorMedia: { type: "boolean" }
|
|
151
154
|
}
|
|
152
155
|
};
|
|
153
156
|
exports.callEventSettingsSchema = {
|
|
@@ -173,6 +176,7 @@ const callEventsSchema = {
|
|
|
173
176
|
callCreated: exports.callEventSettingsSchema,
|
|
174
177
|
callCompleted: exports.callEventSettingsSchema,
|
|
175
178
|
callFailed: exports.callEventSettingsSchema,
|
|
179
|
+
callInProgress: exports.callEventSettingsSchema,
|
|
176
180
|
callReconnected: exports.callEventSettingsSchema,
|
|
177
181
|
recognizedDtmf: exports.callEventSettingsSchema,
|
|
178
182
|
recognizedSpeech: exports.callEventSettingsSchema,
|
|
@@ -354,6 +358,7 @@ exports.anyEndpointSettingsSchema = {
|
|
|
354
358
|
disableInputAutocomplete: { type: "boolean" },
|
|
355
359
|
disableUrlButtonSanitization: { type: "boolean" },
|
|
356
360
|
disableInputSanitization: { type: "boolean" },
|
|
361
|
+
disableSkipUriTags: { type: "boolean" },
|
|
357
362
|
enableAsyncCommunication: { type: "boolean" },
|
|
358
363
|
enableCollectMetadata: { type: "boolean" },
|
|
359
364
|
enableGenericHTMLStyling: { type: "boolean" },
|
|
@@ -291,6 +291,8 @@ exports.getQueueUpdateEventsSchema = {
|
|
|
291
291
|
"disableSensitiveLogging"
|
|
292
292
|
],
|
|
293
293
|
properties: {
|
|
294
|
+
organisationId: { type: "string" },
|
|
295
|
+
projectId: { type: "string" },
|
|
294
296
|
handoverSettings: handover_1.handoverSettingsSchema,
|
|
295
297
|
foreignSessionData: handover_1.foreignSessionDataSchema,
|
|
296
298
|
queueUpdateOptions: handover_1.queueUpdateOptionsSchema,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aiAgentSchema = exports.aiAgentDataSchema = exports.contactProfileOptions = void 0;
|
|
4
|
+
/* Interfaces & Types */
|
|
5
|
+
const IEntityMeta_1 = require("./IEntityMeta");
|
|
6
|
+
exports.contactProfileOptions = ["none", "selectedProfileFields", "completeProfile", "profileMemoriesOnly"];
|
|
7
|
+
exports.aiAgentDataSchema = {
|
|
8
|
+
title: "aiAgentDataSchema",
|
|
9
|
+
type: "object",
|
|
10
|
+
additionalProperties: false,
|
|
11
|
+
required: ["name"],
|
|
12
|
+
properties: {
|
|
13
|
+
name: { type: "string", format: "resource-name" },
|
|
14
|
+
image: { type: "string" },
|
|
15
|
+
imageOptimizedFormat: { type: "boolean" },
|
|
16
|
+
knowledgeReferenceId: { type: "string", format: "uuid" },
|
|
17
|
+
description: { type: "string", maxLength: 1000 },
|
|
18
|
+
speakingStyle: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
completeness: { type: "string" },
|
|
22
|
+
formality: { type: "string" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
safetySettings: {
|
|
26
|
+
type: "object",
|
|
27
|
+
properties: {
|
|
28
|
+
avoidHarmfulContent: { type: "boolean" },
|
|
29
|
+
avoidUngroundedContent: { type: "boolean" },
|
|
30
|
+
avoidCopyrightInfringements: { type: "boolean" },
|
|
31
|
+
preventJailbreakAndManipulation: { type: "boolean" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
instructions: { type: "string", maxLength: 1000 },
|
|
35
|
+
contactProfilesOption: {
|
|
36
|
+
type: "string",
|
|
37
|
+
enum: [...exports.contactProfileOptions]
|
|
38
|
+
},
|
|
39
|
+
contactProfilesSelected: {
|
|
40
|
+
type: "array", items: {
|
|
41
|
+
type: "string"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.aiAgentSchema = {
|
|
47
|
+
title: "aiAgentSchema",
|
|
48
|
+
type: "object",
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
properties: Object.assign(Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), exports.aiAgentDataSchema.properties), { referenceId: { type: "string", format: "uuid" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } })
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=IAiAgent.js.map
|
|
@@ -35,7 +35,7 @@ exports.actionTypes = [
|
|
|
35
35
|
"cancelTask",
|
|
36
36
|
"changePlaybookStepOrder",
|
|
37
37
|
"cloneFlow",
|
|
38
|
-
"
|
|
38
|
+
"cloneGoal",
|
|
39
39
|
"cloneLargeLanguageModel",
|
|
40
40
|
"configureIdentityProvider",
|
|
41
41
|
"createKnowledgeSearchIndex",
|
|
@@ -46,6 +46,7 @@ exports.actionTypes = [
|
|
|
46
46
|
"deprecatePassword",
|
|
47
47
|
"exportLexicons",
|
|
48
48
|
"followSession",
|
|
49
|
+
"hireAiAgent",
|
|
49
50
|
"importIntents",
|
|
50
51
|
"importIntoLexicon",
|
|
51
52
|
"ingestKnowledgeStore",
|
|
@@ -52,7 +52,8 @@ exports.endpointDataSchema = {
|
|
|
52
52
|
useDashbotAnalytics: { type: "boolean" },
|
|
53
53
|
overrideSnapshotConnections: { type: "boolean" },
|
|
54
54
|
fileStorageSettings: fileStorage_1.fileStorageSettingsSchema,
|
|
55
|
-
disableInputSanitization: { type: "boolean" }
|
|
55
|
+
disableInputSanitization: { type: "boolean" },
|
|
56
|
+
disableSkipUriTags: { type: "boolean" }
|
|
56
57
|
},
|
|
57
58
|
};
|
|
58
59
|
exports.endpointSchema = {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.goalSchema = exports.goalDataSchema = exports.goalStepSchema = exports.goalStepMetricSchema = void 0;
|
|
4
4
|
const IEntityMeta_1 = require("./IEntityMeta");
|
|
5
|
-
exports.
|
|
6
|
-
title: "
|
|
5
|
+
exports.goalStepMetricSchema = {
|
|
6
|
+
title: "goalStepMetricSchema",
|
|
7
7
|
type: "object",
|
|
8
8
|
additionalProperties: false,
|
|
9
9
|
properties: {
|
|
10
10
|
_id: { type: "string", format: "mongo-id" },
|
|
11
11
|
name: { type: "string" },
|
|
12
12
|
description: { type: "string" },
|
|
13
|
-
type: { type: "string", enum: ["currency", "duration"] },
|
|
13
|
+
type: { type: "string", enum: ["currency", "duration", "revenue"] },
|
|
14
14
|
value: { type: "number" },
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
|
-
exports.
|
|
18
|
-
title: "
|
|
17
|
+
exports.goalStepSchema = {
|
|
18
|
+
title: "goalStepSchema",
|
|
19
19
|
type: "object",
|
|
20
20
|
additionalProperties: false,
|
|
21
21
|
properties: {
|
|
@@ -26,25 +26,25 @@ exports.milestoneStepSchema = {
|
|
|
26
26
|
type: { type: "string", enum: ["start", "completion"] },
|
|
27
27
|
metrics: {
|
|
28
28
|
type: "array",
|
|
29
|
-
items: exports.
|
|
29
|
+
items: exports.goalStepMetricSchema,
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
|
-
exports.
|
|
34
|
-
title: "
|
|
33
|
+
exports.goalDataSchema = {
|
|
34
|
+
title: "goalDataSchema",
|
|
35
35
|
type: "object",
|
|
36
36
|
additionalProperties: false,
|
|
37
37
|
properties: {
|
|
38
38
|
version: { type: "string", format: "uuid" },
|
|
39
39
|
description: { type: "string" },
|
|
40
40
|
name: { type: "string", format: "resource-name" },
|
|
41
|
-
steps: { type: "array", items: exports.
|
|
41
|
+
steps: { type: "array", items: exports.goalStepSchema },
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
|
-
exports.
|
|
45
|
-
title: "
|
|
44
|
+
exports.goalSchema = {
|
|
45
|
+
title: "goalSchema",
|
|
46
46
|
type: "object",
|
|
47
47
|
additionalProperties: false,
|
|
48
|
-
properties: Object.assign(Object.assign(Object.assign({}, exports.
|
|
48
|
+
properties: Object.assign(Object.assign(Object.assign({}, exports.goalDataSchema.properties), IEntityMeta_1.entityMetaSchema.properties), { referenceId: { type: "string", format: "uuid" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }),
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=
|
|
50
|
+
//# sourceMappingURL=IGoal.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.largeLanguageModelQuerySchema = exports.largeLanguageModelSchema = exports.largeLanguageModelDataSchema = exports.googleGeminiMetaSchema = exports.googleVertexAIMetaSchema = exports.azureOpenAIMetaSchema = exports.openAIMetaSchema = exports.alephAlphaMetaSchema = exports.awsBedrockMetaSchema = exports.anthropicMetaSchema = void 0;
|
|
3
|
+
exports.largeLanguageModelQuerySchema = exports.largeLanguageModelSchema = exports.largeLanguageModelDataSchema = exports.llmFallbackSchema = exports.googleGeminiMetaSchema = exports.googleVertexAIMetaSchema = exports.azureOpenAIMetaSchema = exports.openAIMetaSchema = exports.alephAlphaMetaSchema = exports.awsBedrockMetaSchema = exports.anthropicMetaSchema = void 0;
|
|
4
4
|
/* Custom Modules */
|
|
5
5
|
const createQuerySchema_1 = require("../../helper/createQuerySchema");
|
|
6
6
|
const IEntityMeta_1 = require("./IEntityMeta");
|
|
@@ -72,6 +72,31 @@ exports.googleGeminiMetaSchema = {
|
|
|
72
72
|
customModel: { type: ["string", "null"] },
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
+
exports.llmFallbackSchema = {
|
|
76
|
+
title: "TLLMFallbackArraySchema",
|
|
77
|
+
type: "array",
|
|
78
|
+
items: {
|
|
79
|
+
type: "object",
|
|
80
|
+
additionalProperties: false,
|
|
81
|
+
properties: {
|
|
82
|
+
order: { type: "integer" },
|
|
83
|
+
isFallbackEnabled: { type: "boolean" },
|
|
84
|
+
fallbackLLMReferenceId: { type: "string", format: "uuid" },
|
|
85
|
+
immediateFallBack: {
|
|
86
|
+
type: "object",
|
|
87
|
+
additionalProperties: false,
|
|
88
|
+
properties: {
|
|
89
|
+
failedRequests: { type: "number", format: "fallback-failed-requests" },
|
|
90
|
+
durationInMinutes: { type: "number", format: "fallback-duration" },
|
|
91
|
+
emailNotificationList: {
|
|
92
|
+
type: "array",
|
|
93
|
+
items: { type: "string", format: "email" },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
75
100
|
exports.largeLanguageModelDataSchema = {
|
|
76
101
|
title: "largeLanguageModelDataSchema",
|
|
77
102
|
type: "object",
|
|
@@ -85,6 +110,7 @@ exports.largeLanguageModelDataSchema = {
|
|
|
85
110
|
description: { type: "string", format: "resource-description" },
|
|
86
111
|
modelType: { type: "string" } /* wildcard string for the Custom Models */,
|
|
87
112
|
isCustomModel: { type: "boolean" },
|
|
113
|
+
areFallbacksEnabled: { type: "boolean" },
|
|
88
114
|
modelGroup: { type: "string", enum: [...IGenerativeAIModels_1.modeType] },
|
|
89
115
|
provider: { type: "string", enum: [...IGenerativeAIModels_2.generativeAIProviders] },
|
|
90
116
|
connectionId: { type: "string", format: "uuid" },
|
|
@@ -95,7 +121,8 @@ exports.largeLanguageModelDataSchema = {
|
|
|
95
121
|
googleGemini: exports.googleGeminiMetaSchema,
|
|
96
122
|
alephAlpha: exports.alephAlphaMetaSchema,
|
|
97
123
|
anthropic: exports.anthropicMetaSchema,
|
|
98
|
-
awsBedrock: exports.awsBedrockMetaSchema
|
|
124
|
+
awsBedrock: exports.awsBedrockMetaSchema,
|
|
125
|
+
fallbacks: exports.llmFallbackSchema
|
|
99
126
|
}
|
|
100
127
|
};
|
|
101
128
|
exports.largeLanguageModelSchema = {
|
|
@@ -30,6 +30,7 @@ exports.nodePreviewTypes = [
|
|
|
30
30
|
"custom",
|
|
31
31
|
"resource",
|
|
32
32
|
"image",
|
|
33
|
+
"aiAgent"
|
|
33
34
|
];
|
|
34
35
|
const nodePreviewSchema = {
|
|
35
36
|
title: "nodePreviewSchema",
|
|
@@ -110,11 +111,13 @@ exports.nodeFieldTypes = [
|
|
|
110
111
|
"function",
|
|
111
112
|
"json",
|
|
112
113
|
"keyValuePairs",
|
|
114
|
+
"toolParameters",
|
|
113
115
|
"knowledgeStore",
|
|
114
116
|
"knowledgeStoreSelect",
|
|
115
117
|
"knowledgeSourceTags",
|
|
116
118
|
"llmSelect",
|
|
117
|
-
"
|
|
119
|
+
"aiAgentSelect",
|
|
120
|
+
"goalAndStepsSelect",
|
|
118
121
|
"lexicon",
|
|
119
122
|
"localeField",
|
|
120
123
|
"node",
|