Code Monkey home page Code Monkey logo

chatdb's Introduction

๐Ÿ–ฅ๏ธ๐Ÿ’ฌ ChatDB

ChatDB (pronounced "theworstideaeverdb") is just incredibly stupid idea to convince ChatGPT instance using its API, that it's a key-value store and use it as a database that is incredibly slow, makes mistakes and do not always repond using the same format, buuuut
at least it can write you a poem when summing up the values!

๐Ÿ“š Please can read full Medium article here

Chat DB screenshot

How does it work?

  1. We clone the repo:ย git clone https://github.com/styczynski/chatdb.git
  2. We install dependencies: poetry install
  3. Now we need to open the browser and navigate to https://chat.openai.com/chat and log in or sign up
  4. We need to open console with F12
  5. Open Application tab > Cookies
  6. Copy the value for __Secure-next-auth.session-token and paste that into OpenAPIAuth(session_token="YOUR SESSION TOKEN") inside demo.py
  7. Now the last step is to execute poetry run python3 demo.py

Chrome token

Supported features

  • ๐Ÿ” Very rough retries and function trying to convert model reponses to some form of standarized output
  • โž• Save values with write("key", value)
  • ๐Ÿ‘€ Read value under key with read("key")
  • ๐Ÿšฎ Delete key with delete("key")
  • ๐Ÿ”ข List all key-value pairs with all()
  • ๐Ÿ”Ž Filter values using regex for keys filter("regex") (sometimes returns keys, sometimes values, sometimes both, it's okay to be undecided I guess?)
  • ๐Ÿ’ฌ query("What is your purpose?") You can ask existential questions too! Let's be depressed together!
  • ๐Ÿ““ Get log of operations with get_log()
  • โช Undo operations (that is suuuuper slow because we reconstruct the database) with undo(2)

chatdb's People

Contributors

mmabrouk avatar natanel-shitrit avatar styczynski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ecalderini

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.