fpillm / app.py
Zeptosec's picture
Renamed to app.py
52b2b4f
raw
history blame
No virus
349 Bytes
from typing import Union
from fastapi import FastAPI
from pydantic import BaseModel
from nyx2 import *
class Item(BaseModel):
prompt: str
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.post("/chat")
async def chat(item: Item):
res = GetResponse(item.prompt)
return {
"message": res
}