InteractsWithFakeEmbeddings
trait InteractsWithFakeEmbeddings
Properties
| protected FakeEmbeddingGateway|null | $fakeEmbeddingGateway | The fake embedding gateway instance. |
|
| protected array | $recordedEmbeddingsGenerations | All of the recorded embeddings generations. |
|
| protected array | $recordedQueuedEmbeddingsGenerations | All of the recorded embeddings generations that were queued. |
Methods
Record an embeddings generation.
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.
Get the fake embedding gateway.
Details
at line 37
FakeEmbeddingGateway
fakeEmbeddings(Closure|array $responses = [])
Fake embeddings generation.
On the shared manager, the fake gateway affects every request.
at line 48
InteractsWithFakeEmbeddings
recordEmbeddingsGeneration(EmbeddingsPrompt|QueuedEmbeddingsPrompt $prompt)
Record an embeddings generation.
Recorded prompts remain on the worker-shared manager.
at line 63
InteractsWithFakeEmbeddings
assertEmbeddingsGenerated(Closure $callback)
Assert that embeddings were generated matching a given truth test.
at line 76
InteractsWithFakeEmbeddings
assertEmbeddingsNotGenerated(Closure $callback)
Assert that embeddings were not generated matching a given truth test.
at line 89
InteractsWithFakeEmbeddings
assertNoEmbeddingsGenerated()
Assert that no embeddings were generated.
at line 102
InteractsWithFakeEmbeddings
assertEmbeddingsQueued(Closure $callback)
Assert that a queued embeddings generation was recorded matching a given truth test.
at line 115
InteractsWithFakeEmbeddings
assertEmbeddingsNotQueued(Closure $callback)
Assert that a queued embeddings generation was not recorded matching a given truth test.
at line 128
InteractsWithFakeEmbeddings
assertNoEmbeddingsQueued()
Assert that no queued embeddings generations were recorded.
at line 143
bool
embeddingsAreFaked()
Determine if embeddings generation is faked.
at line 151
FakeEmbeddingGateway|null
fakeEmbeddingGateway()
Get the fake embedding gateway.