@tiledesk/tiledesk-tybot-connector 0.2.91-rc1 → 0.2.91-rc3
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
CHANGED
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
available on:
|
|
6
6
|
▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
|
|
7
7
|
|
|
8
|
+
# v0.2.91
|
|
9
|
+
- Added voice flow attributes: dnis, callId, ani
|
|
10
|
+
|
|
11
|
+
# v0.2.89
|
|
12
|
+
- Added convertToNumber to operations in setAttribute
|
|
13
|
+
- Added setAttributeV2 test
|
|
14
|
+
|
|
8
15
|
# v0.2.88
|
|
9
16
|
- Added DirContactUpdate (aka LeadUpdate). No test case added for LeadUpdate. Only testable with a validation test.
|
|
10
17
|
- Fixed: Attribute parameters userFullname & userEmail now are able to "bypass" the request.lead not correctly updating on the same conversation. If updated in the flow (through LeadUpdate action), they will maintain their own value through the current conversation flow.
|
|
@@ -438,9 +438,6 @@ class TiledeskChatbotUtil {
|
|
|
438
438
|
} else {
|
|
439
439
|
fullName = "user:" + fullName;
|
|
440
440
|
}
|
|
441
|
-
else {
|
|
442
|
-
fullName = "user:" + fullName;
|
|
443
|
-
}
|
|
444
441
|
return "<" + fullName + ">";
|
|
445
442
|
}
|
|
446
443
|
}
|
|
@@ -717,7 +714,7 @@ class TiledeskChatbotUtil {
|
|
|
717
714
|
const value_type = typeof value;
|
|
718
715
|
//if (projectId === "641864da99c1fb00131ba495") {console.log("641864da99c1fb00131ba495 > importing payload parameter:", key, "value:", value, "type:", value_type);}
|
|
719
716
|
//await chatbot.addParameter(key, String(value));
|
|
720
|
-
console.log("Adding from message.attributes:", key, "->", value);
|
|
717
|
+
// console.log("Adding from message.attributes:", key, "->", value);
|
|
721
718
|
await chatbot.addParameter(key, value);
|
|
722
719
|
}
|
|
723
720
|
}
|
|
@@ -725,6 +722,17 @@ class TiledeskChatbotUtil {
|
|
|
725
722
|
console.error("Error importing message payload in request variables:", err);
|
|
726
723
|
}
|
|
727
724
|
}
|
|
725
|
+
|
|
726
|
+
// voice-vxml attributes
|
|
727
|
+
if (message.attributes.dnis) {
|
|
728
|
+
await chatbot.addParameter("dnis", message.attributes.dnis);
|
|
729
|
+
}
|
|
730
|
+
if (message.attributes.callId) {
|
|
731
|
+
await chatbot.addParameter("callId", message.attributes.callId);
|
|
732
|
+
}
|
|
733
|
+
if (message.attributes.ani) {
|
|
734
|
+
await chatbot.addParameter("ani", message.attributes.ani);
|
|
735
|
+
}
|
|
728
736
|
}
|
|
729
737
|
|
|
730
738
|
const _bot = chatbot.bot; // aka FaqKB
|
package/package.json
CHANGED
|
@@ -163,27 +163,22 @@ class DirGptTask {
|
|
|
163
163
|
temperature: action.temperature,
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
let message = { role: "", content: "" };
|
|
167
|
-
|
|
168
166
|
if (action.context) {
|
|
169
|
-
let message = {
|
|
170
|
-
role: "system",
|
|
171
|
-
content: filled_context
|
|
172
|
-
}
|
|
167
|
+
let message = { role: "system", content: filled_context }
|
|
173
168
|
json.messages.push(message);
|
|
174
169
|
}
|
|
175
170
|
|
|
176
171
|
if (transcript) {
|
|
177
172
|
transcript.forEach(msg => {
|
|
178
173
|
if (!msg.content.startsWith('/')) {
|
|
179
|
-
let message = {
|
|
180
|
-
role: msg.role,
|
|
181
|
-
content: msg.content
|
|
182
|
-
}
|
|
174
|
+
let message = { role: msg.role, content: msg.content }
|
|
183
175
|
json.messages.push(message)
|
|
184
176
|
}
|
|
185
177
|
})
|
|
186
|
-
}
|
|
178
|
+
} else {
|
|
179
|
+
let message = { role: "user", content: filled_question };
|
|
180
|
+
json.messages.push(message);
|
|
181
|
+
}
|
|
187
182
|
|
|
188
183
|
if (this.log) { console.log("DirGptTask json: ", json) }
|
|
189
184
|
|