aboutsummaryrefslogtreecommitdiff
path: root/autogpt/core/runner/cli_web_app/server/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'autogpt/core/runner/cli_web_app/server/api.py')
-rw-r--r--autogpt/core/runner/cli_web_app/server/api.py48
1 files changed, 0 insertions, 48 deletions
diff --git a/autogpt/core/runner/cli_web_app/server/api.py b/autogpt/core/runner/cli_web_app/server/api.py
deleted file mode 100644
index 01c50b06d..000000000
--- a/autogpt/core/runner/cli_web_app/server/api.py
+++ /dev/null
@@ -1,48 +0,0 @@
-import uuid
-
-from fastapi import APIRouter, FastAPI, Request
-
-from autogpt.core.runner.cli_web_app.server.schema import InteractRequestBody
-
-router = APIRouter()
-
-
-@router.post("/agents")
-async def create_agent(request: Request):
- """Create a new agent."""
- agent_id = uuid.uuid4().hex
- return {"agent_id": agent_id}
-
-
-@router.post("/agents/{agent_id}")
-async def interact(request: Request, agent_id: str, body: InteractRequestBody):
- """Interact with an agent."""
-
- # check headers
-
- # check if agent_id exists
-
- # get agent object from somewhere, e.g. a database/disk/global dict
-
- # continue agent interaction with user input
-
- return {
- "thoughts": {
- "thoughts": {
- "text": "text",
- "reasoning": "reasoning",
- "plan": "plan",
- "criticism": "criticism",
- "speak": "speak",
- },
- "commands": {
- "name": "name",
- "args": {"arg_1": "value_1", "arg_2": "value_2"},
- },
- },
- "messages": ["message1", agent_id],
- }
-
-
-app = FastAPI()
-app.include_router(router, prefix="/api/v1")