Implement SupabasePgVectorDocumentStore and SupabasePgvectorEmbeddingRetriever as a thin wrapper around the existing pgvector-haystack integration, pre-configured to work with Supabase's connection model.
Detailed design
Reuses PgvectorDocumentStore under the hood and handles Supabase-specific connection setup (URL + service role key/JWT).
from haystack_integrations.document_stores.supabase import SupabasePgVectorDocumentStore
from haystack_integrations.components.retrievers.supabase import SupabasePgvectorEmbeddingRetriever
document_store = SupabasePgVectorDocumentStore(
supabase_url="https://<project>.supabase.co",
supabase_key=Secret.from_env_var("SUPABASE_SERVICE_KEY"),
table_name="haystack_documents",
embedding_dimension=1536,
)
retriever = SupabasePgvectorEmbeddingRetriever(document_store=document_store, top_k=5)
Implementation notes
- Primary dependency:
supabase-py + pgvector-haystack
- Auth via
supabase_url and supabase_key (using Secret for secure handling)
- Supabase connection strings follow the pattern
postgresql://postgres.<project>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgres
- Support optional
schema and table_name overrides
- Integration lives in
integrations/supabase/
Checklist
Implement
SupabasePgVectorDocumentStoreandSupabasePgvectorEmbeddingRetrieveras a thin wrapper around the existingpgvector-haystackintegration, pre-configured to work with Supabase's connection model.Detailed design
Reuses
PgvectorDocumentStoreunder the hood and handles Supabase-specific connection setup (URL + service role key/JWT).Implementation notes
supabase-py+pgvector-haystacksupabase_urlandsupabase_key(usingSecretfor secure handling)postgresql://postgres.<project>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgresschemaandtable_nameoverridesintegrations/supabase/Checklist
mainbranch