https://github.com/wagtail/wagtail-vector-index
Store Wagtail pages & Django models as embeddings in vector databases
https://github.com/wagtail/wagtail-vector-index
ai django embeddings wagtail
Last synced: 3 months ago
JSON representation
Store Wagtail pages & Django models as embeddings in vector databases
- Host: GitHub
- URL: https://github.com/wagtail/wagtail-vector-index
- Owner: wagtail
- License: mit
- Created: 2023-10-11T09:49:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-11T12:04:53.000Z (7 months ago)
- Last Synced: 2025-06-27T00:25:05.330Z (3 months ago)
- Topics: ai, django, embeddings, wagtail
- Language: Python
- Homepage: https://wagtail-vector-index.readthedocs.io/en/latest/
- Size: 365 KB
- Stars: 21
- Watchers: 4
- Forks: 15
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Wagtail Vector Index
[](https://opensource.org/licenses/MIT)
[](https://badge.fury.io/py/wagtail-vector-index)
[](https://github.com/wagtail/wagtail-vector-index/actions/workflows/test.yml)Wagtail Vector Index provides a way to turn Django models, Wagtail pages, and anything else in to embeddings which are stored in a one of multiple vector database backends.
This provides the backbone for features including:
* Natural language search
* Similarity search
* Content recommendations## Links
- [Documentation](https://github.com/wagtail/wagtail-vector-index/blob/main/README.md)
- [Changelog](https://github.com/wagtail/wagtail-vector-index/blob/main/CHANGELOG.md)
- [Contributing](https://github.com/wagtail/wagtail-vector-index/blob/main/CHANGELOG.md)
- [Discussions](https://github.com/wagtail/wagtail-vector-index/discussions)
- [Security](https://github.com/wagtail/wagtail-vector-index/security)## Supported Versions
* Wagtail 5.2
* Django 4.2
* Python 3.11, 3.12## Contributing
### Install
To make changes to this project, first clone this repository:
```sh
git clone https://github.com/wagtail/wagtail-vector-index.git
cd wagtail-vector-index
```With your preferred virtualenv activated, install testing dependencies:
#### Using pip
```sh
python -m pip install --upgrade pip>=21.3
python -m pip install -e .'[testing,llm,numpy,pgvector,qdrant,weaviate]' -U
```#### Using flit
```sh
python -m pip install flit
python -m flit install -s
```### pre-commit
Note that this project uses [pre-commit](https://github.com/pre-commit/pre-commit).
It is included in the project testing requirements. To set up locally:```shell
# go to the project directory
$ cd wagtail-vector-index
# initialize pre-commit
$ pre-commit install# Optional, run all checks once for this, then the checks will run only on the changed files
$ git ls-files --others --cached --exclude-standard | xargs pre-commit run --files
```### How to run tests
Now you can run tests as shown below:
```sh
tox
```or, you can run them for a specific environment `tox -e py3.11-django4.2-wagtail5.2` or specific test
`tox -e py3.11-django4.2-wagtail5.2 -- tests.test_file.TestClass.test_method`Sometimes tox contains cached dependencies, so if you want to run tests with the latest dependencies, you can use `tox -r` or run `rm -rf .tox` to delete the whole tox environment.
To run the test app interactively, use `tox -e interactive`, visit `http://127.0.0.1:8020/admin/` and log in with `admin`/`changeme`.