Skip to main content

Module testing

Module testing 

Source
Expand description

Test doubles for the Agent seams: a scripted ChatModel that replays a queue of responses and records every request it received.

Structs§

ScriptedModel
Replays queued responses in order and streams each response’s text as one delta. An exhausted script fails the request with a decode-style LlmError so a test never hangs on a missing response.