Update brain.mjs
This commit is contained in:
parent
faf9d3e8fa
commit
acb49e00c2
1 changed files with 14 additions and 2 deletions
16
brain.mjs
16
brain.mjs
|
@ -11,6 +11,7 @@ export class ConsciousnessSimulator {
|
||||||
this.currentEmotion = "happy";
|
this.currentEmotion = "happy";
|
||||||
// Initialize other properties with "Unknown"
|
// Initialize other properties with "Unknown"
|
||||||
this.opinions = {
|
this.opinions = {
|
||||||
|
ai: "Unknown"
|
||||||
};
|
};
|
||||||
this.quantumStates = [];
|
this.quantumStates = [];
|
||||||
this.perception = {
|
this.perception = {
|
||||||
|
@ -87,6 +88,10 @@ export class ConsciousnessSimulator {
|
||||||
AI MEMORY CONTEXT ARRAY:
|
AI MEMORY CONTEXT ARRAY:
|
||||||
${this.memoryLog}` }]
|
${this.memoryLog}` }]
|
||||||
});
|
});
|
||||||
|
this.logMemory('THOUGHT', `${response.message.content}`);
|
||||||
|
this.logMemory('AI CONTEXT', `Current emotion: ${this.currentEmotion},
|
||||||
|
Opinions:
|
||||||
|
Quantum state: ${this.getQuantumState()}`);
|
||||||
return response.message.content;
|
return response.message.content;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error generating thought:", error);
|
console.error("Error generating thought:", error);
|
||||||
|
@ -105,6 +110,10 @@ export class ConsciousnessSimulator {
|
||||||
AI MEMORY CONTEXT ARRAY:
|
AI MEMORY CONTEXT ARRAY:
|
||||||
${this.memoryLog}` }]
|
${this.memoryLog}` }]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.logMemory('CHAT', `USER: ${prompt}
|
||||||
|
AI: ${response.message.content}`);
|
||||||
|
this.logMemory('AI CONTEXT', `Current emotion: ${this.currentEmotion}, Quantum state: ${this.getQuantumState()}`);
|
||||||
return `USER: ${prompt}
|
return `USER: ${prompt}
|
||||||
AI: ${response.message.content}`;
|
AI: ${response.message.content}`;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -154,7 +163,8 @@ export class ConsciousnessSimulator {
|
||||||
console.log(`**EMOTION DEBUG** - ${this.getLastWordLowerCase(emotion.message.content)}`)
|
console.log(`**EMOTION DEBUG** - ${this.getLastWordLowerCase(emotion.message.content)}`)
|
||||||
const emotion = emotion.message.content.toLowerCase()
|
const emotion = emotion.message.content.toLowerCase()
|
||||||
this.currentEmotion = emotion
|
this.currentEmotion = emotion
|
||||||
return
|
this.logMemory('AI CONTEXT', `Current emotion: ${this.currentEmotion}, Quantum state: ${this.getQuantumState()}`);
|
||||||
|
return emotion
|
||||||
} catch {
|
} catch {
|
||||||
return "happy"
|
return "happy"
|
||||||
}
|
}
|
||||||
|
@ -207,7 +217,9 @@ export class ConsciousnessSimulator {
|
||||||
const dreamingInterval = setInterval(async () => {
|
const dreamingInterval = setInterval(async () => {
|
||||||
if (!this.isUserActive) {
|
if (!this.isUserActive) {
|
||||||
console.log("I'm dreaming a bit... 😴");
|
console.log("I'm dreaming a bit... 😴");
|
||||||
this.logMemory('AI CONTEXT', `Current emotion: ${this.currentEmotion} ${this.emotions[randEmotions.indexOf(this.currentEmotion)]}, Quantum state: ${this.getQuantumState()}`);
|
let dream = generateThought("a dream")
|
||||||
|
this.logMemory('DREAM', `${dream}`);
|
||||||
|
this.logMemory('AI CONTEXT', `Current emotion: ${this.currentEmotion}, Quantum state: ${this.getQuantumState()}`);
|
||||||
}
|
}
|
||||||
}, 900000); // every 15 minutes
|
}, 900000); // every 15 minutes
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue