SupabaseVectorStore#

class llama_index.vector_stores.SupabaseVectorStore(postgres_connection_string: str, collection_name: str, dimension: int = 1536, **kwargs: Any)#

Bases: VectorStore

Supbabase Vector.

In this vector store, embeddings are stored in Postgres table using pgvector.

During query time, the index uses pgvector/Supabase to query for the top k most similar nodes.

Parameters
  • postgres_connection_string (str) – postgres connection string

  • collection_name (str) – name of the collection to store the embeddings in

Attributes Summary

Methods Summary

add(nodes, **add_kwargs)

Add nodes to index.

delete(ref_doc_id, **delete_kwargs)

Delete doc.

get_by_id(doc_id, **kwargs)

Get row ids by doc id.

query(query, **kwargs)

Query index for top k most similar nodes.

Attributes Documentation

client#

Get client.

flat_metadata = False#
stores_text: bool = True#

Methods Documentation

add(nodes: List[BaseNode], **add_kwargs: Any) List[str]#

Add nodes to index.

Parameters

nodes – List[BaseNode]: list of nodes with embeddings

delete(ref_doc_id: str, **delete_kwargs: Any) None#

Delete doc.

:param : param ref_doc_id (str): document id

get_by_id(doc_id: str, **kwargs: Any) list#

Get row ids by doc id.

Parameters

doc_id (str) – document id

query(query: VectorStoreQuery, **kwargs: Any) VectorStoreQueryResult#

Query index for top k most similar nodes.

Parameters

query (List[float]) – query embedding