diff --git a/brainapi.mjs b/brainapi.mjs index 6664639..bd1bba7 100644 --- a/brainapi.mjs +++ b/brainapi.mjs @@ -68,7 +68,7 @@ export class ConsciousnessSimulator { Show only the opinion, according to AI MEMORY CONTEXT. AI MEMORY CONTEXT ARRAY: - ${this.memoryLog}` }] + ${JSON.stringify(this.memoryLog)}` }] }); redefineSpecificOpinion(targetOpinion, response.message.content) return response.message.content @@ -97,7 +97,7 @@ export class ConsciousnessSimulator { PROMPT: ${prompt} AI MEMORY CONTEXT ARRAY: - ${this.memoryLog}` }] + ${JSON.stringify(this.memoryLog)}` }] }); this.logMemory('THOUGHT', `${response.message.content}`); this.logAIContextMemory() @@ -118,7 +118,7 @@ export class ConsciousnessSimulator { PROMPT: ${prompt} AI MEMORY CONTEXT ARRAY: - ${this.memoryLog}` }] + ${JSON.stringify(this.memoryLog)}` }] }); this.logMemory('CHAT', `USER: ${prompt} @@ -169,7 +169,7 @@ export class ConsciousnessSimulator { *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}` }] + ${JSON.stringify(this.memoryLog)}` }] }); emotion = emotion.message.content.toLowerCase() this.currentEmotion = emotion @@ -201,7 +201,7 @@ export class ConsciousnessSimulator { logAIContextMemory() { this.logMemory('AI CONTEXT', `Current emotion: ${this.currentEmotion}, - Current Opinions: ${this.opinions}, + Current Opinions: ${JSON.stringify(this.opinions)}, Quantum state: ${this.getQuantumState()}`); } @@ -266,8 +266,8 @@ export class ConsciousnessSimulator { // Method to simulate consciousness async simulateConsciousness(prompt) { - console.log(`Current emotion: ${this.currentEmotion} ${this.emotions[this.randEmotions.indexOf(this.currentEmotion)]}`); - console.log(`Current opinions: ${this.opinions}`); + console.log(`Current emotion: ${this.currentEmotion}`); + console.log(`Current opinions: ${JSON.stringify(this.opinions)}`); const thought = await this.generateThought( prompt || "Generate a thought." );