diff --git a/brain.mjs b/brain.mjs index 869f632..25df138 100644 --- a/brain.mjs +++ b/brain.mjs @@ -38,6 +38,7 @@ export class ConsciousnessSimulator { } } this.logAIContextMemory() + await this.updateEmotion() } redefineSpecificOpinion(opinionKey, newValue) { @@ -47,6 +48,7 @@ export class ConsciousnessSimulator { console.log(`Opinion key "${opinionKey}" not found.`); } this.logAIContextMemory() + await this.updateEmotion() } resetOpinions() { @@ -98,6 +100,7 @@ export class ConsciousnessSimulator { }); this.logMemory('THOUGHT', `${response.message.content}`); this.logAIContextMemory() + await this.updateEmotion() return response.message.content; } catch (error) { console.error("Error generating thought:", error); @@ -120,6 +123,7 @@ export class ConsciousnessSimulator { this.logMemory('CHAT', `USER: ${prompt} AI: ${response.message.content}`); this.logAIContextMemory() + await this.updateEmotion() return `USER: ${prompt} AI: ${response.message.content}`; } catch (error) { @@ -170,6 +174,7 @@ export class ConsciousnessSimulator { const emotion = emotion.message.content.toLowerCase() this.currentEmotion = emotion this.logAIContextMemory() + await this.updateEmotion() return emotion } catch { return "happy"