From f5f8c687bef3ea177f4a40e84d74b9b2680e300e Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 23 May 2023 10:32:34 +0200 Subject: [PATCH] examples: add privateGPT example (#355) --- examples/README.md | 8 ++++++++ examples/privateGPT/README.md | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 examples/privateGPT/README.md diff --git a/examples/README.md b/examples/README.md index e5f74e69..44525178 100644 --- a/examples/README.md +++ b/examples/README.md @@ -57,6 +57,14 @@ A full example on how to run RWKV models with LocalAI [Check it out here](https://github.com/go-skynet/LocalAI/tree/master/examples/rwkv/) +### PrivateGPT + +_by [@mudler](https://github.com/mudler)_ + +A full example on how to run PrivateGPT with LocalAI + +[Check it out here](https://github.com/go-skynet/LocalAI/tree/master/examples/privateGPT/) + ### Slack bot _by [@mudler](https://github.com/mudler)_ diff --git a/examples/privateGPT/README.md b/examples/privateGPT/README.md new file mode 100644 index 00000000..faf682c4 --- /dev/null +++ b/examples/privateGPT/README.md @@ -0,0 +1,25 @@ +# privateGPT + +This example is a re-adaptation of https://github.com/imartinez/privateGPT to work with LocalAI and OpenAI endpoints. We have a fork with the changes required to work with privateGPT here https://github.com/go-skynet/privateGPT ( PR: https://github.com/imartinez/privateGPT/pull/408 ). + +Follow the instructions in https://github.com/go-skynet/privateGPT: + +```bash +git clone git@github.com:go-skynet/privateGPT.git +cd privateGPT +pip install -r requirements.txt +``` + +Rename `example.env` to `.env` and edit the variables appropriately. + +This is an example `.env` file for LocalAI: + +``` +PERSIST_DIRECTORY=db +# Set to OpenAI here +MODEL_TYPE=OpenAI +EMBEDDINGS_MODEL_NAME=all-MiniLM-L6-v2 +MODEL_N_CTX=1000 +# LocalAI URL +OPENAI_API_BASE=http://localhost:8080/v1 +``` \ No newline at end of file