Update brain.mjs
This commit is contained in:
parent
98290c1ee5
commit
05f0267dbd
1 changed files with 6 additions and 7 deletions
13
brain.mjs
13
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"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue