Embeddings
class Embeddings
Methods
Get embedding vectors representing the given inputs.
Assert that embeddings were generated matching a given truth test.
Assert that embeddings were not generated matching a given truth test.
Assert that no embeddings were generated.
Assert that a queued embeddings generation was recorded matching a given truth test.
Assert that a queued embeddings generation was not recorded matching a given truth test.
Assert that no queued embeddings generations were recorded.
Determine if embeddings generation is faked.
Generate a fake embedding vector of the given dimensions.
Details
at line 27
static PendingEmbeddingsGeneration
for(array $inputs)
Get embedding vectors representing the given inputs.
at line 37
static FakeEmbeddingGateway
fake(Closure|array $responses = [])
Fake embeddings generation.
The fake gateway is shared across requests in the worker.
at line 46
static void
assertGenerated(Closure $callback)
Assert that embeddings were generated matching a given truth test.
at line 54
static void
assertNotGenerated(Closure $callback)
Assert that embeddings were not generated matching a given truth test.
at line 62
static void
assertNothingGenerated()
Assert that no embeddings were generated.
at line 70
static void
assertQueued(Closure $callback)
Assert that a queued embeddings generation was recorded matching a given truth test.
at line 78
static void
assertNotQueued(Closure $callback)
Assert that a queued embeddings generation was not recorded matching a given truth test.
at line 86
static void
assertNothingQueued()
Assert that no queued embeddings generations were recorded.
at line 94
static bool
isFaked()
Determine if embeddings generation is faked.
at line 104
static array
fakeEmbedding(int $dimensions)
Generate a fake embedding vector of the given dimensions.