Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fixing relative imports

Silen Naihin84f170c9e0b3
diff --git a/agbenchmark/start_benchmark.py b/agbenchmark/start_benchmark.py
index b7a116ebca..3a6a2b860e 100644
--- a/agbenchmark/start_benchmark.py
+++ b/agbenchmark/start_benchmark.py
@@ -17,8 +17,10 @@ def start(category, noreg):
"""Start the benchmark tests. If a category flag is provided, run the categories with that mark."""
config_file = "agbenchmark/config.json"
+ config_dir = os.path.abspath(config_file)
+
# Check if configuration file exists and is not empty
- if not os.path.exists(config_file) or os.stat(config_file).st_size == 0:
+ if not os.path.exists(config_dir) or os.stat(config_dir).st_size == 0:
config = {}
config["hostname"] = click.prompt(
@@ -26,16 +28,21 @@ def start(category, noreg):
)
config["port"] = click.prompt("Please enter a new port", default=8080)
config["workspace"] = click.prompt(
- "Please enter a new workspace path", default="/path/to/workspace"
+ "Please enter a new workspace path", default="agbenchmark/mocks/workspace"
)
- with open(config_file, "w") as f:
+ with open(config_dir, "w") as f:
json.dump(config, f)
else:
# If the configuration file exists and is not empty, load it
- with open(config_file, "r") as f:
+ with open(config_dir, "r") as f:
config = json.load(f)
+ # create workspace directory if it doesn't exist
+ workspace_path = config_dir = os.path.abspath(config["workspace"])
+ if not os.path.exists(workspace_path):
+ os.makedirs(workspace_path, exist_ok=True)
+
print("Current configuration:")
for key, value in config.items():
print(f"{key}: {value}")
diff --git a/agent/mini-agi b/agent/mini-agi
new file mode 160000
index 0000000000..d2add8f18c
--- /dev/null
+++ b/agent/mini-agi
@@ -0,0 +1 @@
+Subproject commit d2add8f18caf96934a2d193583720cfc9b89451b