trait ManagesStores

Methods

getStore(string $storeId)

Get a vector store by its ID.

createStore(string $name, string|null $description = null, Collection|null $fileIds = null, DateInterval|null $expiresWhenIdleFor = null)

Create a new vector store.

string
addFileToStore(string $storeId, HasProviderId $file, array $metadata = [])

Add a file to a vector store.

bool
removeFileFromStore(string $storeId, HasProviderId|string $documentId)

Remove a file from a vector store.

bool
deleteStore(string $storeId)

Delete a vector store by its ID.

Details

at line 30
Store getStore(string $storeId)

Get a vector store by its ID.

Parameters

string $storeId

Return Value

Store

at line 38
Store createStore(string $name, string|null $description = null, Collection|null $fileIds = null, DateInterval|null $expiresWhenIdleFor = null)

Create a new vector store.

Parameters

string $name
string|null $description
Collection|null $fileIds
DateInterval|null $expiresWhenIdleFor

Return Value

Store

at line 87
string addFileToStore(string $storeId, HasProviderId $file, array $metadata = [])

Add a file to a vector store.

Parameters

string $storeId
HasProviderId $file
array $metadata

Return Value

string

at line 122
bool removeFileFromStore(string $storeId, HasProviderId|string $documentId)

Remove a file from a vector store.

Parameters

string $storeId
HasProviderId|string $documentId

Return Value

bool

at line 162
bool deleteStore(string $storeId)

Delete a vector store by its ID.

Parameters

string $storeId

Return Value

bool