How to Run PrivateGPT on macOS

Running PrivateGPT on macOS using Ollama can significantly enhance your AI capabilities by providing a robust and private language model experience. In this guide, we will walk you through the steps to install and configure PrivateGPT on your macOS system, leveraging the powerful Ollama framework. Whether you're a developer or an enthusiast, this tutorial will help you get started with ease.

First, install Ollama, then pull the Mistral and Nomic-Embed-Text models.

brew install ollama
ollama serve
ollama pull mistral
ollama pull nomic-embed-text

Next, install Python 3.11 using pyenv.

brew install pyenv
pyenv local 3.11

Then, clone the PrivateGPT repository and install Poetry to manage the PrivateGPT requirements.

git clone https://github.com/zylon-ai/private-gpt
pip install poetry
cd private-gpt
poetry install
poetry install --extras "ui llms-ollama embeddings-ollama vector-stores-qdrant"

After that, install make.

brew install make

Finally, run PrivateGPT.

PGPT_PROFILES=ollama make run

Open http://localhost:8001/ in your browser to check.