wagtail / wagtail-vector-index

Store Wagtail pages & Django models as embeddings in vector databases
https://wagtail-vector-index.readthedocs.io/en/latest/
MIT License
15 stars 10 forks source link

Restructure Documents to be dependent on Embeddings #57

Closed tomusher closed 5 months ago

tomusher commented 5 months ago

So that we can rely on Embedding objects being present when we're building backends, this makes Documents have an embedding_pk field which is populated by the Converter.

This also changes all backends so that they return a Document which will retain that reference back to the Embedding.

There's probably more we can do here to enforce this, but this is a starting point.