Node Stores


PrivateGPT supports Simple and Postgres providers. Simple being the default.

In order to select one or the other, set the nodestore.database property in the settings.yaml file to simple or postgres.

2 database: simple

Simple Document Store

Setting up simple document store: Persist data with in-memory and disk storage.

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:

2 database: simple

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.

Postgres Document Store

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

$poetry install --extras storage-nodestore-postgres

The available configuration options are:

hostThe server hosting the Postgres database. Default is localhost
portThe port on which the Postgres database is accessible. Default is 5432
databaseThe specific database to connect to. Default is postgres
userThe username for database access. Default is postgres
passwordThe password for database access. (Required)
schema_nameThe database schema to use. Default is private_gpt

For example:

2 database: postgres
5 host: localhost
6 port: 5432
7 database: postgres
8 user: postgres
9 password: <PASSWORD>
10 schema_name: private_gpt

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.

postgres=# \dt private_gpt.*
List of relations
Schema | Name | Type | Owner
private_gpt | data_docstore | table | postgres
private_gpt | data_indexstore | table | postgres