@tiledesk/tiledesk-tybot-connector 0.2.79 → 0.2.81
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.81
|
|
9
|
+
- Changed from 'context' to 'system_context' in AskGPTv2
|
|
10
|
+
|
|
11
|
+
# v0.2.80
|
|
12
|
+
- Changed AskGPT Action to support namespaces
|
|
13
|
+
|
|
8
14
|
# v0.2.79 - dev
|
|
9
15
|
- Fixed. Get DepartmentId for default department in test-mode in IfOnelineAgentsV2 with correct attribute get with chatbot.getParameter()
|
|
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) {
|
|
@@ -156,7 +161,7 @@ class DirAskGPTV2 {
|
|
|
156
161
|
json.max_tokens = max_tokens;
|
|
157
162
|
}
|
|
158
163
|
if (filled_context) {
|
|
159
|
-
json.
|
|
164
|
+
json.system_context = filled_context;
|
|
160
165
|
}
|
|
161
166
|
if (this.log) { console.log("DirAskGPT json:", json); }
|
|
162
167
|
|