You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(nodestore): add Postgres for the doc and index store (#1706)
* Adding Postgres for the doc and index store
* Adding documentation. Rename postgres database local->simple. Postgres storage dependencies
* Update documentation for postgres storage
* Renaming feature to nodestore
* update docstore -> nodestore in doc
* missed some docstore changes in doc
* Updated poetry.lock
* Formatting updates to pass ruff/black checks
* Correction to unreachable code!
* Format adjustment to pass black test
* Adjust extra inclusion name for vector pg
* extra dep change for pg vector
* storage-postgres -> storage-nodestore-postgres
* Hash change on poetry lock
PrivateGPT supports **Simple** and [Postgres](https://www.postgresql.org/) providers. Simple being the default.
3
+
4
+
In order to select one or the other, set the `nodestore.database` property in the `settings.yaml` file to `simple` or `postgres`.
5
+
6
+
```yaml
7
+
nodestore:
8
+
database: simple
9
+
```
10
+
11
+
### Simple Document Store
12
+
13
+
Setting up simple document store: Persist data with in-memory and disk storage.
14
+
15
+
Enabling the simple document store is an excellent choice for small projects or proofs of concept where you need to persist data while maintaining minimal setup complexity. To get started, set the nodestore.database property in your settings.yaml file as follows:
16
+
17
+
```yaml
18
+
nodestore:
19
+
database: simple
20
+
```
21
+
The beauty of the simple document store is its flexibility and ease of implementation. It provides a solid foundation for managing and retrieving data without the need for complex setup or configuration. The combination of in-memory processing and disk persistence ensures that you can efficiently handle small to medium-sized datasets while maintaining data consistency across runs.
22
+
23
+
### Postgres Document Store
24
+
25
+
To enable Postgres, set the `nodestore.database` property in the `settings.yaml` file to `postgres` and install the `storage-nodestore-postgres` extra. Note: Vector Embeddings Storage in Postgres is configured separately
| **host** | The server hosting the Postgres database. Default is `localhost` |
35
+
| **port** | The port on which the Postgres database is accessible. Default is `5432` |
36
+
| **database** | The specific database to connect to. Default is `postgres` |
37
+
| **user** | The username for database access. Default is `postgres` |
38
+
| **password** | The password for database access. (Required) |
39
+
| **schema_name** | The database schema to use. Default is `private_gpt` |
40
+
41
+
For example:
42
+
```yaml
43
+
nodestore:
44
+
database: postgres
45
+
46
+
postgres:
47
+
host: localhost
48
+
port: 5432
49
+
database: postgres
50
+
user: postgres
51
+
password: <PASSWORD>
52
+
schema_name: private_gpt
53
+
```
54
+
55
+
Given the above configuration, Two PostgreSQL tables will be created upon successful connection: one for storing metadata related to the index and another for document data itself.
0 commit comments