Spaces:
Sleeping
Sleeping
Commit ·
227ac4f
1
Parent(s): aab83b4
..
Browse files- pyproject.toml +6 -7
- requirements.txt +2 -1
- server/app.py +18 -0
pyproject.toml
CHANGED
|
@@ -1,16 +1,15 @@
|
|
| 1 |
[project]
|
| 2 |
name = "openenv-workflow-agent"
|
| 3 |
version = "0.1.0"
|
| 4 |
-
description = "
|
| 5 |
-
authors = [{name = "Sachin Mishra"}]
|
| 6 |
dependencies = [
|
| 7 |
-
"pydantic",
|
| 8 |
"fastapi",
|
| 9 |
"uvicorn",
|
|
|
|
|
|
|
| 10 |
"openai",
|
| 11 |
-
"
|
| 12 |
]
|
| 13 |
|
| 14 |
-
[
|
| 15 |
-
|
| 16 |
-
build-backend = "setuptools.build_meta"
|
|
|
|
| 1 |
[project]
|
| 2 |
name = "openenv-workflow-agent"
|
| 3 |
version = "0.1.0"
|
| 4 |
+
description = "Workflow RL OpenEnv environment"
|
|
|
|
| 5 |
dependencies = [
|
|
|
|
| 6 |
"fastapi",
|
| 7 |
"uvicorn",
|
| 8 |
+
"pydantic",
|
| 9 |
+
"pyyaml",
|
| 10 |
"openai",
|
| 11 |
+
"openenv>=0.2.0"
|
| 12 |
]
|
| 13 |
|
| 14 |
+
[project.scripts]
|
| 15 |
+
server = "server.app:app"
|
|
|
requirements.txt
CHANGED
|
@@ -5,4 +5,5 @@ pytest
|
|
| 5 |
pyyaml
|
| 6 |
fastapi
|
| 7 |
uvicorn
|
| 8 |
-
openai
|
|
|
|
|
|
| 5 |
pyyaml
|
| 6 |
fastapi
|
| 7 |
uvicorn
|
| 8 |
+
openai
|
| 9 |
+
openenv>=0.2.0
|
server/app.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
from app.env import WorkflowEnv
|
| 3 |
+
from tasks.easy import create_easy_task
|
| 4 |
+
|
| 5 |
+
app = FastAPI()
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
@app.post("/reset")
|
| 9 |
+
def reset():
|
| 10 |
+
state, _ = create_easy_task()
|
| 11 |
+
env = WorkflowEnv(state)
|
| 12 |
+
env.reset()
|
| 13 |
+
return {"status": "ok"}
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
@app.get("/")
|
| 17 |
+
def home():
|
| 18 |
+
return {"message": "Workflow Env is running"}
|