{"id":13825754,"url":"https://github.com/styczynski/chatdb","last_synced_at":"2025-04-13T14:34:00.824Z","repository":{"id":79817327,"uuid":"576020745","full_name":"styczynski/chatdb","owner":"styczynski","description":"ChatGPT-based database, wait... WHAT?","archived":false,"fork":false,"pushed_at":"2022-12-08T21:05:13.000Z","size":3137,"stargazers_count":77,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T05:33:34.409Z","etag":null,"topics":["ai","chatgpt","cli","database","gpt-3","gpt3","gptchat","key-value-database","key-value-store","library","ml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/styczynski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-12-08T20:35:58.000Z","updated_at":"2025-03-25T05:53:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"879410f5-1535-494f-9efa-c8fb2649b684","html_url":"https://github.com/styczynski/chatdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styczynski%2Fchatdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styczynski%2Fchatdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styczynski%2Fchatdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styczynski%2Fchatdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/styczynski","download_url":"https://codeload.github.com/styczynski/chatdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248728624,"owners_count":21152257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chatgpt","cli","database","gpt-3","gpt3","gptchat","key-value-database","key-value-store","library","ml"],"created_at":"2024-08-04T09:01:26.488Z","updated_at":"2025-04-13T14:34:00.802Z","avatar_url":"https://github.com/styczynski.png","language":"Python","readme":"# 🖥️💬 ChatDB\n\n**ChatDB** *(pronounced \"theworstideaeverdb\")* is just incredibly stupid idea to convince ChatGPT instance using its API, that it's a key-value store and\nuse it as a database that is incredibly slow, makes mistakes and do not always repond using the same format, buuuut\n\u003cbr /\u003e\n[*at least it can write you a poem when summing up the values!*](https://medium.com/@styczynski/probably-the-worst-database-ever-but-hey-it-can-write-poems-539b7757ad6d)\n\n[📚 Please can read full Medium article here](https://medium.com/@styczynski/probably-the-worst-database-ever-but-hey-it-can-write-poems-539b7757ad6d)\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"Chat DB screenshot\" width=\"600px\" src=\"https://github.com/styczynski/chatdb/blob/main/static/screenshot.png?raw=true\" /\u003e\n\u003c/p\u003e\n\n## How does it work?\n\n1. We clone the repo: `git clone https://github.com/styczynski/chatdb.git`\n2. We install dependencies: `poetry install`\n3. Now we need to open the browser and navigate to https://chat.openai.com/chat and log in or sign up\n4. We need to open console with F12\n5. Open Application tab \u003e Cookies\n6. Copy the value for `__Secure-next-auth.session-token` and paste that into `OpenAPIAuth(session_token=\"YOUR SESSION TOKEN\")` inside `demo.py`\n7. Now the last step is to execute `poetry run python3 demo.py`\n\n![Chrome token](https://github.com/styczynski/chatdb/blob/main/static/token.png?raw=true)\n\n## Supported features\n\n* 🔁 Very rough retries and function trying to convert model reponses to some form of standarized output\n* ➕ Save values with `write(\"key\", value)`\n* 👀 Read value under key with `read(\"key\")`\n* 🚮 Delete key with `delete(\"key\")`\n* 🔢 List all key-value pairs with `all()`\n* 🔎 Filter values using regex for keys `filter(\"regex\")` (sometimes returns keys, sometimes values, sometimes both, it's okay to be undecided I guess?)\n* 💬 `query(\"What is your purpose?\")` You can ask existential questions too! Let's be depressed together!\n* 📓 Get log of operations with `get_log()`\n* ⏪ Undo operations (that is suuuuper slow because we reconstruct the database) with `undo(2)`\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyczynski%2Fchatdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstyczynski%2Fchatdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyczynski%2Fchatdb/lists"}