(template: str)
| 197 | |
| 198 | |
| 199 | def get_dialogue_template(template: str) -> DialogueTemplate: |
| 200 | if template not in SUPPORTED_DIALOGUE_TEMPLATES.keys(): |
| 201 | raise ValueError(f"Template {template} is not supported!") |
| 202 | return SUPPORTED_DIALOGUE_TEMPLATES[template].copy() |
| 203 | |
| 204 | |
| 205 | def prepare_dialogue(example, dialogue_template, is_train=True): |