mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +06:00
Processor chat template: pass custom kwargs (#37852)
This commit is contained in:
parent
66ad8b2db0
commit
c34afa5957
@ -1440,6 +1440,9 @@ class ProcessorMixin(PushToHubMixin):
|
||||
if value is not None and not isinstance(value, dict):
|
||||
processed_kwargs[kwarg_type][key] = value
|
||||
|
||||
# Pass unprocessed custom kwargs
|
||||
processed_kwargs["template_kwargs"].update(kwargs)
|
||||
|
||||
if isinstance(conversation, (list, tuple)) and (
|
||||
isinstance(conversation[0], (list, tuple)) or hasattr(conversation[0], "content")
|
||||
):
|
||||
|
Loading…
Reference in New Issue
Block a user