Edited connection and creation in bot.js
All checks were successful
Deploy Cletus Bot / deploy (push) Successful in 14s
All checks were successful
Deploy Cletus Bot / deploy (push) Successful in 14s
This commit is contained in:
parent
af2397fc60
commit
d2f34b3607
3 changed files with 13 additions and 7 deletions
|
|
@ -14,13 +14,15 @@ const context = require('./core/context');
|
|||
|
||||
// === Bot Config ===
|
||||
const bot = mineflayer.createBot({
|
||||
host: config.bot.host,
|
||||
port: config.bot.port,
|
||||
host: config.server.host,
|
||||
port: config.server.port,
|
||||
username: config.bot.name,
|
||||
auth: config.bot.auth
|
||||
auth: config.server.auth,
|
||||
version: config.server.version
|
||||
});
|
||||
|
||||
bot.loadPlugin(pathfinder);
|
||||
|
||||
context.setBot(bot);
|
||||
context.setDB(db);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
{
|
||||
"bot": {
|
||||
"name": "Cletus",
|
||||
"persona": "a curious minecraft explorer who learns from the world around them"
|
||||
},
|
||||
"server": {
|
||||
"host": "192.168.1.90",
|
||||
"port": 25565,
|
||||
"auth": "offline"
|
||||
"port": "25565",
|
||||
"auth": "offline",
|
||||
"version": "1.20.4"
|
||||
|
||||
},
|
||||
"ai": {
|
||||
"model": "gemma3",
|
||||
"ollamaUrl": "http://192.168.1.3:11434/api/generate",
|
||||
"persona": "a curious minecraft explorer who learns from the world around them",
|
||||
"responseLength": 30
|
||||
},
|
||||
"safeZone": {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const config = require('../config.json');
|
|||
async function chatWithAI(message, overrides = {}) {
|
||||
|
||||
const settings = { ...config.ai, ...overrides };
|
||||
const prompt = `You are ${settings.botName}, ${settings.persona}. Keep your responses around ${settings.responseLength} words. Respond to: ${message}`;
|
||||
const prompt = `You are ${config.bot.name}, ${config.bot.persona}. Keep your responses around ${config.ai.responseLength} words. Respond to: ${message}`;
|
||||
|
||||
try {
|
||||
const response = await axios.post(settings.ollamaUrl, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue