@tiledesk/tiledesk-tybot-connector 0.2.78 → 0.2.80
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,12 @@
|
|
|
5
5
|
available on:
|
|
6
6
|
▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
|
|
7
7
|
|
|
8
|
+
# v0.2.80
|
|
9
|
+
- Changed AskGPT Action to support namespaces
|
|
10
|
+
|
|
11
|
+
# v0.2.79 - dev
|
|
12
|
+
- Fixed. Get DepartmentId for default department in test-mode in IfOnelineAgentsV2 with correct attribute get with chatbot.getParameter()
|
|
13
|
+
|
|
8
14
|
# v0.2.78 - dev
|
|
9
15
|
- Fixed? Get DepartmentId for default department in test-mode in IfOnelineAgentsV2
|
|
10
16
|
|
package/package.json
CHANGED
|
@@ -57,11 +57,13 @@ class DirAskGPTV2 {
|
|
|
57
57
|
|
|
58
58
|
// default values
|
|
59
59
|
let answer = "No answers";
|
|
60
|
-
let
|
|
60
|
+
let namespace = this.context.projectId;
|
|
61
61
|
let model = "gpt-3.5-turbo";
|
|
62
62
|
let temperature;
|
|
63
63
|
let max_tokens;
|
|
64
64
|
let top_k;
|
|
65
|
+
|
|
66
|
+
let source = null;
|
|
65
67
|
|
|
66
68
|
if (!action.question || action.question === '') {
|
|
67
69
|
console.error("Error: DirAskGPT question attribute is mandatory. Executing condition false...");
|
|
@@ -73,6 +75,9 @@ class DirAskGPTV2 {
|
|
|
73
75
|
return;
|
|
74
76
|
}
|
|
75
77
|
|
|
78
|
+
if (action.namespace) {
|
|
79
|
+
namespace = action.namespace;
|
|
80
|
+
}
|
|
76
81
|
if (action.model) {
|
|
77
82
|
model = action.model;
|
|
78
83
|
}
|
|
@@ -143,7 +148,7 @@ class DirAskGPTV2 {
|
|
|
143
148
|
let json = {
|
|
144
149
|
question: filled_question,
|
|
145
150
|
gptkey: key,
|
|
146
|
-
namespace:
|
|
151
|
+
namespace: namespace,
|
|
147
152
|
model: model
|
|
148
153
|
};
|
|
149
154
|
if (top_k) {
|
|
@@ -59,22 +59,18 @@ class DirIfOnlineAgentsV2 {
|
|
|
59
59
|
let agents;
|
|
60
60
|
if (selectedOption === "currentDep") {
|
|
61
61
|
console.log("(DirIfOnlineAgents) currentDep");
|
|
62
|
-
let departmentId;
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
// let departmentId;
|
|
63
|
+
let departmentId = await this.chatbot.getParameter("department_id");
|
|
64
|
+
console.log("this.context.departmentId:", departmentId);
|
|
65
65
|
|
|
66
|
-
if (this.context.tdcache) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// if (this.context.departmentId) {
|
|
77
|
-
// departmentId = this.context.departmentId;
|
|
66
|
+
// if (this.context.tdcache) {
|
|
67
|
+
// let attributes =
|
|
68
|
+
// await TiledeskChatbot.allParametersStatic(
|
|
69
|
+
// this.context.tdcache, this.context.requestId
|
|
70
|
+
// );
|
|
71
|
+
// if (this.log) {console.log("Attributes:::", JSON.stringify(attributes))}
|
|
72
|
+
// departmentId = attributes["department_id"];
|
|
73
|
+
// if (this.log) {console.log("Attributes.departmentId:::", departmentId)}
|
|
78
74
|
// }
|
|
79
75
|
|
|
80
76
|
if (departmentId) {
|