File size: 1,486 Bytes
fa25318
 
 
3d67a24
 
fa25318
 
3d67a24
fa25318
 
13f683a
 
 
fa25318
 
 
 
 
 
d794662
fa25318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d67a24
fa25318
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# multilingual-dokugpt
Chat with multilingual documents in a language you prefer

## What it is
`multilingual-dokugpt` is a quasi-localgpt that makes use of `langchain`, generates  embeddings `locally` and save them in a Chroma vectorstore. It's `quasi-local` since querying is still made through a remote service (OPENAI or compatible).

## Features
* Handle documents (think of books or manuals) in multiple languages and multiple formats (.txt or plaintext in other suffixes, .docx, .pdf, .epub)
* Can use PawanOsman reverse proxy free api-key of the form `pk-....`. Refer to `.env.sample`

## Demo
[https://huggingface.co/spaces/mikeee/multilingual-dokugpt](https://huggingface.co/spaces/mikeee/multilingual-dokugpt)

## Usage
* Clone this repo
```
git clone https://github.com/ffreemt/multilingual-dokugpt
cd multilingual-dokugpt
```
* [Optional] Create a `venv`
e.g.
```
python -m venv .venv
call .venv\Scripts\activate  # Windows
# source .venv/bin/activate  # Linux/Mac
```

* Install packages
```
python -m pip install -r requirements.txt
```

* Setup OPENAI_API_KEY
e.g.
```
set OPENAI_API_KEY=sk...  # Windows cmd
# export OPENAI_API_KEY=sk...  # bash

or setup .env (refer to `.env.sample`)
```

* Start the program
```
python main.py
```
* Browse to
```
http://127.0.0.1:7860
```

## TODO
* Make it a true localgpt by replacing remote querying with a local `llm`.

## License
`multilingual-dokugpt` is released under the MIT License. See the LICENSE file for more details.