interface StoreProvider implements FileProvider

Methods

string
name()

Get the name of the underlying AI provider.

from  Provider
string
driver()

Get the name of the underlying AI driver.

from  Provider
array
providerCredentials()

Get the credentials for the underlying AI provider.

from  Provider
array
additionalConfiguration()

Get the provider connection configuration other than the driver, key, and name.

from  Provider
withHeaders(array $headers)

Get a provider instance that sends the given HTTP headers with each request.

from  Provider
getFile(string $fileId)

Get a file by its ID.

putFile(StorableFile $file)

Store the given file.

void
deleteFile(string $fileId)

Delete a file by its ID.

fileGateway()

Get the provider's file gateway.

useFileGateway(FileGateway $gateway)

Set the provider's file gateway.

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 $fileId)

Remove a file from a vector store.

bool
deleteStore(string $storeId)

Delete a vector store by its ID.

storeGateway()

Get the provider's store gateway.

useStoreGateway(StoreGateway $gateway)

Set the provider's store gateway.

Details

in Provider at line 12
string name()

Get the name of the underlying AI provider.

Return Value

string

in Provider at line 17
string driver()

Get the name of the underlying AI driver.

Return Value

string

in Provider at line 24
array providerCredentials()

Get the credentials for the underlying AI provider.

Return Value

array

in Provider at line 31
array additionalConfiguration()

Get the provider connection configuration other than the driver, key, and name.

Return Value

array

in Provider at line 40
Provider withHeaders(array $headers)

internal  
 

Get a provider instance that sends the given HTTP headers with each request.

Parameters

array $headers

Return Value

Provider

in FileProvider at line 18
FileResponse getFile(string $fileId)

Get a file by its ID.

Parameters

string $fileId

Return Value

FileResponse

in FileProvider at line 23
StoredFileResponse putFile(StorableFile $file)

Store the given file.

Parameters

StorableFile $file

Return Value

StoredFileResponse

in FileProvider at line 28
void deleteFile(string $fileId)

Delete a file by its ID.

Parameters

string $fileId

Return Value

void

in FileProvider at line 33
FileGateway fileGateway()

Get the provider's file gateway.

Return Value

FileGateway

in FileProvider at line 38
FileProvider useFileGateway(FileGateway $gateway)

Set the provider's file gateway.

Parameters

FileGateway $gateway

Return Value

FileProvider

at line 19
Store getStore(string $storeId)

Get a vector store by its ID.

Parameters

string $storeId

Return Value

Store

at line 24
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 36
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 41
bool removeFileFromStore(string $storeId, HasProviderId|string $fileId)

Remove a file from a vector store.

Parameters

string $storeId
HasProviderId|string $fileId

Return Value

bool

at line 46
bool deleteStore(string $storeId)

Delete a vector store by its ID.

Parameters

string $storeId

Return Value

bool

at line 51
StoreGateway storeGateway()

Get the provider's store gateway.

Return Value

StoreGateway

at line 56
StoreProvider useStoreGateway(StoreGateway $gateway)

Set the provider's store gateway.

Parameters

StoreGateway $gateway

Return Value

StoreProvider