class Stores

Methods

static Store
get(string $storeId, Provider|Lab|string|null $provider = null)

Get a vector store by its ID.

static Store
create(string $name, string|null $description = null, Collection|array $fileIds = [], DateInterval|null $expiresWhenIdleFor = null, Provider|Lab|string|null $provider = null)

Create a new vector store.

static bool
delete(string $storeId, Provider|Lab|string|null $provider = null)

Delete a vector store.

fake(Closure|array $responses = [], bool $files = true)

Fake store operations.

static string
fakeId(string $for)

Get the fake store ID for a given store name.

static void
assertCreated(Closure|string $callback)

Assert that a vector store was created by name.

static void
assertNotCreated(Closure|string $callback)

Assert that a vector store was not created.

static void
assertNothingCreated()

Assert that no vector stores were created.

static void
assertDeleted(Closure|string $callback)

Assert that a vector store was deleted.

static void
assertNotDeleted(Closure|string $callback)

Assert that a vector store was not deleted.

static void
assertNothingDeleted()

Assert that no vector stores were deleted.

static bool
isFaked()

Determine if store operations are faked.

Details

at line 20
static Store get(string $storeId, Provider|Lab|string|null $provider = null)

Get a vector store by its ID.

Parameters

string $storeId
Provider|Lab|string|null $provider

Return Value

Store

at line 28
static Store create(string $name, string|null $description = null, Collection|array $fileIds = [], DateInterval|null $expiresWhenIdleFor = null, Provider|Lab|string|null $provider = null)

Create a new vector store.

Parameters

string $name
string|null $description
Collection|array $fileIds
DateInterval|null $expiresWhenIdleFor
Provider|Lab|string|null $provider

Return Value

Store

at line 46
static bool delete(string $storeId, Provider|Lab|string|null $provider = null)

Delete a vector store.

Parameters

string $storeId
Provider|Lab|string|null $provider

Return Value

bool

at line 56
static FakeStoreGateway fake(Closure|array $responses = [], bool $files = true)

Fake store operations.

The fake gateway is shared across requests in the worker.

Parameters

Closure|array $responses
bool $files

Return Value

FakeStoreGateway

at line 69
static string fakeId(string $for)

Get the fake store ID for a given store name.

Parameters

string $for

Return Value

string

at line 77
static void assertCreated(Closure|string $callback)

Assert that a vector store was created by name.

Parameters

Closure|string $callback

Return Value

void

at line 85
static void assertNotCreated(Closure|string $callback)

Assert that a vector store was not created.

Parameters

Closure|string $callback

Return Value

void

at line 93
static void assertNothingCreated()

Assert that no vector stores were created.

Return Value

void

at line 101
static void assertDeleted(Closure|string $callback)

Assert that a vector store was deleted.

Parameters

Closure|string $callback

Return Value

void

at line 109
static void assertNotDeleted(Closure|string $callback)

Assert that a vector store was not deleted.

Parameters

Closure|string $callback

Return Value

void

at line 117
static void assertNothingDeleted()

Assert that no vector stores were deleted.

Return Value

void

at line 125
static bool isFaked()

Determine if store operations are faked.

Return Value

bool