register_chat_format
Register a chat-format factory for a model family, so :func:chat_format_for_tokenizer can pick it.
Use it for a family whose tokenizer has no usable chat_template, or to replace the template rendering.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
factory
|
ChatFormatFactory
|
|
required |
first
|
bool
|
Ask this factory before the ones registered earlier (default), so it can override a built-in. |
True
|
Returns:
| Type | Description |
|---|---|
ChatFormatFactory
|
|