from fastapi import APIRouter, Depends, HTTPException router = APIRouter() @router.get("/yolo-post") async def yolo_post_handler(sentence: str): """Echoes the given sentence backwards""" reversed_sentence = sentence[::-1] return { "message": "Sentence reversed successfully", "original_sentence": sentence, "reversed_sentence": reversed_sentence }