holy cow i am dumb

This commit is contained in:
The Ghost of FOSS' Past 2024-10-02 15:47:35 -05:00
parent f3977438cb
commit 979a393c2c

View file

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