Register a new conversation template.
(template: Conversation, override: bool = False)
| 191 | |
| 192 | |
| 193 | def register_conv_template(template: Conversation, override: bool = False): |
| 194 | """Register a new conversation template.""" |
| 195 | if not override: |
| 196 | assert template.name not in conv_templates, f"{name} has been registered." |
| 197 | conv_templates[template.name] = template |
| 198 | |
| 199 | |
| 200 | def get_conv_template(name: str) -> Conversation: |