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.

init backend, fix frontend module (#307)

Silen Naihin8bc3710e231a
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3e49497089..4f1f76292a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -278,10 +278,10 @@ jobs:
poetry run python send_to_googledrive.py || echo "Failed to upload to Google Drive"
echo "Adding skill_tree submodule to update website"
poetry run agbenchmark start --mock
- cd agbenchmark/challenges/frontend
+ cd frontend
git add .
git commit -m "Update website with new skill tree"
- cd ../../..
+ cd ..
exit 0
else
echo "Attempt $(($attempts + 1)) failed. Retrying..."
diff --git a/.gitmodules b/.gitmodules
index 268a238572..fa9049f6d0 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -33,3 +33,6 @@
[submodule "agbenchmark/challenges"]
path = agbenchmark/challenges
url = https://github.com/agbenchmark/agent-evals.git
+[submodule "frontend"]
+ path = frontend
+ url = https://github.com/agbenchmark/agbenchmark-frontend.git
diff --git a/agbenchmark/challenges b/agbenchmark/challenges
index 9c9a35e0de..2ebe45f9c7 160000
--- a/agbenchmark/challenges
+++ b/agbenchmark/challenges
@@ -1 +1 @@
-Subproject commit 9c9a35e0de60ca09d826ef7c7abd6c32edca4b99
+Subproject commit 2ebe45f9c79ecfee231401f0c153e76df3426333
diff --git a/agbenchmark/utils/dependencies/graphs.py b/agbenchmark/utils/dependencies/graphs.py
index af8662961d..48462e43df 100644
--- a/agbenchmark/utils/dependencies/graphs.py
+++ b/agbenchmark/utils/dependencies/graphs.py
@@ -277,9 +277,7 @@ def graph_interactive_network(
json_graph = json.dumps(graph_data)
# Optionally, save to a file
- with open(
- Path("agbenchmark/challenges/frontend/public/graph.json").resolve(), "w"
- ) as f:
+ with open(Path("frontend/public/graph.json").resolve(), "w") as f:
f.write(json_graph)
if html_graph_path:
diff --git a/backend/main.py b/backend/main.py
new file mode 100644
index 0000000000..f808822b78
--- /dev/null
+++ b/backend/main.py
@@ -0,0 +1,17 @@
+from fastapi import FastAPI
+from fastapi.middleware.cors import CORSMiddleware
+
+app = FastAPI()
+
+app.add_middleware(
+ CORSMiddleware,
+ allow_origins=["*"],
+ allow_credentials=True,
+ allow_methods=["*"],
+ allow_headers=["*"],
+)
+
+
+async def read_data() -> dict[str, str]:
+ return {"data": "Hello, World!"}
diff --git a/backend/requirements.txt b/backend/requirements.txt
new file mode 100644
index 0000000000..170703df65
--- /dev/null
+++ b/backend/requirements.txt
@@ -0,0 +1 @@
+fastapi
\ No newline at end of file
diff --git a/frontend b/frontend
new file mode 160000
index 0000000000..7e468e488a
--- /dev/null
+++ b/frontend
@@ -0,0 +1 @@
+Subproject commit 7e468e488aaf058c047b5accf304e5f24ba534b4
diff --git a/run.sh b/run.sh
new file mode 100644
index 0000000000..7e1e3f79e7
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,11 @@
+# poetry install
+
+# cd backend
+# pip install -r requirement.txt
+# uvicorn your_module:app --reload
+
+# cd frontend
+# npm install
+# npm run dev
+
+# localhost:3000
\ No newline at end of file