uncensored / fastAPI.py
dmar1313's picture
Create fastAPI.py
58abd1e
raw
history blame contribute delete
248 Bytes
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Prompt(BaseModel):
text: str
@app.post("/chat")
async def chat(prompt: Prompt):
response = generate_response(prompt.text)
return {"response": response}