/brain-py

Your brain's python package.

Primary LanguagePythonMIT LicenseMIT

Brain - Python Library

An LLM powered chat app that gets smarter the more knowledge you provide it.

Setup

If you don’t have Python installed, install it from here.

  1. Clone this repository

  2. Navigate into the project directory

    $ cd brain-py
  3. Create a new virtual environment

    $ virtualenv virt
    $ source virt/bin/activate
  4. Install the requirements

    $ pip install -r requirements.txt
  5. Make a copy of the example environment variables file

    $ cp .env.example .env
  6. Add your OpenAI API key to the newly created .env file

CLI

  1. Run the application

    $ ./cli.sh

Server

  1. Generate a secret key

    $ python -c 'import secrets; print(secrets.token_hex())'

    Once generated, set the FLASK_APP_SECRET_KEY in your .env as the new value.

  2. Run the application

    $ python server.py

Contributing

All contributions are welcome! Reach out for more information.