-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/add postgres embedding store (#53)
* feat: Add TxtDocumentStore * feat: Add PostgresEmbeddingStore * docs: Add `postgres` extra to readme * tests: Split demo feedback test into two * tests: Init default embedding store with no args * feat: Create index on embedding column in PostgresEmbeddingStore * chore: Install pgvector extension in CI * fix: Set embedding_dim in PostgresEmbeddingStore * feat: Add more dunder methods to EmbeddingStore * tests: Use random embeddings * fix: Pgvector fixes * docs: Update cov badge * chore: Change apt package name for pgvector and postgres * chore: Set pgvector apt package * chore: apt package * chore: apt package * chore: Yes to all * docs: Add pgvector installation link
- Loading branch information
1 parent
32bbc09
commit 735c346
Showing
8 changed files
with
505 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
A package for general-purpose RAG applications. | ||
|
||
______________________________________________________________________ | ||
[![Code Coverage](https://img.shields.io/badge/Coverage-72%25-yellow.svg)](https://github.com/alexandrainst/ragger/tree/main/tests) | ||
[![Code Coverage](https://img.shields.io/badge/Coverage-74%25-yellow.svg)](https://github.com/alexandrainst/ragger/tree/main/tests) | ||
|
||
|
||
Developer(s): | ||
|
@@ -35,10 +35,17 @@ Installation with `poetry`: | |
poetry add git+ssh://[email protected]/alexandrainst/ragger.git --extras all | ||
``` | ||
|
||
You can replace the `all` extra with any combination of `vllm`, `openai` and `demo` to | ||
install only the components you need. For `pip`, this is done by comma-separating the | ||
extras (e.g., `ragger[vllm,demo]`), while for `poetry`, you add multiple `--extras` | ||
flags (e.g., `--extras vllm --extras demo`). | ||
You can replace the `all` extra with any combination of the following, to install only | ||
the components you need: | ||
|
||
- `postgres` | ||
- `vllm` | ||
- `openai` | ||
- `demo` | ||
|
||
For `pip`, this is done by comma-separating the extras (e.g., `ragger[vllm,demo]`), | ||
while for `poetry`, you add multiple `--extras` flags (e.g., `--extras vllm --extras | ||
demo`). | ||
|
||
|
||
## Quick Start | ||
|
@@ -101,6 +108,11 @@ imported from `ragger.embedding_store`. | |
|
||
- `NumpyEmbeddingStore`: An embedding store that stores embeddings in a NumPy array. | ||
(default) | ||
- `PostgresEmbeddingStore`: An embedding store that uses a PostgreSQL database to store | ||
embeddings, using the `pgvector` extension. This assumes that the PostgreSQL server is | ||
already running, and that the `pgvector` extension is installed. See | ||
[here](https://github.com/pgvector/pgvector?tab=readme-ov-file#installation) for more | ||
information on how to install the extension. | ||
|
||
|
||
### Generators | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.