Skip to main content

formatting_prompts_func

Function
This function is defined in the train module.
Converts each example’s conversation into a single plain-text prompt. If the example has a “conversations” field, process it as ShareGPT-style. Otherwise, assume Alpaca-style data with “instruction”, “input”, and “output” fields.

Signature

def formatting_prompts_func(examples: Any, tokenizer: Any) -> Any

Parameters

examples
Any
required
No description available.
tokenizer
Any
required
No description available.

Returns

Returns
Any
The result of the operation.