InteractsWithFakeTranscriptions
trait InteractsWithFakeTranscriptions
Properties
| protected FakeTranscriptionGateway|null | $fakeTranscriptionGateway | The fake transcription gateway instance. |
|
| protected array | $recordedTranscriptionGenerations | All of the recorded transcription generations. |
|
| protected array | $recordedQueuedTranscriptionGenerations | All of the recorded transcription generations that were queued. |
Methods
Record a transcription generation.
Assert that a transcription was generated matching a given truth test.
Assert that a transcription was not generated matching a given truth test.
Assert that no transcriptions were generated.
Assert that a queued transcription generation was recorded matching a given truth test.
Assert that a queued transcription generation was not recorded matching a given truth test.
Assert that no queued transcription generations were recorded.
Determine if transcription generation is faked.
Get the fake transcription gateway.
Details
at line 37
FakeTranscriptionGateway
fakeTranscriptions(Closure|array $responses = [])
Fake transcription generation.
On the shared manager, the fake gateway affects every request.
at line 48
InteractsWithFakeTranscriptions
recordTranscriptionGeneration(TranscriptionPrompt|QueuedTranscriptionPrompt $prompt)
Record a transcription generation.
Recorded prompts remain on the worker-shared manager.
at line 63
InteractsWithFakeTranscriptions
assertTranscriptionGenerated(Closure $callback)
Assert that a transcription was generated matching a given truth test.
at line 76
InteractsWithFakeTranscriptions
assertTranscriptionNotGenerated(Closure $callback)
Assert that a transcription was not generated matching a given truth test.
at line 89
InteractsWithFakeTranscriptions
assertNoTranscriptionsGenerated()
Assert that no transcriptions were generated.
at line 102
InteractsWithFakeTranscriptions
assertTranscriptionQueued(Closure $callback)
Assert that a queued transcription generation was recorded matching a given truth test.
at line 115
InteractsWithFakeTranscriptions
assertTranscriptionNotQueued(Closure $callback)
Assert that a queued transcription generation was not recorded matching a given truth test.
at line 128
InteractsWithFakeTranscriptions
assertNoTranscriptionsQueued()
Assert that no queued transcription generations were recorded.
at line 143
bool
transcriptionsAreFaked()
Determine if transcription generation is faked.
at line 151
FakeTranscriptionGateway|null
fakeTranscriptionGateway()
Get the fake transcription gateway.