def pad_preprocessing_function(  # type: ignore
        inp: dict[str, str],
    ) -> dict[str, str]:
        """Split out prompt/response from text."""
        try:
            prompt, response = inp['text'].split('### Response:')
            prompt += '### Response:'
        except Exception as e:
            raise ValueError(
                f"Unable to extract prompt/response from 'text'={inp['text']}",
            ) from e
        return {'prompt': prompt, 'response': '|PAD|' * len(response.split())}
Split out prompt/response from text.
tests/data/test_dataloader.py