Khoj - Your Second Brain
Added 2024-05-27 14:20:01 +0000 UTC
Video notes
Khoj is touted as being your "AI second brain". Get answers to your questions, whether they be from online sources or your own notes. Use hosted or local LLMs. Access from Obsidian, Emacs, Desktop app, Web or Whatsapp.
Overall, it's not too bad and the install was pretty painless. RAG is probably going to be everywhere soon, making now as good a time as any to dive into the experience if you haven't already!
Links
GitHub: https://github.com/khoj-ai/khoj
Docs: https://docs.khoj.dev/
Models: https://huggingface.co/models?library=gguf&sort=trending
Example model used: https://huggingface.co/bartowski/openchat-3.6-8b-20240522-GGUF
Install Notes
1. Commands I used for the postgres install on Ubuntu 22.04:
sudo apt update
sudo apt install -y postgresql-common build-essential
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt update
sudo apt install -y postgresql-16 postgresql-16-pgvector postgresql-client
sudo systemctl enable postgresql
sudo service postgresql start
2. Additionally, I needed to give the postgres db user a known password:
sudo -u postgres createdb khoj --password
export POSTGRES_PASSWORD=postgres
3. Creating a new conda environment and installing khoj (3.9 to 3.12 currently supported):
conda create -y --name khoj python=3.11
conda activate khoj
CMAKE_ARGS="-DLLAMA_CUDA=on" FORCE_CMAKE=1 python -m pip install khoj-assistant
4. Starting the server:
khoj --anonymous-mode
Additional Notes
You may wish to disable telemetry:
See: https://docs.khoj.dev/miscellaneous/telemetry
You can also use other custom models:
See: https://docs.khoj.dev/miscellaneous/ollama