Skip to content

Pluppen/llm-as-backend-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

LLM as Backend API

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)

Getting started

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": "*/*"
}

About

What if my backend is just an LLM that halucinates the data and responses?

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages