diff --git a/index.mjs b/index.mjs index e6bce43..bd3a36c 100644 --- a/index.mjs +++ b/index.mjs @@ -217,9 +217,7 @@ async function learner() { const modelfile = await generateModelfile(contexts); console.log(modelfile); await writeFile(modelfilePath, modelfile) - .then(() => { - console.log('File written successfully!'); - }) + .then(() => {}) .catch(err => { console.error('Error writing file:', err); }); @@ -234,12 +232,9 @@ async function learner() { const delay = ms => new Promise(res => setTimeout(res, ms)); async function learningLoop() { - let i = 0 while (true) { await main() await delay(60000*20) //20 minutes in ms. - i = i+1; - return i; } } @@ -251,10 +246,9 @@ async function talkLoop() { model: `${modelID}`, messages: [{ role: 'user', content: `${q}` }], }) - userAGIInput += `AI: ${a}`; - console.log(`${a}`) + userAGIInput += `AI: ${a.message.content}`; + console.log(`${a.message.content}`) generateModelfile(contexts) - return [q, a] } }