/mai

Primary LanguagePython

MAI (MyAI)

OpenAI's chatgpt-retrieval-plugin, but instead of a plugin, it's a standalone app.

My first AI project, I wanted to see how hard it would be and also learn a bit about vector databases on the process.

Develop

API

  1. Install Python 3.10, if not already installed.
  2. Install poetry: pip install poetry
  3. Create a new virtual environment with Python 3.10: poetry env use python3.10
  4. Activate the virtual environment: poetry shell
  5. Install app dependencies: poetry install
  6. Set the required environment variables: cp .env.example .env
  7. Run the API: poetry run start

App

  1. CD into the app directory: cd app
  2. Install dependencies: pnpm install
  3. Run dev script: pnpm dev

Running like production

  1. CD into the app directory: cd app
  2. Run build script: pnpm build
  3. Go back to root folder: cd ..
  4. Run the API: poetry run start

API will now serve the app static assets as well.