mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-06-06 17:25:54 +02:00
commit
61586ccfa8
6 changed files with 59 additions and 4 deletions
14
profiles/defaults/creative.json
Normal file
14
profiles/defaults/creative.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"modes": {
|
||||
"self_preservation": false,
|
||||
"unstuck": false,
|
||||
"cowardice": false,
|
||||
"self_defense": false,
|
||||
"hunting": false,
|
||||
"item_collecting": false,
|
||||
"torch_placing": false,
|
||||
"elbow_room": true,
|
||||
"idle_staring": true,
|
||||
"cheat": false
|
||||
}
|
||||
}
|
14
profiles/defaults/god_mode.json
Normal file
14
profiles/defaults/god_mode.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"modes": {
|
||||
"self_preservation": false,
|
||||
"unstuck": false,
|
||||
"cowardice": false,
|
||||
"self_defense": false,
|
||||
"hunting": false,
|
||||
"item_collecting": false,
|
||||
"torch_placing": false,
|
||||
"elbow_room": false,
|
||||
"idle_staring": true,
|
||||
"cheat": true
|
||||
}
|
||||
}
|
14
profiles/defaults/survival.json
Normal file
14
profiles/defaults/survival.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"modes": {
|
||||
"self_preservation": true,
|
||||
"unstuck": true,
|
||||
"cowardice": false,
|
||||
"self_defense": true,
|
||||
"hunting": true,
|
||||
"item_collecting": true,
|
||||
"torch_placing": true,
|
||||
"elbow_room": true,
|
||||
"idle_staring": true,
|
||||
"cheat": false
|
||||
}
|
||||
}
|
|
@ -10,6 +10,8 @@ export default
|
|||
"mindserver_host": "localhost",
|
||||
"mindserver_port": 8080,
|
||||
|
||||
// the base profile is shared by all bots for default prompts/examples/modes
|
||||
"base_profile": "./profiles/defaults/survival.json", // also see creative.json, god_mode.json
|
||||
"profiles": [
|
||||
"./andy.json",
|
||||
// "./profiles/gpt.json",
|
||||
|
@ -23,6 +25,7 @@ export default
|
|||
// "./profiles/deepseek.json",
|
||||
|
||||
// using more than 1 profile requires you to /msg each bot indivually
|
||||
// individual profiles override values from the base profile
|
||||
],
|
||||
"load_memory": false, // load memory from previous session
|
||||
"init_message": "Respond with hello world and your name", // sends to all on spawn
|
||||
|
|
|
@ -24,12 +24,22 @@ export class Prompter {
|
|||
constructor(agent, fp) {
|
||||
this.agent = agent;
|
||||
this.profile = JSON.parse(readFileSync(fp, 'utf8'));
|
||||
this.default_profile = JSON.parse(readFileSync('./profiles/_default.json', 'utf8'));
|
||||
let default_profile = JSON.parse(readFileSync('./profiles/defaults/_default.json', 'utf8'));
|
||||
let base_fp = settings.base_profile;
|
||||
let base_profile = JSON.parse(readFileSync(base_fp, 'utf8'));
|
||||
|
||||
for (let key in this.default_profile) {
|
||||
if (this.profile[key] === undefined)
|
||||
this.profile[key] = this.default_profile[key];
|
||||
// first use defaults to fill in missing values in the base profile
|
||||
for (let key in default_profile) {
|
||||
if (base_profile[key] === undefined)
|
||||
base_profile[key] = default_profile[key];
|
||||
}
|
||||
// then use base profile to fill in missing values in the individual profile
|
||||
for (let key in base_profile) {
|
||||
if (this.profile[key] === undefined)
|
||||
this.profile[key] = base_profile[key];
|
||||
}
|
||||
// base overrides default, individual overrides base
|
||||
|
||||
|
||||
this.convo_examples = null;
|
||||
this.coding_examples = null;
|
||||
|
|
Loading…
Add table
Reference in a new issue