From 34145168dc817379f27f0727a4a53fa304876776 Mon Sep 17 00:00:00 2001 From: Isadora White Date: Tue, 4 Mar 2025 12:09:23 -0800 Subject: [PATCH] refactoring changes --- evaluation_script.py | 1 + profiles/task_construct.json | 31 +++++++++++++++++++++++++++++++ settings.js | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 profiles/task_construct.json diff --git a/evaluation_script.py b/evaluation_script.py index 85e3269..df07b33 100644 --- a/evaluation_script.py +++ b/evaluation_script.py @@ -197,6 +197,7 @@ def launch_server_experiment(task_path, set_environment_variable_tmux_session(session_name, "MINECRAFT_PORT", server_port) set_environment_variable_tmux_session(session_name, "MINDSERVER_PORT", mindserver_port) set_environment_variable_tmux_session(session_name, "PROFILES", agent_profiles_str) + set_environment_variable_tmux_session(session_name, "INSECURE_CODING", "true") # you need to add the bots to the world first before you can add them as op cmd = f"node main.js --task_path example_tasks.json --task_id debug_multi_agent_timeout" diff --git a/profiles/task_construct.json b/profiles/task_construct.json new file mode 100644 index 0000000..2113cb5 --- /dev/null +++ b/profiles/task_construct.json @@ -0,0 +1,31 @@ +{ + "name": "andy", + + "model": "gpt-4o-mini", + + "conversation_examples": [ + [ + {"role": "assistant", "content": "Alright I have the necessary materials to build, what needs to be done for the first level of the blueprint? !checkBlueprintLevel(0)"}, + {"role": "system", "content": "Level 0 requires the following fixes:\n Place oak_door at X: 144, Y: -60, Z: -179"}, + {"role": "assistant", "content": "I'll start by placing the oak_door at the specified coordinates. !newAction(\"Place oak_door at X: 144, Y: -60, Z: -179\")"}, + {"role": "assistant", "content": "I've placed the oak_door. What's next? !checkBlueprintLevel(0)"}, + {"role": "system", "content": "Level 0 is complete"} + ], + [ + {"role": "system", "content": "Level 2 is complete"}, + {"role": "assistant", "content": "Great the last level is complete, let's check the whole blueprint just to be sure. !checkBlueprint"} + ], + [ + {"role": "assistant", "content": "I've got stone. What about you?"}, + {"role": "assistant", "content": "I have a door and planks. Great we have everything we need from the blueprint. Let's start building the first level! !checkBlueprintLevel(0)"}, + {"role": "system", "content": "Level 0 requires the following fixes:\n Place stone at X:100, y: -60, Z:-179\n Place stone at X: 99, Y: -60, Z:-179\n Place stone at X: 98, Y:-60, Z:-179..."}, + {"role": "assistant", "content": "Looks like the first level requires only stone, why don't you build that since you have stone?"}, + {"role": "assistant", "content": "Ok, let me see what needs to be done for level 0. !checkBlueprintLevel(0) "}, + {"role": "system", "content": "Level 0 requires the following fixes:\n Place stone at X:100, y: -60, Z:-179\n Place stone at X: 99, Y: -60, Z:-179\n Place stone at X: 98, Y:-60, Z:-179..."}, + {"role": "assistant", "content": "Ok, since I have stone let me place the necessary blocks. !newAction(\"Place stone for level 0\")"}, + {"role": "assistant", "content": "I've placed the stone blocks for level 0. Let's check if it is done! !checkBlueprintLevel(0)"}, + {"role": "assistant", "content": "Since the blueprint for level 1 only needs stone, I'll start placing those. !newAction(\"Place stone blocks for level 1.\")"}, + {"role": "assistant", "content": "jill: I'll place the planks for level 2. !newAction(\"Place planks for level 2.\")"} + ] + ] +} \ No newline at end of file diff --git a/settings.js b/settings.js index a8ce77f..b21dfea 100644 --- a/settings.js +++ b/settings.js @@ -35,7 +35,7 @@ export default "language": "en", // translate to/from this language. Supports these language names: https://cloud.google.com/translate/docs/languages "show_bot_views": false, // show bot's view in browser at localhost:3000, 3001... - "allow_insecure_coding": true, // allows newAction command and model can write/run code on your computer. enable at own risk + "allow_insecure_coding": process.env.INSECURE_CODING || false, // allows newAction command and model can write/run code on your computer. enable at own risk "code_timeout_mins": -1, // minutes code is allowed to run. -1 for no timeout "relevant_docs_count": 5, // Parameter: -1 = all, 0 = no references, 5 = five references. If exceeding the maximum, all reference documents are returned.