Logo
Classes

SupabaseVectorStore

Defined in: packages/providers/storage/supabase/src/SupabaseVectorStore.ts:29

Extends

  • BaseVectorStore

Constructors

Constructor

new SupabaseVectorStore(init): SupabaseVectorStore

Defined in: packages/providers/storage/supabase/src/SupabaseVectorStore.ts:40

Creates a new instance of SupabaseVectorStore

Parameters

init

SupabaseVectorStoreInit

Configuration object containing either a Supabase client or URL/key pair, and table name

Returns

SupabaseVectorStore

Throws

Error if neither client nor valid URL/key pair is provided

Overrides

BaseVectorStore.constructor

Properties

storesText

storesText: boolean = true

Defined in: packages/providers/storage/supabase/src/SupabaseVectorStore.ts:30

Overrides

BaseVectorStore.storesText

Methods

client()

client(): SupabaseClient<any, "public", any>

Defined in: packages/providers/storage/supabase/src/SupabaseVectorStore.ts:61

Returns the Supabase client instance used by this vector store

Returns

SupabaseClient<any, "public", any>

The configured Supabase client

Overrides

BaseVectorStore.client


add()

add(nodes): Promise<string[]>

Defined in: packages/providers/storage/supabase/src/SupabaseVectorStore.ts:71

Adds an array of nodes to the vector store

Parameters

nodes

BaseNode<Metadata>[]

Array of BaseNode objects to store

Returns

Promise<string[]>

Array of node IDs that were successfully stored

Throws

Error if the insertion fails

Overrides

BaseVectorStore.add


delete()

delete(refDocId, deleteOptions?): Promise<void>

Defined in: packages/providers/storage/supabase/src/SupabaseVectorStore.ts:106

Deletes documents from the vector store based on the reference document ID

Parameters

refDocId

string

The reference document ID to delete

deleteOptions?

object

Optional parameters for the delete operation

Returns

Promise<void>

Throws

Error if the deletion fails

Overrides

BaseVectorStore.delete


query()

query(query, options?): Promise<VectorStoreQueryResult>

Defined in: packages/providers/storage/supabase/src/SupabaseVectorStore.ts:129

Queries the vector store for similar documents

Parameters

query

VectorStoreQuery

Query parameters including the query embedding and number of results to return

options?

object

Optional parameters for the query operation

Returns

Promise<VectorStoreQueryResult>

Object containing matched nodes, similarity scores, and document IDs

Throws

Error if query embedding is not provided or if the query fails

Overrides

BaseVectorStore.query

On this page