@tiledesk/tiledesk-server 2.14.6 → 2.14.7
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 +3 -0
- package/package.json +1 -1
- package/routes/kb.js +4 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/routes/kb.js
CHANGED
|
@@ -1010,8 +1010,11 @@ router.post('/namespace/import/:id', upload.single('uploadFile'), async (req, re
|
|
|
1010
1010
|
// import operation the content's limit is respected
|
|
1011
1011
|
let ns = namespaces.find(n => n.id === namespace_id);
|
|
1012
1012
|
let engine = ns.engine || default_engine;
|
|
1013
|
+
let embedding = ns.embedding || default_embedding;
|
|
1014
|
+
embedding.api_key = process.env.EMBEDDING_API_KEY || process.env.GPTKEY;
|
|
1013
1015
|
let hybrid = ns.hybrid;
|
|
1014
1016
|
|
|
1017
|
+
|
|
1015
1018
|
if (process.env.NODE_ENV !== "test") {
|
|
1016
1019
|
await aiService.deleteNamespace({
|
|
1017
1020
|
namespace: namespace_id,
|
|
@@ -1044,7 +1047,7 @@ router.post('/namespace/import/:id', upload.single('uploadFile'), async (req, re
|
|
|
1044
1047
|
|
|
1045
1048
|
let resources = new_contents.map(({ name, status, __v, createdAt, updatedAt, id_project, ...keepAttrs }) => keepAttrs)
|
|
1046
1049
|
resources = resources.map(({ _id, scrape_options, ...rest }) => {
|
|
1047
|
-
return { id: _id, parameters_scrape_type_4: scrape_options, engine: engine, ...rest}
|
|
1050
|
+
return { id: _id, parameters_scrape_type_4: scrape_options, embedding: embedding, engine: engine, ...rest}
|
|
1048
1051
|
});
|
|
1049
1052
|
|
|
1050
1053
|
winston.verbose("resources to be sent to worker: ", resources);
|