Update brainapi.mjs

This commit is contained in:
Arma-Damna-Dillo 2025-02-08 04:22:56 +00:00
parent 777befac5a
commit 14d3bc31e6

View file

@ -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."
);