Add support for multipart responses. Work in progress.

Let's pass `$response_format` in here instead of hard-coding `json`.