File size: 230 Bytes
dc3cf48
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def home():
    return {"message": "Backend is working"}

@app.get("/chat")
def chat(prompt: str):
    return {
        "reply": f"You said: {prompt}"
    }