From f3977438cb31bef656a27bef4f16e7ede752c611 Mon Sep 17 00:00:00 2001 From: Sneed Group Date: Wed, 2 Oct 2024 15:22:47 -0500 Subject: [PATCH] wow i forgot to loop it. --- index.mjs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/index.mjs b/index.mjs index d11f4d4..e6bce43 100644 --- a/index.mjs +++ b/index.mjs @@ -244,16 +244,18 @@ async function learningLoop() { } async function talkLoop() { - let q = await ask(`To ${modelID}: `) - userAGIInput += `USER: ${q}`; - let a = await ollama.chat({ - model: `${modelID}`, - messages: [{ role: 'user', content: `${q}` }], - }) - userAGIInput += `AI: ${a}`; - console.log(`${a}`) - generateModelfile(contexts) - return [q, a] + while (true) { + let q = await ask(`To ${modelID}: `) + userAGIInput += `USER: ${q}`; + let a = await ollama.chat({ + model: `${modelID}`, + messages: [{ role: 'user', content: `${q}` }], + }) + userAGIInput += `AI: ${a}`; + console.log(`${a}`) + generateModelfile(contexts) + return [q, a] + } }