Skip to content

danthelion/gpt-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO app powered by GPT-3

This is a simple TODO app powered by GPT-3.

How to use

  1. Create the initial database
python create_db.py
  1. Start the server
python main.py
  1. 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."
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages