holy cow i am dumb
This commit is contained in:
parent
f3977438cb
commit
979a393c2c
1 changed files with 3 additions and 9 deletions
12
index.mjs
12
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]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue