cletus/bot/states/ActOnMemory.js
roberts 2a9f9159bd
All checks were successful
Deploy Cletus Bot / deploy (push) Successful in 26s
Massive Overhaul. Added state machine.
2025-05-10 12:24:59 -05:00

14 lines
448 B
JavaScript

// states/ActOnMemory.js
const { chatWithAI } = require('../lib/ai-helper');
const { getBot } = require('../core/context');
const config = require('../config.json');
module.exports = async function ActOnMemory() {
console.log('[STATE] ActOnMemory');
const prompt = 'You just died. Based on what you remember, what should you do next?';
const response = await chatWithAI(prompt, config.ai);
const bot = getBot();
bot.chat(response);
};