From 05f0267dbdb7d5ffea516f7344de52cb8b4a5b4d Mon Sep 17 00:00:00 2001 From: sneedgroup-holder Date: Sat, 8 Feb 2025 01:37:21 +0000 Subject: [PATCH] Update brain.mjs --- brain.mjs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/brain.mjs b/brain.mjs index ba8d03f..1277bf1 100644 --- a/brain.mjs +++ b/brain.mjs @@ -46,7 +46,7 @@ export class ConsciousnessSimulator { } } - // Method to generate thoughts using Ollama + // Method to generate opinions using Ollama async automaticRedefineOpinion(opinions, targetOpinionKey, newAbout) { try { @@ -143,17 +143,16 @@ export class ConsciousnessSimulator { const emotion = await ollama.chat({ model: 'llama3.2', messages: [{ role: 'assistant', content: ` - PROMPT: pick an emotion from the following array according to the memory context. - *NOTE: ONLY display the emotion name AS STATED in the array, NO QUOTES, NO EXTRA wording emoji or symbols. If there is nothing in AI MEMORY CONTEXT, default to happy.* - - Emotion array: ${this.randEmotions} + PROMPT: pick an emotion according to the memory context. + *NOTE: ONLY display the emotion name, NO QUOTES, feel free to add an emoji - but besides that, no symbols. If there is nothing in AI MEMORY CONTEXT, default to happy.* AI MEMORY CONTEXT ARRAY: ${this.memoryLog}` }] }); console.log(`**EMOTION DEBUG** - ${this.getLastWordLowerCase(emotion.message.content)}`) - this.randEmotions.indexOf(this.emotion) //check if defined - return this.getLastWordLowerCase(emotion.message.content) + const emotion = emotion.message.content.toLowerCase() + this.currentEmotion = emotion + return } catch { return "happy" }