Skip to content

Commit f5f8c68

Browse files
authored
examples: add privateGPT example (#355)
1 parent 9e5cd0f commit f5f8c68

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

examples/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ A full example on how to run RWKV models with LocalAI
5757

5858
[Check it out here](https://github.com/go-skynet/LocalAI/tree/master/examples/rwkv/)
5959

60+
### PrivateGPT
61+
62+
_by [@mudler](https://github.com/mudler)_
63+
64+
A full example on how to run PrivateGPT with LocalAI
65+
66+
[Check it out here](https://github.com/go-skynet/LocalAI/tree/master/examples/privateGPT/)
67+
6068
### Slack bot
6169

6270
_by [@mudler](https://github.com/mudler)_

examples/privateGPT/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# privateGPT
2+
3+
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 ).
4+
5+
Follow the instructions in https://github.com/go-skynet/privateGPT:
6+
7+
```bash
8+
git clone [email protected]:go-skynet/privateGPT.git
9+
cd privateGPT
10+
pip install -r requirements.txt
11+
```
12+
13+
Rename `example.env` to `.env` and edit the variables appropriately.
14+
15+
This is an example `.env` file for LocalAI:
16+
17+
```
18+
PERSIST_DIRECTORY=db
19+
# Set to OpenAI here
20+
MODEL_TYPE=OpenAI
21+
EMBEDDINGS_MODEL_NAME=all-MiniLM-L6-v2
22+
MODEL_N_CTX=1000
23+
# LocalAI URL
24+
OPENAI_API_BASE=http://localhost:8080/v1
25+
```

0 commit comments

Comments
 (0)