fastapi / main.py
steveagi's picture
connect to hf
f3bdb49
raw
history blame
291 Bytes
from fastapi import FastAPI, Body
import games.game_util as game_util
app = FastAPI()
@app.get("/")
async def root():
return {"message": "PGAI API"}
@app.post("/nlp")
def test(game: str=Body(), token: str=Body(), command: str=Body()):
return game_util.nlp(game, token, command)