From bf3e13c21264ca9a0552e3e9dcec70f5a2f9371c Mon Sep 17 00:00:00 2001 From: Sneed Group Date: Wed, 2 Oct 2024 15:19:27 -0500 Subject: [PATCH] dumb mistakes --- index.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.mjs b/index.mjs index 377be6d..d11f4d4 100644 --- a/index.mjs +++ b/index.mjs @@ -1,7 +1,7 @@ import { RecursiveUrlLoader } from "@langchain/community/document_loaders/web/recursive_url"; import { compile } from "html-to-text"; -import { writeFile, fs } from 'fs/promises'; +import { writeFile, readFile } from 'fs/promises'; import { exec } from 'child_process'; import { promisify } from 'util'; @@ -186,7 +186,7 @@ let userAGIInput = ` async function generateModelfile(c) { let ags_modelfile = "" try { - const ags_modelfile = await fs.readFile(`${systemSavePath}`, { encoding: 'utf8' }); + const ags_modelfile = await readFile(`${systemSavePath}`, { encoding: 'utf8' }); } catch (err) { ags_modelfile = ags_template_part1; } @@ -258,4 +258,4 @@ async function talkLoop() { -let [learningRound, talkLoopResults] = Promise.allSettled([learningLoop(), talkLoop()]) +Promise.allSettled([learningLoop(), talkLoop()])