@cognigy/rest-api-client 4.97.0 → 4.99.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 +14 -0
- package/build/RestAPIClient.js +7 -0
- package/build/apigroups/AIOpsCenterAPIGroup_2_0.js +22 -0
- package/build/apigroups/ResourcesAPIGroup_2_0.js +8 -8
- package/build/apigroups/index.js +3 -1
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +0 -44
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage0.js +0 -45
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage1.js +0 -43
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stageError.js +0 -45
- package/build/shared/charts/descriptors/analytics/completeGoal.js +2 -2
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +6 -2
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/mistralProviderConnection.js +11 -0
- package/build/shared/charts/descriptors/index.js +2 -0
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +10 -1
- package/build/shared/charts/descriptors/logic/think.js +2 -4
- package/build/shared/charts/descriptors/message/say.js +6 -3
- package/build/shared/charts/descriptors/service/GPTPrompt.js +14 -4
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +226 -66
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJobCallMCPTool.js +180 -0
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJobMCPTool.js +196 -0
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentToolAnswer.js +5 -1
- package/build/shared/charts/descriptors/service/index.js +5 -1
- package/build/shared/charts/descriptors/voice/mappers/hangup.mapper.js +9 -8
- package/build/shared/charts/descriptors/voice/nodes/hangup.js +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/hangup.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +24 -2
- package/build/shared/constants.js +8 -1
- package/build/shared/interfaces/IProfileSchema.js +1 -1
- package/build/shared/interfaces/amqpInterface.js +3 -0
- package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +10 -1
- package/build/shared/interfaces/messageAPI/endpoints.js +6 -1
- package/build/shared/interfaces/messageAPI/handover.js +6 -1
- package/build/shared/interfaces/resources/IAiAgent.js +3 -1
- package/build/shared/interfaces/resources/ILargeLanguageModel.js +10 -1
- package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
- package/build/shared/interfaces/restAPI/opsCenter/alerts/IIndexOpsCenterAlertsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/alerts/IOpsCenterAlert.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/component/IOpsCenterComponents.js +34 -0
- package/build/shared/interfaces/restAPI/opsCenter/errors/IDeleteOpsCenterErrorRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/errors/IGetOpsCenterErrorRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/errors/IIndexOpsCenterErrorsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/errors/IOpsCenterError.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetrics.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsConfigRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsRangeRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/metrics/IOpsCenterMetricsConfig.js +6 -0
- package/build/shared/interfaces/restAPI/opsCenter/observationConfig/IGetOpsCenterObservationConfigRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/observationConfig/IOpsCenterObservationConfig.js +4 -0
- package/build/shared/interfaces/restAPI/opsCenter/observationConfig/IPatchOpsCenterObservationConfigRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/opsCenter/observationConfig/ISetupOpsCenterObservationConfigRest_2_0.js +3 -0
- package/build/shared/interfaces/security/IIdentityProvider.js +1 -0
- package/dist/esm/RestAPIClient.js +7 -0
- package/dist/esm/apigroups/AIOpsCenterAPIGroup_2_0.js +18 -0
- package/dist/esm/apigroups/ResourcesAPIGroup_2_0.js +8 -8
- package/dist/esm/apigroups/index.js +1 -0
- package/dist/esm/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +0 -44
- package/dist/esm/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage0.js +0 -45
- package/dist/esm/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage1.js +0 -43
- package/dist/esm/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stageError.js +0 -45
- package/dist/esm/shared/charts/descriptors/analytics/completeGoal.js +2 -2
- package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +4 -1
- package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/mistralProviderConnection.js +8 -0
- package/dist/esm/shared/charts/descriptors/index.js +3 -1
- package/dist/esm/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +12 -3
- package/dist/esm/shared/charts/descriptors/logic/think.js +2 -4
- package/dist/esm/shared/charts/descriptors/message/say.js +6 -3
- package/dist/esm/shared/charts/descriptors/service/GPTPrompt.js +18 -8
- package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +226 -66
- package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJobCallMCPTool.js +178 -0
- package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJobMCPTool.js +193 -0
- package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentToolAnswer.js +5 -1
- package/dist/esm/shared/charts/descriptors/service/index.js +2 -0
- package/dist/esm/shared/charts/descriptors/voice/mappers/hangup.mapper.js +9 -8
- package/dist/esm/shared/charts/descriptors/voice/nodes/hangup.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/hangup.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/hangup.js +24 -2
- package/dist/esm/shared/constants.js +7 -0
- package/dist/esm/shared/interfaces/IProfileSchema.js +1 -1
- package/dist/esm/shared/interfaces/amqpInterface.js +3 -0
- package/dist/esm/shared/interfaces/generativeAI/IGenerativeAIModels.js +10 -1
- package/dist/esm/shared/interfaces/messageAPI/endpoints.js +6 -1
- package/dist/esm/shared/interfaces/messageAPI/handover.js +6 -1
- package/dist/esm/shared/interfaces/resources/IAiAgent.js +3 -1
- package/dist/esm/shared/interfaces/resources/ILargeLanguageModel.js +9 -0
- package/dist/esm/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/alerts/IIndexOpsCenterAlertsRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/alerts/IOpsCenterAlert.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/component/IOpsCenterComponents.js +31 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/errors/IDeleteOpsCenterErrorRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/errors/IGetOpsCenterErrorRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/errors/IIndexOpsCenterErrorsRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/errors/IOpsCenterError.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetrics.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsConfigRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsRangeRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IOpsCenterMetricsConfig.js +5 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/IGetOpsCenterObservationConfigRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/IOpsCenterObservationConfig.js +3 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/IPatchOpsCenterObservationConfigRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/ISetupOpsCenterObservationConfigRest_2_0.js +2 -0
- package/dist/esm/shared/interfaces/security/IIdentityProvider.js +1 -0
- package/package.json +2 -2
- package/types/index.d.ts +336 -7
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_AGENT_JOB_CALL_MCP_TOOL = void 0;
|
|
4
|
+
/* Custom modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
|
+
const transcripts_1 = require("../../../../interfaces/transcripts/transcripts");
|
|
7
|
+
exports.AI_AGENT_JOB_CALL_MCP_TOOL = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
8
|
+
type: "aiAgentJobCallMCPTool",
|
|
9
|
+
defaultLabel: "Call MCP Tool",
|
|
10
|
+
summary: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__SUMMARY",
|
|
11
|
+
parentType: "",
|
|
12
|
+
tokens: [
|
|
13
|
+
{
|
|
14
|
+
type: "input",
|
|
15
|
+
label: "MCP Tool Result",
|
|
16
|
+
script: "input.aiAgent.toolResult",
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
fields: [
|
|
20
|
+
{
|
|
21
|
+
key: "storeLocation",
|
|
22
|
+
type: "select",
|
|
23
|
+
label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STORE_LOCATION__LABEL",
|
|
24
|
+
defaultValue: "input",
|
|
25
|
+
params: {
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STORE_LOCATION__OPTIONS__INPUT__LABEL",
|
|
29
|
+
value: "input",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STORE_LOCATION__OPTIONS__CONTEXT__LABEL",
|
|
33
|
+
value: "context",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: "inputKey",
|
|
40
|
+
type: "cognigyText",
|
|
41
|
+
label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__INPUT_KEY__LABEL",
|
|
42
|
+
defaultValue: "aiAgent.toolResult",
|
|
43
|
+
condition: {
|
|
44
|
+
key: "storeLocation",
|
|
45
|
+
value: "input",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "contextKey",
|
|
50
|
+
type: "cognigyText",
|
|
51
|
+
label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__CONTEXT_KEY__LABEL",
|
|
52
|
+
defaultValue: "aiAgent.toolResult",
|
|
53
|
+
condition: {
|
|
54
|
+
key: "storeLocation",
|
|
55
|
+
value: "context",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
key: "resolveImmediately",
|
|
60
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__FIELDS__RESOLVE_IMMEDIATELY__LABEL",
|
|
61
|
+
type: "toggle",
|
|
62
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__FIELDS__RESOLVE_IMMEDIATELY__DESCRIPTION",
|
|
63
|
+
defaultValue: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: "debugToolResult",
|
|
67
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__FIELDS__DEBUG_TOOL_RESULT__LABEL",
|
|
68
|
+
type: "toggle",
|
|
69
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__FIELDS__DEBUG_TOOL_RESULT__DESCRIPTION",
|
|
70
|
+
defaultValue: false,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
sections: [
|
|
74
|
+
{
|
|
75
|
+
key: "storage",
|
|
76
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__SECTIONS__STORAGE__LABEL",
|
|
77
|
+
defaultCollapsed: false,
|
|
78
|
+
fields: ["storeLocation", "inputKey", "contextKey"],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: "debugging",
|
|
82
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_JOB__SECTIONS__DEBUG_SETTINGS__LABEL",
|
|
83
|
+
defaultCollapsed: true,
|
|
84
|
+
fields: ["debugToolResult"],
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
form: [
|
|
88
|
+
{ type: "field", key: "resolveImmediately" },
|
|
89
|
+
{ type: "section", key: "storage" },
|
|
90
|
+
{ type: "section", key: "debugging" },
|
|
91
|
+
],
|
|
92
|
+
appearance: {
|
|
93
|
+
color: "#252525",
|
|
94
|
+
},
|
|
95
|
+
tags: ["ai", "aiAgent"],
|
|
96
|
+
function: async ({ cognigy, config }) => {
|
|
97
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
98
|
+
const { api } = cognigy;
|
|
99
|
+
const { storeLocation, contextKey, inputKey, resolveImmediately, debugToolResult } = config;
|
|
100
|
+
const sessionState = await api.loadSessionState();
|
|
101
|
+
const toolCall = (_a = sessionState.lastToolCall) === null || _a === void 0 ? void 0 : _a.toolCall;
|
|
102
|
+
const aiAgentJobNode = (_b = sessionState.lastToolCall) === null || _b === void 0 ? void 0 : _b.aiAgentJobNode;
|
|
103
|
+
const mcpServerUrl = (_c = sessionState.lastToolCall) === null || _c === void 0 ? void 0 : _c.mcpServerUrl;
|
|
104
|
+
const timeout = (_d = sessionState.lastToolCall) === null || _d === void 0 ? void 0 : _d.timeout;
|
|
105
|
+
if (!(toolCall === null || toolCall === void 0 ? void 0 : toolCall.id)) {
|
|
106
|
+
(_e = api.logDebugError) === null || _e === void 0 ? void 0 : _e.call(api, "UI__DEBUG_MODE__AI_AGENT_ANSWER__ERROR__MESSAGE");
|
|
107
|
+
}
|
|
108
|
+
if (toolCall && aiAgentJobNode && mcpServerUrl && timeout) {
|
|
109
|
+
let toolResult = null;
|
|
110
|
+
let fullResult = null;
|
|
111
|
+
try {
|
|
112
|
+
toolResult = await api.executeMcpTool({
|
|
113
|
+
mcpServerUrl,
|
|
114
|
+
toolName: toolCall.function.name,
|
|
115
|
+
toolArgs: toolCall.function.arguments,
|
|
116
|
+
timeout,
|
|
117
|
+
});
|
|
118
|
+
fullResult = JSON.stringify(toolResult, null, 2);
|
|
119
|
+
if (debugToolResult) {
|
|
120
|
+
(_f = api.logDebugMessage) === null || _f === void 0 ? void 0 : _f.call(api, `Tool <b>${(_g = toolCall === null || toolCall === void 0 ? void 0 : toolCall.function) === null || _g === void 0 ? void 0 : _g.name}</b> called successfully.<br><br><b>Result:</b><br>${fullResult}`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
const errorDetails = error instanceof Error
|
|
125
|
+
? {
|
|
126
|
+
name: error.name,
|
|
127
|
+
message: error.message,
|
|
128
|
+
}
|
|
129
|
+
: error;
|
|
130
|
+
(_h = api.logDebugError) === null || _h === void 0 ? void 0 : _h.call(api, `Failed to execute MCP Tool ${(_j = toolCall === null || toolCall === void 0 ? void 0 : toolCall.function) === null || _j === void 0 ? void 0 : _j.name}:<br>${JSON.stringify(errorDetails, null, 2)}`);
|
|
131
|
+
}
|
|
132
|
+
// Add result to Cognigy Input/Context for further usage
|
|
133
|
+
if (storeLocation === "context") {
|
|
134
|
+
(_k = api.addToContext) === null || _k === void 0 ? void 0 : _k.call(api, contextKey, toolResult, "simple");
|
|
135
|
+
}
|
|
136
|
+
else if (storeLocation === "input") {
|
|
137
|
+
api.addToInput(inputKey, toolResult);
|
|
138
|
+
}
|
|
139
|
+
const { flow, node } = aiAgentJobNode;
|
|
140
|
+
if (resolveImmediately && fullResult && flow && node) {
|
|
141
|
+
// Add Tool Call Message to Transcript
|
|
142
|
+
const toolCallTranscriptStep = {
|
|
143
|
+
role: transcripts_1.TranscriptRole.ASSISTANT,
|
|
144
|
+
type: transcripts_1.TranscriptEntryType.TOOL_CALL,
|
|
145
|
+
source: "system",
|
|
146
|
+
payload: {
|
|
147
|
+
name: toolCall.function.name,
|
|
148
|
+
id: toolCall.id,
|
|
149
|
+
input: toolCall.function.arguments,
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
await api.addTranscriptStep(toolCallTranscriptStep);
|
|
153
|
+
// Add Tool Answer Message to Transcript
|
|
154
|
+
const toolAnswer = {
|
|
155
|
+
role: transcripts_1.TranscriptRole.TOOL,
|
|
156
|
+
type: transcripts_1.TranscriptEntryType.TOOL_ANSWER,
|
|
157
|
+
source: "system",
|
|
158
|
+
payload: {
|
|
159
|
+
toolCallId: toolCall.id,
|
|
160
|
+
content: fullResult,
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
await api.addTranscriptStep(toolAnswer);
|
|
164
|
+
api.resetNextNodes();
|
|
165
|
+
// remove the call from the session state, because the call has been answered
|
|
166
|
+
api.updateSessionStateValues({
|
|
167
|
+
lastToolCall: undefined,
|
|
168
|
+
});
|
|
169
|
+
await api.executeFlow({
|
|
170
|
+
flowNode: {
|
|
171
|
+
flow,
|
|
172
|
+
node,
|
|
173
|
+
},
|
|
174
|
+
absorbContext: true,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
//# sourceMappingURL=aiAgentJobCallMCPTool.js.map
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_AGENT_JOB_MCP_TOOL = void 0;
|
|
4
|
+
/* Custom modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
|
+
exports.AI_AGENT_JOB_MCP_TOOL = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
7
|
+
type: "aiAgentJobMCPTool",
|
|
8
|
+
defaultLabel: "MCP Tool",
|
|
9
|
+
summary: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__SUMMARY",
|
|
10
|
+
parentType: "aiAgentJob",
|
|
11
|
+
constraints: {
|
|
12
|
+
editable: true,
|
|
13
|
+
deletable: true,
|
|
14
|
+
collapsable: true,
|
|
15
|
+
creatable: true,
|
|
16
|
+
movable: true,
|
|
17
|
+
placement: {
|
|
18
|
+
predecessor: {
|
|
19
|
+
whitelist: [],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
childFlowCreatable: false,
|
|
23
|
+
},
|
|
24
|
+
preview: {
|
|
25
|
+
type: "text",
|
|
26
|
+
key: "name",
|
|
27
|
+
},
|
|
28
|
+
fields: [
|
|
29
|
+
{
|
|
30
|
+
type: "description",
|
|
31
|
+
key: "cachingWarning",
|
|
32
|
+
label: " ",
|
|
33
|
+
params: {
|
|
34
|
+
text: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__CACHING_WARNING__TEXT",
|
|
35
|
+
},
|
|
36
|
+
condition: {
|
|
37
|
+
key: "cacheTools",
|
|
38
|
+
value: false,
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
key: "name",
|
|
43
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__NAME__LABEL",
|
|
44
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__NAME__DESCRIPTION",
|
|
45
|
+
type: "cognigyText",
|
|
46
|
+
params: {
|
|
47
|
+
required: true,
|
|
48
|
+
rows: 1,
|
|
49
|
+
multiline: false,
|
|
50
|
+
maxLength: 64,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: "description",
|
|
55
|
+
key: "mcpWarning",
|
|
56
|
+
label: " ",
|
|
57
|
+
params: {
|
|
58
|
+
text: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__MCP_WARNING__TEXT",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: "mcpServerUrl",
|
|
63
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__MCP_SERVER_SSE_URL__LABEL",
|
|
64
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__MCP_SERVER_SSE_URL__DESCRIPTION",
|
|
65
|
+
type: "cognigyText",
|
|
66
|
+
params: {
|
|
67
|
+
required: true,
|
|
68
|
+
rows: 5,
|
|
69
|
+
multiline: true,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "timeout",
|
|
74
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TIMEOUT__LABEL",
|
|
75
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TIMEOUT__DESCRIPTION",
|
|
76
|
+
type: "slider",
|
|
77
|
+
defaultValue: 12,
|
|
78
|
+
params: {
|
|
79
|
+
min: 1,
|
|
80
|
+
max: 30,
|
|
81
|
+
step: 1,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: "debugMessageFetchedTools",
|
|
86
|
+
type: "toggle",
|
|
87
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_TOOLS__LABEL",
|
|
88
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_TOOLS__DESCRIPTION",
|
|
89
|
+
defaultValue: true,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
key: "debugMessageParameters",
|
|
93
|
+
type: "toggle",
|
|
94
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_PARAMETERS__LABEL",
|
|
95
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_PARAMETERS__DESCRIPTION",
|
|
96
|
+
defaultValue: false,
|
|
97
|
+
condition: {
|
|
98
|
+
key: "debugMessageFetchedTools",
|
|
99
|
+
value: true,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: "debugMessage",
|
|
104
|
+
type: "toggle",
|
|
105
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_MESSAGE__LABEL",
|
|
106
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_MESSAGE__DESCRIPTION",
|
|
107
|
+
defaultValue: true,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
key: "cacheTools",
|
|
111
|
+
type: "toggle",
|
|
112
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__CACHE_TOOLS__LABEL",
|
|
113
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__CACHE_TOOLS__DESCRIPTION",
|
|
114
|
+
defaultValue: true,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: "condition",
|
|
118
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_TOOL__FIELDS__CONDITION__LABEL",
|
|
119
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_TOOL__FIELDS__CONDITION__DESCRIPTION",
|
|
120
|
+
type: "cognigyText",
|
|
121
|
+
defaultValue: "",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
key: "toolFilter",
|
|
125
|
+
type: "select",
|
|
126
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__LABEL",
|
|
127
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__DESCRIPTION",
|
|
128
|
+
defaultValue: "none",
|
|
129
|
+
params: {
|
|
130
|
+
options: [
|
|
131
|
+
{
|
|
132
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__OPTIONS__NONE__LABEL",
|
|
133
|
+
value: "none",
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__OPTIONS__WHITELIST__LABEL",
|
|
137
|
+
value: "whitelist",
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__OPTIONS__BLACKLIST__LABEL",
|
|
141
|
+
value: "blacklist",
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
key: "whitelist",
|
|
148
|
+
type: "cognigyTextArray",
|
|
149
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__WHITELIST__LABEL",
|
|
150
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__WHITELIST__DESCRIPTION",
|
|
151
|
+
condition: {
|
|
152
|
+
key: "toolFilter",
|
|
153
|
+
value: "whitelist",
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
key: "blacklist",
|
|
158
|
+
type: "cognigyTextArray",
|
|
159
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__BLACKLIST__LABEL",
|
|
160
|
+
description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__BLACKLIST__DESCRIPTION",
|
|
161
|
+
condition: {
|
|
162
|
+
key: "toolFilter",
|
|
163
|
+
value: "blacklist",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
sections: [
|
|
168
|
+
{
|
|
169
|
+
key: "debugging",
|
|
170
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_JOB__SECTIONS__DEBUG_SETTINGS__LABEL",
|
|
171
|
+
defaultCollapsed: true,
|
|
172
|
+
fields: ["debugMessageFetchedTools", "debugMessageParameters", "debugMessage"],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
key: "advanced",
|
|
176
|
+
label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_JOB__SECTIONS__ADVANCED__LABEL",
|
|
177
|
+
defaultCollapsed: true,
|
|
178
|
+
fields: ["cacheTools", "condition", "toolFilter", "whitelist", "blacklist"],
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
form: [
|
|
182
|
+
{ type: "field", key: "cachingWarning" },
|
|
183
|
+
{ type: "field", key: "name" },
|
|
184
|
+
{ type: "field", key: "mcpWarning" },
|
|
185
|
+
{ type: "field", key: "mcpServerUrl" },
|
|
186
|
+
{ type: "field", key: "timeout" },
|
|
187
|
+
{ type: "section", key: "debugging" },
|
|
188
|
+
{ type: "section", key: "advanced" },
|
|
189
|
+
],
|
|
190
|
+
appearance: {
|
|
191
|
+
color: "white",
|
|
192
|
+
textColor: "#252525",
|
|
193
|
+
variant: "mini",
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
//# sourceMappingURL=aiAgentJobMCPTool.js.map
|
|
@@ -58,7 +58,7 @@ exports.AI_AGENT_TOOL_ANSWER = (0, createNodeDescriptor_1.createNodeDescriptor)(
|
|
|
58
58
|
},
|
|
59
59
|
tags: ["ai", "aiAgent"],
|
|
60
60
|
function: async ({ cognigy, config, nodeId: thisNodeId }) => {
|
|
61
|
-
var _a, _b, _c, _d, _e;
|
|
61
|
+
var _a, _b, _c, _d, _e, _f;
|
|
62
62
|
const { api, context } = cognigy;
|
|
63
63
|
const { answer, debugToolAnswer, } = config;
|
|
64
64
|
const sessionState = await api.loadSessionState();
|
|
@@ -90,6 +90,7 @@ exports.AI_AGENT_TOOL_ANSWER = (0, createNodeDescriptor_1.createNodeDescriptor)(
|
|
|
90
90
|
source: "system",
|
|
91
91
|
payload: {
|
|
92
92
|
toolCallId: toolCall.id,
|
|
93
|
+
name: toolCall.function.name,
|
|
93
94
|
content: answer,
|
|
94
95
|
}
|
|
95
96
|
};
|
|
@@ -110,6 +111,9 @@ exports.AI_AGENT_TOOL_ANSWER = (0, createNodeDescriptor_1.createNodeDescriptor)(
|
|
|
110
111
|
absorbContext: true,
|
|
111
112
|
});
|
|
112
113
|
}
|
|
114
|
+
else if (!answer) {
|
|
115
|
+
(_f = api.logDebugError) === null || _f === void 0 ? void 0 : _f.call(api, "UI__DEBUG_MODE__AI_AGENT_ANSWER__MISSING_ANSWER");
|
|
116
|
+
}
|
|
113
117
|
}
|
|
114
118
|
else {
|
|
115
119
|
throw new Error("Infinite Loop Detected");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GENESYS_CLOUD_CONNECTION_OM = exports.GENESYS_CLOUD_CONNECTION = exports.EIGHT_BY_EIGHT_CONNECTION = exports.CHATWOOT_CONNECTION = exports.RINGCENTRAL_ENGAGE_CONNECTION = exports.LIVE_AGENT_CONNECTION = exports.AI_AGENT_HANDOVER = exports.AI_AGENT_TOOL_ANSWER = exports.AI_AGENT_JOB_TOOL = exports.AI_AGENT_JOB_DEFAULT = exports.AI_AGENT_JOB = exports.LLM_ENTITY_EXTRACT = exports.GPT_CONVERSATION_SUMMARY = exports.GPT_CONVERSATION = exports.HANDOVER_INACTIVITY_TIMER = exports.CLOSE_HANDOVER = exports.GPT_PROMPT = exports.ON_SCHEDULING_ERROR = exports.ON_SCHEDULED = exports.TRIGGER_FUNCTION = exports.JWT_SECRET_CONNECTION = exports.HTTP_CONNECTION_OAUTH2 = exports.HTTP_CONNECTION_APIKEYXKEY = exports.HTTP_CONNECTION_APIKEYAUTHKEY = exports.HTTP_CONNECTION_BASIC = exports.HTTP_REQUEST = exports.CHECK_AGENT_AVAILABILITY = exports.HANDOVER_V2 = exports.HANDOVER = void 0;
|
|
3
|
+
exports.GENESYS_CLOUD_CONNECTION_OM = exports.GENESYS_CLOUD_CONNECTION = exports.EIGHT_BY_EIGHT_CONNECTION = exports.CHATWOOT_CONNECTION = exports.RINGCENTRAL_ENGAGE_CONNECTION = exports.LIVE_AGENT_CONNECTION = exports.AI_AGENT_JOB_CALL_MCP_TOOL = exports.AI_AGENT_HANDOVER = exports.AI_AGENT_TOOL_ANSWER = exports.AI_AGENT_JOB_MCP_TOOL = exports.AI_AGENT_JOB_TOOL = exports.AI_AGENT_JOB_DEFAULT = exports.AI_AGENT_JOB = exports.LLM_ENTITY_EXTRACT = exports.GPT_CONVERSATION_SUMMARY = exports.GPT_CONVERSATION = exports.HANDOVER_INACTIVITY_TIMER = exports.CLOSE_HANDOVER = exports.GPT_PROMPT = exports.ON_SCHEDULING_ERROR = exports.ON_SCHEDULED = exports.TRIGGER_FUNCTION = exports.JWT_SECRET_CONNECTION = exports.HTTP_CONNECTION_OAUTH2 = exports.HTTP_CONNECTION_APIKEYXKEY = exports.HTTP_CONNECTION_APIKEYAUTHKEY = exports.HTTP_CONNECTION_BASIC = exports.HTTP_REQUEST = exports.CHECK_AGENT_AVAILABILITY = exports.HANDOVER_V2 = exports.HANDOVER = void 0;
|
|
4
4
|
var handover_1 = require("./handover");
|
|
5
5
|
Object.defineProperty(exports, "HANDOVER", { enumerable: true, get: function () { return handover_1.HANDOVER; } });
|
|
6
6
|
var handoverV2_1 = require("./handoverV2");
|
|
@@ -41,10 +41,14 @@ var aiAgentJobDefault_1 = require("./aiAgent/aiAgentJobDefault");
|
|
|
41
41
|
Object.defineProperty(exports, "AI_AGENT_JOB_DEFAULT", { enumerable: true, get: function () { return aiAgentJobDefault_1.AI_AGENT_JOB_DEFAULT; } });
|
|
42
42
|
var aiAgentJobTool_1 = require("./aiAgent/aiAgentJobTool");
|
|
43
43
|
Object.defineProperty(exports, "AI_AGENT_JOB_TOOL", { enumerable: true, get: function () { return aiAgentJobTool_1.AI_AGENT_JOB_TOOL; } });
|
|
44
|
+
var aiAgentJobMCPTool_1 = require("./aiAgent/aiAgentJobMCPTool");
|
|
45
|
+
Object.defineProperty(exports, "AI_AGENT_JOB_MCP_TOOL", { enumerable: true, get: function () { return aiAgentJobMCPTool_1.AI_AGENT_JOB_MCP_TOOL; } });
|
|
44
46
|
var aiAgentToolAnswer_1 = require("./aiAgent/aiAgentToolAnswer");
|
|
45
47
|
Object.defineProperty(exports, "AI_AGENT_TOOL_ANSWER", { enumerable: true, get: function () { return aiAgentToolAnswer_1.AI_AGENT_TOOL_ANSWER; } });
|
|
46
48
|
var aiAgentHandover_1 = require("./aiAgent/aiAgentHandover");
|
|
47
49
|
Object.defineProperty(exports, "AI_AGENT_HANDOVER", { enumerable: true, get: function () { return aiAgentHandover_1.AI_AGENT_HANDOVER; } });
|
|
50
|
+
var aiAgentJobCallMCPTool_1 = require("./aiAgent/aiAgentJobCallMCPTool");
|
|
51
|
+
Object.defineProperty(exports, "AI_AGENT_JOB_CALL_MCP_TOOL", { enumerable: true, get: function () { return aiAgentJobCallMCPTool_1.AI_AGENT_JOB_CALL_MCP_TOOL; } });
|
|
48
52
|
var handoverConnections_1 = require("./handoverConnections");
|
|
49
53
|
Object.defineProperty(exports, "LIVE_AGENT_CONNECTION", { enumerable: true, get: function () { return handoverConnections_1.LIVE_AGENT_CONNECTION; } });
|
|
50
54
|
Object.defineProperty(exports, "RINGCENTRAL_ENGAGE_CONNECTION", { enumerable: true, get: function () { return handoverConnections_1.RINGCENTRAL_ENGAGE_CONNECTION; } });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.hangUp = void 0;
|
|
4
4
|
exports.hangUp = {
|
|
5
|
-
handleInput(endpointType, hangUpReason) {
|
|
5
|
+
handleInput(endpointType, hangUpReason, hangupImmediately) {
|
|
6
6
|
switch (endpointType) {
|
|
7
7
|
case "bandwidth":
|
|
8
8
|
return this.handleBandwidthInput(hangUpReason);
|
|
@@ -10,23 +10,24 @@ exports.hangUp = {
|
|
|
10
10
|
return this.handleAudioCodesInput(hangUpReason);
|
|
11
11
|
case "voiceGateway2":
|
|
12
12
|
default:
|
|
13
|
-
return this.handleVGInput(hangUpReason);
|
|
13
|
+
return this.handleVGInput(hangupImmediately, hangUpReason);
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
handleVGInput(hangUpReason) {
|
|
16
|
+
handleVGInput(hangupImmediately, hangUpReason) {
|
|
17
17
|
const payload = {
|
|
18
18
|
_voiceGateway2: {
|
|
19
19
|
json: {
|
|
20
|
-
hangup: {
|
|
20
|
+
hangup: {
|
|
21
|
+
headers: {},
|
|
22
|
+
hangupImmediately
|
|
23
|
+
}
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
};
|
|
24
27
|
if (hangUpReason) {
|
|
25
|
-
payload._voiceGateway2.json.hangup = {
|
|
26
|
-
headers: {
|
|
28
|
+
payload._voiceGateway2.json.hangup = Object.assign(Object.assign({}, payload._voiceGateway2.json.hangup), { headers: {
|
|
27
29
|
"X-Reason": hangUpReason
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
+
} });
|
|
30
31
|
}
|
|
31
32
|
return payload;
|
|
32
33
|
},
|
|
@@ -34,7 +34,7 @@ exports.HANG_UP = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
34
34
|
const { hangupReason } = config;
|
|
35
35
|
const { endpointType } = input;
|
|
36
36
|
try {
|
|
37
|
-
const payload = hangup_mapper_1.hangUp.handleInput(endpointType, hangupReason);
|
|
37
|
+
const payload = hangup_mapper_1.hangUp.handleInput(endpointType, hangupReason, false);
|
|
38
38
|
await api.say(null, {
|
|
39
39
|
_cognigy: payload
|
|
40
40
|
});
|
|
@@ -37,7 +37,7 @@ exports.hangupNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
37
37
|
const { hangupReason } = config;
|
|
38
38
|
try {
|
|
39
39
|
const { isFeatureAccmEnabled } = api.getEndpointSettings();
|
|
40
|
-
const payload = isFeatureAccmEnabled ? (0, utils_1.buildPayloadAccm)("hangup", config, nodeId) : hangup_mapper_1.hangUp.handleInput("audioCodes", hangupReason);
|
|
40
|
+
const payload = isFeatureAccmEnabled ? (0, utils_1.buildPayloadAccm)("hangup", config, nodeId) : hangup_mapper_1.hangUp.handleInput("audioCodes", hangupReason, false);
|
|
41
41
|
await api.say(null, {
|
|
42
42
|
_cognigy: payload
|
|
43
43
|
});
|
|
@@ -27,13 +27,35 @@ exports.hangupNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
27
27
|
params: {
|
|
28
28
|
required: true
|
|
29
29
|
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
key: "hangupImmediately",
|
|
33
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__HANGUP__FIELDS__HANGUP_IMMEDIATELY__LABEL",
|
|
34
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__HANGUP__FIELDS__HANGUP_IMMEDIATELY__DESCRIPTION",
|
|
35
|
+
type: "toggle",
|
|
36
|
+
defaultValue: false,
|
|
37
|
+
params: {
|
|
38
|
+
required: true
|
|
39
|
+
}
|
|
30
40
|
}
|
|
31
41
|
],
|
|
42
|
+
sections: [
|
|
43
|
+
{
|
|
44
|
+
key: "advanced",
|
|
45
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SECTIONS__ADVANCED__LABEL",
|
|
46
|
+
defaultCollapsed: true,
|
|
47
|
+
fields: ["hangupImmediately"]
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
form: [
|
|
51
|
+
{ "type": "field", "key": "hangupReason" },
|
|
52
|
+
{ "type": "section", "key": "advanced" },
|
|
53
|
+
],
|
|
32
54
|
function: async ({ cognigy, config }) => {
|
|
33
55
|
const { api } = cognigy;
|
|
34
|
-
const { hangupReason } = config;
|
|
56
|
+
const { hangupReason, hangupImmediately } = config;
|
|
35
57
|
try {
|
|
36
|
-
const payload = hangup_mapper_1.hangUp.handleInput("voiceGateway2", hangupReason);
|
|
58
|
+
const payload = hangup_mapper_1.hangUp.handleInput("voiceGateway2", hangupReason, hangupImmediately);
|
|
37
59
|
await api.say(null, {
|
|
38
60
|
_cognigy: payload
|
|
39
61
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PLATFORM_PROVIDED_LLM_CONNECTION_ID = exports.PLATFORM_PROVIDED_LLM_ID = exports.PLATFORM_PROVIDED_LLM_USE_CASES = 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;
|
|
3
|
+
exports.PLATFORM_PROVIDED_LLM_CONNECTION_ID = exports.PLATFORM_PROVIDED_LLM_ID = exports.DEPRECATED_GENAI_USE_CASES = exports.PLATFORM_PROVIDED_LLM_USE_CASES = 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";
|
|
@@ -59,6 +59,13 @@ exports.PLATFORM_PROVIDED_LLM_USE_CASES = [
|
|
|
59
59
|
"flowGeneration",
|
|
60
60
|
"lexiconGeneration",
|
|
61
61
|
"generateNodeOutput",
|
|
62
|
+
"designTimeGeneration",
|
|
63
|
+
];
|
|
64
|
+
exports.DEPRECATED_GENAI_USE_CASES = [
|
|
65
|
+
"intentSentenceGeneration",
|
|
66
|
+
"flowGeneration",
|
|
67
|
+
"lexiconGeneration",
|
|
68
|
+
"generateNodeOutput",
|
|
62
69
|
];
|
|
63
70
|
exports.PLATFORM_PROVIDED_LLM_ID = "aaaaaaaa-aaaa-aaaa-aaaa-000000000000";
|
|
64
71
|
exports.PLATFORM_PROVIDED_LLM_CONNECTION_ID = "aaaaaaaa-aaaa-aaaa-aaaa-000000000001";
|
|
@@ -30,11 +30,17 @@ exports.generativeAIModels = [
|
|
|
30
30
|
"gemini-1.0-pro",
|
|
31
31
|
"gemini-1.5-pro",
|
|
32
32
|
"gemini-1.5-flash",
|
|
33
|
+
"gemini-2.0-flash",
|
|
34
|
+
"gemini-2.0-flash-lite",
|
|
33
35
|
"amazon.nova-lite-v1:0",
|
|
34
36
|
"amazon.nova-pro-v1:0",
|
|
35
37
|
"amazon.nova-micro-v1:0",
|
|
36
38
|
"anthropic.claude-3-5-sonnet-20240620-v1:0",
|
|
37
39
|
"claude-3-7-sonnet-20250219",
|
|
40
|
+
"mistral-large-2411",
|
|
41
|
+
"mistral-small-2503",
|
|
42
|
+
"pixtral-large-2411",
|
|
43
|
+
"pixtral-12b-2409",
|
|
38
44
|
...exports.embeddingModels,
|
|
39
45
|
];
|
|
40
46
|
exports.generativeAIProviders = [
|
|
@@ -45,7 +51,8 @@ exports.generativeAIProviders = [
|
|
|
45
51
|
"anthropic",
|
|
46
52
|
"googleVertexAI",
|
|
47
53
|
"googleGemini",
|
|
48
|
-
"awsBedrock",
|
|
54
|
+
"awsBedrock",
|
|
55
|
+
"mistral", // Mistral models https://docs.mistral.ai/getting-started/models/models_overview/
|
|
49
56
|
];
|
|
50
57
|
exports.generativeAIProvidersLabels = {
|
|
51
58
|
"azureOpenAI": "Azure OpenAI",
|
|
@@ -56,6 +63,7 @@ exports.generativeAIProvidersLabels = {
|
|
|
56
63
|
"googleVertexAI": "Google Vertex AI",
|
|
57
64
|
"googleGemini": "Google Gemini",
|
|
58
65
|
"awsBedrock": "AWS Bedrock",
|
|
66
|
+
"mistral": "Mistral",
|
|
59
67
|
};
|
|
60
68
|
/**
|
|
61
69
|
* WARNING: If you update the generativeAI useCases, please update the generativeAI
|
|
@@ -71,6 +79,7 @@ exports.generativeAIUseCases = [
|
|
|
71
79
|
"gptPromptNode",
|
|
72
80
|
"aiEnhancedOutputs",
|
|
73
81
|
"sentimentAnalysis",
|
|
82
|
+
"designTimeGeneration",
|
|
74
83
|
"intentSentenceGeneration",
|
|
75
84
|
"flowGeneration",
|
|
76
85
|
"generateNodeOutput",
|
|
@@ -428,7 +428,12 @@ exports.anyEndpointSettingsSchema = {
|
|
|
428
428
|
timeout: { type: "integer" },
|
|
429
429
|
updateContactProfileWithFacebookProfile: { type: "boolean" },
|
|
430
430
|
voice: { type: "string" },
|
|
431
|
-
webhookUrl: {
|
|
431
|
+
webhookUrl: {
|
|
432
|
+
oneOf: [
|
|
433
|
+
{ type: "string", format: "uri" },
|
|
434
|
+
{ type: "string", enum: [""] }
|
|
435
|
+
]
|
|
436
|
+
},
|
|
432
437
|
enableConnectionStatusIndicator: { type: "boolean" },
|
|
433
438
|
enableUnreadMessageTitleIndicator: { type: "boolean" },
|
|
434
439
|
showEngagementMessagesInChat: { type: "boolean" },
|
|
@@ -266,7 +266,12 @@ exports.pollEventSchema = {
|
|
|
266
266
|
disableSensitiveLogging: { type: "boolean" },
|
|
267
267
|
pollingTimeoutAt: { type: "number" },
|
|
268
268
|
sequence: { type: "number" },
|
|
269
|
-
lastEventId: { type: "string" }
|
|
269
|
+
lastEventId: { type: "string" },
|
|
270
|
+
projectId: { type: "string" },
|
|
271
|
+
URLToken: { type: "string" },
|
|
272
|
+
userId: { type: "string" },
|
|
273
|
+
channel: { type: "string" },
|
|
274
|
+
retryCount: { type: "number" }
|
|
270
275
|
},
|
|
271
276
|
};
|
|
272
277
|
exports.handleHandoverRpcEventSchema = {
|
|
@@ -28,7 +28,9 @@ exports.aiAgentDataSchema = {
|
|
|
28
28
|
ttsVoice: { type: "string" },
|
|
29
29
|
ttsLanguage: { type: "string" },
|
|
30
30
|
ttsVendor: { type: "string" },
|
|
31
|
-
ttsModel: { type: "string" }
|
|
31
|
+
ttsModel: { type: "string" },
|
|
32
|
+
ttsLabel: { type: "string" },
|
|
33
|
+
ttsDisableCache: { type: "boolean" }
|
|
32
34
|
}
|
|
33
35
|
},
|
|
34
36
|
enableVoiceConfigs: { type: "boolean" },
|