@tiledesk/tiledesk-server 2.14.6 → 2.14.8
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 +6 -0
- package/package.json +1 -1
- package/routes/kb.js +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
|
7
7
|
|
|
8
|
+
# 2.14.8
|
|
9
|
+
- Added extraction of namespace_id from request body in scrape status route
|
|
10
|
+
|
|
11
|
+
# 2.14.7
|
|
12
|
+
- Added embedding configuration to namespace import route
|
|
13
|
+
|
|
8
14
|
# 2.14.6
|
|
9
15
|
- Fix namespace checking in export route and improve error handling
|
|
10
16
|
|
package/package.json
CHANGED
package/routes/kb.js
CHANGED
|
@@ -247,6 +247,7 @@ router.post('/scrape/status', async (req, res) => {
|
|
|
247
247
|
let project_id = req.projectid;
|
|
248
248
|
// (EXAMPLE) body: { id, namespace }
|
|
249
249
|
let data = req.body;
|
|
250
|
+
let namespace_id = data.namespace;
|
|
250
251
|
winston.debug("/scrapeStatus req.body: ", req.body);
|
|
251
252
|
|
|
252
253
|
let returnObject = false;
|
|
@@ -1010,8 +1011,11 @@ router.post('/namespace/import/:id', upload.single('uploadFile'), async (req, re
|
|
|
1010
1011
|
// import operation the content's limit is respected
|
|
1011
1012
|
let ns = namespaces.find(n => n.id === namespace_id);
|
|
1012
1013
|
let engine = ns.engine || default_engine;
|
|
1014
|
+
let embedding = ns.embedding || default_embedding;
|
|
1015
|
+
embedding.api_key = process.env.EMBEDDING_API_KEY || process.env.GPTKEY;
|
|
1013
1016
|
let hybrid = ns.hybrid;
|
|
1014
1017
|
|
|
1018
|
+
|
|
1015
1019
|
if (process.env.NODE_ENV !== "test") {
|
|
1016
1020
|
await aiService.deleteNamespace({
|
|
1017
1021
|
namespace: namespace_id,
|
|
@@ -1044,7 +1048,7 @@ router.post('/namespace/import/:id', upload.single('uploadFile'), async (req, re
|
|
|
1044
1048
|
|
|
1045
1049
|
let resources = new_contents.map(({ name, status, __v, createdAt, updatedAt, id_project, ...keepAttrs }) => keepAttrs)
|
|
1046
1050
|
resources = resources.map(({ _id, scrape_options, ...rest }) => {
|
|
1047
|
-
return { id: _id, parameters_scrape_type_4: scrape_options, engine: engine, ...rest}
|
|
1051
|
+
return { id: _id, parameters_scrape_type_4: scrape_options, embedding: embedding, engine: engine, ...rest}
|
|
1048
1052
|
});
|
|
1049
1053
|
|
|
1050
1054
|
winston.verbose("resources to be sent to worker: ", resources);
|