From 558256c8eb28d2cf892c60b49408607d99033160 Mon Sep 17 00:00:00 2001 From: jcollier Date: Mon, 23 Oct 2023 14:55:15 +0100 Subject: [PATCH] fix embeddings --- scripts/generate-related/compute-embeddings.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/generate-related/compute-embeddings.js b/scripts/generate-related/compute-embeddings.js index 9bd5100c16..58c38bc608 100644 --- a/scripts/generate-related/compute-embeddings.js +++ b/scripts/generate-related/compute-embeddings.js @@ -54,6 +54,10 @@ const summarisePost = async (post) => { return paths; }); + if (!fs.existsSync("./scripts/generate-related/data")) { + fs.mkdirSync("./scripts/generate-related/data"); + } + for (const path of paths) { const file = path.split("/").pop(); const filename = `./scripts/generate-related/data/${file}`;