@tiledesk/tiledesk-server 2.8.1 → 2.8.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/routes/kb.js +17 -4
package/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
7
7
|
|
8
|
+
# 2.8.3
|
9
|
+
- Added advanced_context support
|
10
|
+
- Updated default preview settings
|
11
|
+
|
12
|
+
# 2.8.2
|
13
|
+
- Updated default preview settings
|
14
|
+
- Added scrape_type in /scrape/single for fix indexing on retrain
|
15
|
+
|
8
16
|
# 2.8.1
|
9
17
|
- Added trashed=false in chatbot namespace query
|
10
18
|
- Return empty array if no chatbots are using the namespace
|
package/package.json
CHANGED
package/routes/kb.js
CHANGED
@@ -32,8 +32,8 @@ jobManager.connectAndStartPublisher(() => {
|
|
32
32
|
})
|
33
33
|
|
34
34
|
let default_preview_settings = {
|
35
|
-
model: 'gpt-
|
36
|
-
max_tokens:
|
35
|
+
model: 'gpt-4o',
|
36
|
+
max_tokens: 256,
|
37
37
|
temperature: 0.7,
|
38
38
|
top_k: 4,
|
39
39
|
//context: "You are an awesome AI Assistant."
|
@@ -54,6 +54,10 @@ router.post('/scrape/single', async (req, res) => {
|
|
54
54
|
let data = req.body;
|
55
55
|
winston.debug("/scrape/single data: ", data);
|
56
56
|
|
57
|
+
if (!data.scrape_type) {
|
58
|
+
data.scrape_type = 1;
|
59
|
+
}
|
60
|
+
|
57
61
|
let namespaces = await Namespace.find({ id_project: project_id }).catch((err) => {
|
58
62
|
winston.error("find namespaces error: ", err)
|
59
63
|
res.status(500).send({ success: false, error: err })
|
@@ -94,6 +98,11 @@ router.post('/scrape/single', async (req, res) => {
|
|
94
98
|
json.content = kb.content;
|
95
99
|
}
|
96
100
|
|
101
|
+
json.scrape_type = 1;
|
102
|
+
if (data.scrape_type) {
|
103
|
+
json.scrape_type = data.scrape_type;
|
104
|
+
}
|
105
|
+
|
97
106
|
startScrape(json).then((response) => {
|
98
107
|
winston.verbose("startScrape response: ", response);
|
99
108
|
res.status(200).send(response);
|
@@ -204,8 +213,12 @@ router.post('/qa', async (req, res) => {
|
|
204
213
|
}
|
205
214
|
|
206
215
|
// Check if "Advanced Mode" is active. In such case the default_context must be not appended
|
207
|
-
if (data.
|
208
|
-
|
216
|
+
if (!data.advanced_context) {
|
217
|
+
if (data.system_context) {
|
218
|
+
data.system_context = data.system_context + " \n" + default_context;
|
219
|
+
} else {
|
220
|
+
data.system_context = default_context;
|
221
|
+
}
|
209
222
|
}
|
210
223
|
|
211
224
|
openaiService.askNamespace(data).then((resp) => {
|