This is a simple TODO app powered by GPT-3.
- Create the initial database
python create_db.py
- Start the server
python main.py
- Start sending requests to the server
Request:
curl -X POST -H "Content-Type: application/json" -d '{"command": "I need to buy bread"}' http://localhost:8000/todo | jq
Response:
{
"message": "The task has been added to your TODO list."
}
Request:
curl -X POST -H "Content-Type: application/json" -d '{"command": "Get all todos"}' http://localhost:8000/todo | jq
Response:
[
{
"id": 4,
"name": "Buy cheese",
"done": 0
},
...
{
"id": 13,
"name": "buy bread",
"done": 0
}
]
Request:
curl -X POST -H "Content-Type: application/json" -d '{"command": "Mark buy bread item as done"}' http://localhost:8000/todo | jq
Response:
{
"message": "The item 'buy bread' has been marked as done."
}