Getting tired of writing the backend and having data? No need for that anymore, with the LLM as Backend API a part of Hallucination As A Service (HallAS)
Install dependencies then run the main.py file
python main.py
Now you can start talking with your backend.
curl http://localhost:8000/recipy/vegan
{
"status": "success",
"message": "Recipe API request received.",
"data": {
"recipes": [
{
"id": "12345",
"name": "Vegan Chocolate Cake",
"description": "A delicious and moist chocolate cake.",
"ingredients": [
"Flour",
"Sugar",
"Cocoa Powder",
"Eggs",
"Butter",
"Milk",
"Chocolate Chips"
],
"instructions": [
"Preheat oven to 350°F (175°C).",
"Grease and flour a 9-inch round cake pan.",
"Mix wet and dry ingredients.",
"Pour batter into pan.",
"Bake for 30-35 minutes."
]
}
]
}
}
curl http://localhost:8000/joke/limit\=1
{
"status": "success",
"joke": "Why dont scientists trust atoms? Because they make up everything",
"content_type": "text/plain",
"host": "localhost:8000",
"user_agent": "curl/8.6.0",
"accept": "*/*"
}