CassetteMode
org.llm4s.testkit.CassetteMode
@Experimental
enum CassetteMode
How a CassetteHttpClient uses its cassette file.
Replayanswers every request from the cassette, and never builds or calls a live client.Recordstarts the cassette over, sends every request through the live client and writes each exchange.RecordIfMissingisRecordwhen the cassette file does not exist andReplaywhen it does, so a run with the cassette checked in never reaches the network.RecordNewreplays every request the cassette holds and records, live, every one it does not, appending it to the file: it completes a cassette a run left partial (a live call that timed out or failed). A401,403,429or5xxanswer is returned but not written, so the next run asks again. A recording whose response had a value masked (a token exchange'saccess_token) is not replayed: that request goes live, so the client holds a real token for the requests that follow, and the fresh exchange replaces the old one in the file. UnlikeRecordIfMissing, a request the recording lacks reaches the network, so use it to record, not in CI.
Attributes
- Source
- CassetteHttpClient.scala
- Graph
-
- Supertypes
Members list
In this article
