settings.json to json object

This commit is contained in:
MaxRobinsonTheGreat 2024-05-29 21:49:45 -05:00
parent dd89b25277
commit 449e3da221
7 changed files with 21 additions and 22 deletions

View file

@ -1,5 +1,5 @@
import { AgentProcess } from './src/process/agent-process.js';
import settings from './src/settings.js';
import settings from './settings.js';
let profiles = settings.profiles;
let load_memory = settings.load_memory;

17
settings.js Normal file
View file

@ -0,0 +1,17 @@
export default
{
"minecraft_version": "1.20.4", // supports up to 1.20.4
"host": "127.0.0.1", // or "localhost", "your.ip.address.here"
"port": 55916,
"auth": "offline", // or "microsoft"
"profiles": [
"./andy.json"
// add more profiles here, check ./profiles/ for more
// more than 1 profile will require you to /msg each bot indivually
],
"load_memory": false, // load memory from previous session
"init_message": "Say hello world and your name", // sends to all on spawn
"allow_insecure_coding": false, // disable at own risk
"code_timeout_mins": 10, // -1 for no timeout
}

View file

@ -1,16 +0,0 @@
{
"minecraft_version": "1.20.4",
"host": "127.0.0.1",
"port": 55916,
"auth": "offline",
"allow_insecure_coding": true,
"code_timeout_mins": 10,
"profiles": [
"./profiles/gpt.json",
"./profiles/llama.json"
],
"load_memory": false,
"init_message": "Say hello world and your name"
}

View file

@ -6,7 +6,7 @@ import { initBot } from '../utils/mcdata.js';
import { containsCommand, commandExists, executeCommand, truncCommandMessage } from './commands/index.js';
import { NPCContoller } from './npc/controller.js';
import { MemoryBank } from './memory_bank.js';
import settings from '../settings.js';
import settings from '../../settings.js';
export class Agent {

View file

@ -1,5 +1,5 @@
import * as skills from '../library/skills.js';
import settings from '../../settings.js';
import settings from '../../../settings.js';
function wrapExecution(func, timeout=-1, resume_name=null) {
return async function (agent, ...args) {

View file

@ -1,2 +0,0 @@
import { readFileSync } from 'fs';
export default JSON.parse(readFileSync('./settings.json', 'utf8'));

View file

@ -1,5 +1,5 @@
import minecraftData from 'minecraft-data';
import settings from '../settings.js';
import settings from '../../settings.js';
import { createBot } from 'mineflayer';
import { pathfinder } from 'mineflayer-pathfinder';
import { plugin as pvp } from 'mineflayer-pvp';