What is and How to Install PrivateGPT?

Image Source: https://theaiexaminer.com/2023/05/18/privategpt/

Private GPT is an artificial intelligence chat robot that you can feed with your own documents and run on your own computer without needing an internet connection. Private GPT runs LLM on your own computer’s resources and thus learns from the documents you feed it. Again, by using your system’s resources, you can answer questions about your documents without needing any internet connection.

Now let’s move on to installing Private GPT.

Requirements;
->PrivateGPT Source Code(https://github.com/imartinez/privateGPT)
->Poetry
->Conda
->Python 3.11
->Visual Studio IDE9

1- Let’s download PrivateGPT’s source code.

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

2- Then, to use conda, let’s download and install Anaconda from the relevant link. It may take some time to install. After the installation, restart the computer.
(https://www.anaconda.com/download)

Then, let’s find and open Anaconda Promt.

Conda helps isolate our python environment. Let’s run the following command.

ShellScript
conda create -n privatgpt=3.11

To activate Environment, let’s continue with the command below.

ShellScript
conda activate privategpt=3.11

3- Let’s continue the PrivateGPT installation by installing Poetry.

ShellScript
pip install poetry

4- Let’s install the latest visual studio IDE.(https://visualstudio.microsoft.com/vs/community/)

5- We use the relevant command to install the UI and Local version.

ShellScript
poetry install --with ui,local

6- Let’s start the installation with the setup file. At this stage, it will download the necessary files. The important part is that it also downloads the language model.

ShellScript
poetry run python scripts/setup

7- Now let’s run PrivateGPT.

ShellScript
poetry run python -m private_gpt

After waiting for a while, when we go to http://127.0.0.1:8001, we see that PrivateGPT is working.

We upload documents by clicking Upload File(s). At this point, Private GPT processes the document we give, that is, turns it into a vector database using the embedding model. The duration of this process and the time it takes to answer our question are directly proportional to the resources of our system.

We can ask our questions after the document we provide is processed.

Resources

->https://docs.privategpt.dev/installation
->https://www.youtube.com/watch?v=XFiof0V3nhA


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *