1.3 KiB
1.3 KiB
Whistle Base64 Image Mock
This folder contains a Whistle ruleset for reproducing image-model responses that return raw base64 image payloads instead of normal remote URLs.
Files
mock-image-base64.rules: paste this into Whistle Rules.
Supported scenarios
__mock_b64_single__: returns one image indata[0].b64_json__mock_b64_duplicate__: returns two identical images indata[].b64_json__mock_b64_url_field__: returns one image whose raw base64 is placed indata[0].url
How to use
- Open Whistle and paste the contents of
mock-image-base64.rulesinto the Rules editor. - Make sure HTTPS capture is enabled for
api.tu-zi.com. - In AITU, keep the image Base URL pointed at
https://api.tu-zi.com/v1unless you intentionally use another domain. - Add one of the marker strings above to the prompt text and submit an image generation request.
Notes
- The rules match both
/v1/images/generationsand/images/generations. - If you use a non-default API host, replace
api.tu-zi.comin the rules. - If you want to stress-test large payload handling, replace the embedded base64 string with the real raw payload from your captured response text.
- The duplicate scenario is useful for verifying that identical base64 payloads are deduplicated into the same local cache file.