Skip to main content

Crate lc_testkit

Crate lc_testkit 

Source
Expand description

lc-testkit — a record/replay harness for the framework.

Lets the framework self-test without an API key:

  • RecordingProvider: wraps any BaseChatModel, makes one real call, then appends the request/response pair to a JSONL file.
  • ReplayProvider: replays from the recording file in FIFO order, zero network.

Data format and usage are described in docs/internal/v0.16.0/HARNESS_DESIGN.md Part A.

Structs§

RecordedExchange
One recorded request/response pair, serialized as a single JSONL line.
Recorder
Shared handle for append-mode writing to the recording file (protected by a std Mutex).
RecordingProvider
Wraps any BaseChatModel: after a successful response, appends the request/response pair to JSONL.
ReplayProvider
Zero-network BaseChatModel that replays from a recording file.

Enums§

ReplayStrategy
Replay strategy: decides which recording a request takes in concurrent/out-of-order scenarios.
TestkitError
Unified lc-testkit error.