@cognigy/rest-api-client 0.13.2 → 0.14.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 +5 -1
- package/build/apigroups/ResourcesAPIGroup_2_0.js +15 -3
- package/build/shared/charts/descriptors/apps/setHtmlAppState.js +83 -13
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnection.js +14 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +19 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAIProviderConnection.js +11 -0
- package/build/shared/charts/descriptors/index.js +8 -5
- package/build/shared/charts/descriptors/message/question/optionalQuestion.js +22 -6
- package/build/shared/charts/descriptors/message/question/question.js +193 -25
- package/build/shared/charts/descriptors/message/say.js +33 -2
- package/build/shared/charts/descriptors/service/completeText.js +316 -0
- package/build/shared/charts/descriptors/service/handoverV2.js +47 -1
- package/build/shared/charts/descriptors/service/index.js +3 -1
- package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +40 -7
- package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +93 -32
- package/build/shared/charts/descriptors/voice/nodes/play.js +8 -6
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +90 -8
- package/build/shared/charts/descriptors/voice/nodes/transfer.js +2 -2
- package/build/shared/charts/descriptors/voice/utils/helper.js +11 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/agentAssist.js +2 -2
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +4 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +3 -3
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +125 -26
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +91 -7
- package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +18 -11
- package/build/shared/charts/descriptors/voicegateway2/utils/strip-nulls.js +4 -1
- package/build/shared/charts/helpers/generativeAI/getRephraseWithAIFields.js +100 -0
- package/build/shared/charts/helpers/generativeAI/rephraseSentenceWithAi.js +44 -0
- package/build/shared/constants.js +2 -1
- package/build/shared/interfaces/ai.js +16 -0
- package/build/shared/interfaces/analytics/IAnalyticsDataGoals.js +3 -0
- package/build/shared/interfaces/endpointInterface.js +1 -0
- package/build/shared/interfaces/filemanager/IRuntimeFile.js +30 -0
- package/build/shared/interfaces/filemanager/index.js +1 -0
- package/build/shared/interfaces/handover.js +39 -3
- package/build/shared/interfaces/messageAPI/endpoints.js +2 -0
- package/build/shared/interfaces/messageAPI/handover.js +6 -0
- package/build/shared/interfaces/resources/IConnectionSchema.js +2 -1
- package/build/shared/interfaces/resources/IExtension.js +2 -1
- package/build/shared/interfaces/resources/IFlow.js +2 -1
- package/build/shared/interfaces/resources/ILexicon.js +15 -2
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +1 -1
- package/build/shared/interfaces/resources/intent/IIntent.js +5 -2
- package/build/shared/interfaces/resources/intent/IIntentRelation.js +3 -1
- package/build/shared/interfaces/resources/settings/IAgentSettings.js +9 -4
- package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +136 -0
- package/build/shared/interfaces/resources/settings/index.js +7 -1
- package/build/shared/interfaces/restAPI/resources/flow/v2.0/sentence/IGenerateSentencesRest_2_0.js +3 -0
- package/package.json +1 -1
- package/types/index.d.ts +569 -184
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.intentSchema = exports.intentDataSchema = exports.intentInDBDataSchema = exports.localizedIntentDataSchema = exports.overrideIntentDefaultRepliesAsExamplesTypes = exports.intentTypes = void 0;
|
|
4
4
|
const IEntityMeta_1 = require("../IEntityMeta");
|
|
5
5
|
const IIntentFeedbackReport_1 = require("./IIntentFeedbackReport");
|
|
6
|
+
const IIntentRelation_1 = require("./IIntentRelation");
|
|
6
7
|
exports.intentTypes = ["yesNoIntent", "default"];
|
|
7
8
|
exports.overrideIntentDefaultRepliesAsExamplesTypes = [
|
|
8
9
|
"useFlowSettings",
|
|
@@ -33,7 +34,7 @@ exports.intentInDBDataSchema = {
|
|
|
33
34
|
title: "intentInDBDataSchema",
|
|
34
35
|
type: "object",
|
|
35
36
|
additionalProperties: false,
|
|
36
|
-
properties: Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), { feedbackReport: IIntentFeedbackReport_1.intentFeedbackInDBReportSchema, localizedData: { type: "array", items: exports.localizedIntentDataSchema }, enabledLocaleReferences: { type: "array", items: { format: "mongo-id" } }, name: { type: "string", format: "resource-name" }, intentType: { type: "string", enum: [...exports.intentTypes] }, intentRelationReferences: {
|
|
37
|
+
properties: Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), { feedbackReport: IIntentFeedbackReport_1.intentFeedbackInDBReportSchema, localizedData: { type: "array", items: exports.localizedIntentDataSchema }, enabledLocaleReferences: { type: "array", items: { format: "mongo-id" } }, name: { type: "string", format: "resource-name" }, description: { type: "string", format: "resource-description" }, intentType: { type: "string", enum: [...exports.intentTypes] }, intentRelationReferences: {
|
|
37
38
|
type: "array",
|
|
38
39
|
items: { type: "string", format: "mongo-id" }
|
|
39
40
|
}, tags: {
|
|
@@ -45,7 +46,7 @@ exports.intentInDBDataSchema = {
|
|
|
45
46
|
{ type: "boolean" },
|
|
46
47
|
{ type: "array", items: { type: "string", format: "mongo-id" } }
|
|
47
48
|
]
|
|
48
|
-
}, flowReferenceId: { type: "string", format: "uuid" }, referenceId: { type: "string", format: "uuid" }, flowReference: { type: "string", format: "mongo-id" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" }, analyticsLabel: { type: "string", format: "analytics-label" }, overrideIntentDefaultRepliesAsExamples: {
|
|
49
|
+
}, biasTowardsParentOrChildIntents: { type: "string", enum: [...IIntentRelation_1.biasTowardsParentOrChildIntentsTypes] }, flowReferenceId: { type: "string", format: "uuid" }, referenceId: { type: "string", format: "uuid" }, flowReference: { type: "string", format: "mongo-id" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" }, analyticsLabel: { type: "string", format: "analytics-label" }, overrideIntentDefaultRepliesAsExamples: {
|
|
49
50
|
type: ["string", "null"],
|
|
50
51
|
enum: [...exports.overrideIntentDefaultRepliesAsExamplesTypes]
|
|
51
52
|
} })
|
|
@@ -56,6 +57,7 @@ exports.intentDataSchema = {
|
|
|
56
57
|
additionalProperties: false,
|
|
57
58
|
properties: {
|
|
58
59
|
name: { type: "string", format: "resource-name" },
|
|
60
|
+
description: { type: "string", format: "resource-description" },
|
|
59
61
|
intentType: { type: "string", enum: [...exports.intentTypes] },
|
|
60
62
|
condition: { type: ["string", "null"], maxLength: 2000 },
|
|
61
63
|
intentRelationReferences: {
|
|
@@ -89,6 +91,7 @@ exports.intentDataSchema = {
|
|
|
89
91
|
{ type: "array", items: { type: "string", format: "mongo-id" } }
|
|
90
92
|
]
|
|
91
93
|
},
|
|
94
|
+
biasTowardsParentOrChildIntents: { type: "string", enum: [...IIntentRelation_1.biasTowardsParentOrChildIntentsTypes] },
|
|
92
95
|
flowReferenceId: { type: "string", format: "uuid" },
|
|
93
96
|
feedbackReport: IIntentFeedbackReport_1.intentFeedbackReportDataSchema,
|
|
94
97
|
analyticsLabel: { type: "string", format: "analytics-label" },
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.intentRelationSchema = void 0;
|
|
3
|
+
exports.intentRelationSchema = exports.biasTowardsParentOrChildIntentsTypes = void 0;
|
|
4
|
+
exports.biasTowardsParentOrChildIntentsTypes = ["parents", "children"];
|
|
4
5
|
exports.intentRelationSchema = {
|
|
5
6
|
title: "intentHierarchyRelationSchema",
|
|
6
7
|
type: "object",
|
|
@@ -14,6 +15,7 @@ exports.intentRelationSchema = {
|
|
|
14
15
|
{ type: "array", items: { type: "string", format: "mongo-id" } }
|
|
15
16
|
]
|
|
16
17
|
},
|
|
18
|
+
biasTowardsParentOrChildIntents: { type: "string", enum: [...exports.biasTowardsParentOrChildIntentsTypes] },
|
|
17
19
|
intentReference: { type: "string", format: "mongo-id" },
|
|
18
20
|
flowReference: { type: "string", format: "mongo-id" },
|
|
19
21
|
projectReference: { type: "string", format: "mongo-id" },
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.agentSettingsSchema = exports.agentSettingsDataSchema = exports.generateAgentSettingsRedisKey = void 0;
|
|
4
4
|
const IEntityMeta_1 = require("../IEntityMeta");
|
|
5
5
|
const ISharedSettings_1 = require("./ISharedSettings");
|
|
6
|
+
const IGenerativeAISettings_1 = require("./IGenerativeAISettings");
|
|
6
7
|
const arrayTranslationProviders = [
|
|
7
8
|
"none",
|
|
8
9
|
"microsoft",
|
|
@@ -57,7 +58,7 @@ exports.agentSettingsDataSchema = {
|
|
|
57
58
|
additionalProperties: false,
|
|
58
59
|
properties: {
|
|
59
60
|
apiKey: { type: "string", maxLength: 255 },
|
|
60
|
-
region: { type: "string", maxLength: 50 }
|
|
61
|
+
region: { type: "string", maxLength: 50 }
|
|
61
62
|
}
|
|
62
63
|
},
|
|
63
64
|
aws: {
|
|
@@ -67,7 +68,7 @@ exports.agentSettingsDataSchema = {
|
|
|
67
68
|
accessKeyId: { type: "string", maxLength: 255 },
|
|
68
69
|
secretAccessKey: { type: "string", maxLength: 255 },
|
|
69
70
|
sessionToken: { type: "string", default: undefined },
|
|
70
|
-
region: { type: "string", maxLength: 50, default: undefined }
|
|
71
|
+
region: { type: "string", maxLength: 50, default: undefined }
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
google: {
|
|
@@ -78,14 +79,18 @@ exports.agentSettingsDataSchema = {
|
|
|
78
79
|
fileToken: { type: "string", maxLength: 350 },
|
|
79
80
|
credentialsStringified: { type: "string", maxLength: 2000 },
|
|
80
81
|
clientEmail: { type: "string", maxLength: 250 },
|
|
81
|
-
privateKey: { type: "string", maxLength: 2000 }
|
|
82
|
+
privateKey: { type: "string", maxLength: 2000 }
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
audioPreviewProviderCustomBaseUrl: { type: "string", maxLength: 255 },
|
|
85
86
|
audioPreviewRetries: { type: "integer", minimum: 0, maximum: 3 },
|
|
86
87
|
audioPreviewTimeout: { type: "integer", minimum: 0, maximum: 8000 },
|
|
87
|
-
audioPreviewCacheExpiry: { type: "integer", enum: [0, 3600, 84600] }
|
|
88
|
+
audioPreviewCacheExpiry: { type: "integer", enum: [0, 3600, 84600] }
|
|
88
89
|
}
|
|
90
|
+
}, generativeAISettings: {
|
|
91
|
+
type: "object",
|
|
92
|
+
additionalProperties: false,
|
|
93
|
+
properties: Object.assign({}, IGenerativeAISettings_1.generativeAISettingsDataSchema.properties)
|
|
89
94
|
} })
|
|
90
95
|
};
|
|
91
96
|
exports.agentSettingsSchema = {
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generativeAISettingsDataSchema = exports.generativeAIMetaAzureOpenAIDataSchema = exports.generativeAIMetaOpenAIDataSchema = exports.azureOpenAIModels = exports.openAIModels = exports.generativeAIProviders = exports.generativeAIUseCases = void 0;
|
|
4
|
+
exports.generativeAIUseCases = [
|
|
5
|
+
"intentGeneration",
|
|
6
|
+
"ouputContextualization",
|
|
7
|
+
"lexiconGeneration",
|
|
8
|
+
"flowGeneration",
|
|
9
|
+
"flowExplanation"
|
|
10
|
+
];
|
|
11
|
+
exports.generativeAIProviders = ["none", "openAI", "azureOpenAI"];
|
|
12
|
+
/**
|
|
13
|
+
* For Open.AI default should be => "text-davinci-003"
|
|
14
|
+
* For Azure OpenAI default should be => "text-davinci-002"
|
|
15
|
+
*/
|
|
16
|
+
exports.openAIModels = ["text-davinci-003"];
|
|
17
|
+
exports.azureOpenAIModels = ["text-davinci-002"];
|
|
18
|
+
exports.generativeAIMetaOpenAIDataSchema = {
|
|
19
|
+
title: "generativeAIMetaOpenAIDataSchema",
|
|
20
|
+
type: "object",
|
|
21
|
+
additionalProperties: false,
|
|
22
|
+
required: ["model", "temperature"],
|
|
23
|
+
properties: {
|
|
24
|
+
model: {
|
|
25
|
+
type: "string",
|
|
26
|
+
maxLength: 50
|
|
27
|
+
},
|
|
28
|
+
temperature: {
|
|
29
|
+
type: "number",
|
|
30
|
+
minimum: 0,
|
|
31
|
+
maximum: 1
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.generativeAIMetaAzureOpenAIDataSchema = {
|
|
36
|
+
title: "generativeAIMetaAzureOpenAIDataSchema",
|
|
37
|
+
type: "object",
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
required: ["model", "temperature"],
|
|
40
|
+
properties: {
|
|
41
|
+
model: {
|
|
42
|
+
type: "string",
|
|
43
|
+
maxLength: 50
|
|
44
|
+
},
|
|
45
|
+
temperature: {
|
|
46
|
+
type: "number",
|
|
47
|
+
minimum: 0,
|
|
48
|
+
maximum: 1
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.generativeAISettingsDataSchema = {
|
|
53
|
+
title: "generativeAISettingsDataSchema",
|
|
54
|
+
type: "object",
|
|
55
|
+
additionalProperties: false,
|
|
56
|
+
required: ["generativeAIProvider"],
|
|
57
|
+
properties: {
|
|
58
|
+
generativeAIProvider: {
|
|
59
|
+
type: "string",
|
|
60
|
+
enum: [...exports.generativeAIProviders]
|
|
61
|
+
},
|
|
62
|
+
openAI: {
|
|
63
|
+
type: "object",
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
properties: {
|
|
66
|
+
provider: {
|
|
67
|
+
type: "string",
|
|
68
|
+
enum: [...exports.generativeAIProviders]
|
|
69
|
+
},
|
|
70
|
+
connectionId: { type: "string", maxLength: 255 },
|
|
71
|
+
intentGeneration: {
|
|
72
|
+
type: "object",
|
|
73
|
+
additionalProperties: false,
|
|
74
|
+
properties: Object.assign({}, exports.generativeAIMetaOpenAIDataSchema.properties)
|
|
75
|
+
},
|
|
76
|
+
ouputContextualization: {
|
|
77
|
+
type: "object",
|
|
78
|
+
additionalProperties: false,
|
|
79
|
+
properties: Object.assign({}, exports.generativeAIMetaOpenAIDataSchema.properties)
|
|
80
|
+
},
|
|
81
|
+
lexiconGeneration: {
|
|
82
|
+
type: "object",
|
|
83
|
+
additionalProperties: false,
|
|
84
|
+
properties: Object.assign({}, exports.generativeAIMetaOpenAIDataSchema.properties)
|
|
85
|
+
},
|
|
86
|
+
flowGeneration: {
|
|
87
|
+
type: "object",
|
|
88
|
+
additionalProperties: false,
|
|
89
|
+
properties: Object.assign({}, exports.generativeAIMetaOpenAIDataSchema.properties)
|
|
90
|
+
},
|
|
91
|
+
flowExplanation: {
|
|
92
|
+
type: "object",
|
|
93
|
+
additionalProperties: false,
|
|
94
|
+
properties: Object.assign({}, exports.generativeAIMetaOpenAIDataSchema.properties)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
azureOpenAI: {
|
|
99
|
+
type: "object",
|
|
100
|
+
additionalProperties: false,
|
|
101
|
+
properties: {
|
|
102
|
+
provider: {
|
|
103
|
+
type: "string",
|
|
104
|
+
enum: [...exports.generativeAIProviders]
|
|
105
|
+
},
|
|
106
|
+
connectionId: { type: "string", maxLength: 255 },
|
|
107
|
+
intentGeneration: {
|
|
108
|
+
type: "object",
|
|
109
|
+
additionalProperties: false,
|
|
110
|
+
properties: Object.assign({}, exports.generativeAIMetaAzureOpenAIDataSchema.properties)
|
|
111
|
+
},
|
|
112
|
+
ouputContextualization: {
|
|
113
|
+
type: "object",
|
|
114
|
+
additionalProperties: false,
|
|
115
|
+
properties: Object.assign({}, exports.generativeAIMetaAzureOpenAIDataSchema.properties)
|
|
116
|
+
},
|
|
117
|
+
lexiconGeneration: {
|
|
118
|
+
type: "object",
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
properties: Object.assign({}, exports.generativeAIMetaAzureOpenAIDataSchema.properties)
|
|
121
|
+
},
|
|
122
|
+
flowGeneration: {
|
|
123
|
+
type: "object",
|
|
124
|
+
additionalProperties: false,
|
|
125
|
+
properties: Object.assign({}, exports.generativeAIMetaAzureOpenAIDataSchema.properties)
|
|
126
|
+
},
|
|
127
|
+
flowExplanation: {
|
|
128
|
+
type: "object",
|
|
129
|
+
additionalProperties: false,
|
|
130
|
+
properties: Object.assign({}, exports.generativeAIMetaAzureOpenAIDataSchema.properties)
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=IGenerativeAISettings.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sharedSettingsSchema = exports.flowSettingsSchema = exports.flowSettingsDataSchema = exports.flowIntentMappingOrderType = exports.agentSettingsSchema = exports.agentSettingsDataSchema = void 0;
|
|
3
|
+
exports.generativeAIUseCases = exports.generativeAIProviders = exports.openAIModels = exports.azureOpenAIModels = exports.generativeAISettingsDataSchema = exports.sharedSettingsSchema = exports.flowSettingsSchema = exports.flowSettingsDataSchema = exports.flowIntentMappingOrderType = exports.agentSettingsSchema = exports.agentSettingsDataSchema = void 0;
|
|
4
4
|
var IAgentSettings_1 = require("./IAgentSettings");
|
|
5
5
|
Object.defineProperty(exports, "agentSettingsDataSchema", { enumerable: true, get: function () { return IAgentSettings_1.agentSettingsDataSchema; } });
|
|
6
6
|
Object.defineProperty(exports, "agentSettingsSchema", { enumerable: true, get: function () { return IAgentSettings_1.agentSettingsSchema; } });
|
|
@@ -10,4 +10,10 @@ Object.defineProperty(exports, "flowSettingsDataSchema", { enumerable: true, get
|
|
|
10
10
|
Object.defineProperty(exports, "flowSettingsSchema", { enumerable: true, get: function () { return IFlowSettings_1.flowSettingsSchema; } });
|
|
11
11
|
var ISharedSettings_1 = require("./ISharedSettings");
|
|
12
12
|
Object.defineProperty(exports, "sharedSettingsSchema", { enumerable: true, get: function () { return ISharedSettings_1.sharedSettingsSchema; } });
|
|
13
|
+
var IGenerativeAISettings_1 = require("./IGenerativeAISettings");
|
|
14
|
+
Object.defineProperty(exports, "generativeAISettingsDataSchema", { enumerable: true, get: function () { return IGenerativeAISettings_1.generativeAISettingsDataSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "azureOpenAIModels", { enumerable: true, get: function () { return IGenerativeAISettings_1.azureOpenAIModels; } });
|
|
16
|
+
Object.defineProperty(exports, "openAIModels", { enumerable: true, get: function () { return IGenerativeAISettings_1.openAIModels; } });
|
|
17
|
+
Object.defineProperty(exports, "generativeAIProviders", { enumerable: true, get: function () { return IGenerativeAISettings_1.generativeAIProviders; } });
|
|
18
|
+
Object.defineProperty(exports, "generativeAIUseCases", { enumerable: true, get: function () { return IGenerativeAISettings_1.generativeAIUseCases; } });
|
|
13
19
|
//# sourceMappingURL=index.js.map
|