cerebras.modelzoo.data_preparation.data_preprocessing.hooks.prompt_completion_chat_read_hook#
- cerebras.modelzoo.data_preparation.data_preprocessing.hooks.prompt_completion_chat_read_hook(example, **read_hook_kwargs)[source]#
Process prompt and completion data from a chat into a semantic_data_array format.
- Parameters
example (Dict[str, Any]) – The example data to process.
**read_hook_kwargs – Additional keyword arguments for processing.
- Returns
A list of dictionaries in semantic_data_array format.
- Return type
List[Dict[str, Any]]