Macos 部署自己的privateGpt(2024-0404)

Private Chatgpt

安装指引

https://docs.privategpt.dev/installation/getting-started/installation#base-requirements-to-run-privategpt

下载源码

git clone https://github.com/imartinez/privateGPT
cd privateGPT

安装软件

安装: Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

安装 pyenv

brew update
brew install pyenv

配置环境变量:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc

source ~/.zshrc

安装pyton3.11版本

pyenv install 3.11
pyenv local 3.11

安装 poetry

brew install poetry

安装 make

brew install make

安装local版本 llm,默认底层会使用 mistral-7b-instruct

poetry install --extras "ui llms-llama-cpp embeddings-huggingface vector-stores-qdrant"

poetry run python scripts/setup

PGPT_PROFILES=local make run

启动

PGPT_PROFILES=local make run

访问地址:

http://localhost:8001