Replies: 1 comment
-
|
I recommend using ai-mock by copilotkit for this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Following up on the Discord conversation with Alem about enabling easier testing.
When writing e2e tests, I want deterministic responses so I can make reliable assertions. Real LLM calls make tests flaky, slow, and expensive.
I've rolled my own mock layer using query params, but it's a lot of boilerplate to match the chunk format. Would be great to have something like this supported out of the box.
Ideally it would let you say "for this request, return exactly this response" with controllable streaming behavior. For example, I control how long a stream takes to complete so I can test stream resumption with Playwright. I have a bunch of test fixtures on my server and have them removed in prod builds with dead code removal controlled by a build time constant.
Bonus idea: it would be cool to generate fixtures by recording real LLM conversations through devtools.
Beta Was this translation helpful? Give feedback.
All reactions