File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,6 @@ def resolve_hf_chat_template(
387
387
def _resolve_chat_template_content_format (
388
388
chat_template : Optional [str ],
389
389
tools : Optional [list [dict [str , Any ]]],
390
- given_format : ChatTemplateContentFormatOption ,
391
390
tokenizer : AnyTokenizer ,
392
391
* ,
393
392
model_config : ModelConfig ,
@@ -408,7 +407,7 @@ def _resolve_chat_template_content_format(
408
407
detected_format = ("string" if jinja_text is None else
409
408
_detect_content_format (jinja_text , default = "string" ))
410
409
411
- return detected_format if given_format == "auto" else given_format
410
+ return detected_format
412
411
413
412
414
413
@lru_cache
@@ -451,7 +450,6 @@ def resolve_chat_template_content_format(
451
450
detected_format = _resolve_chat_template_content_format (
452
451
chat_template ,
453
452
tools ,
454
- given_format ,
455
453
tokenizer ,
456
454
model_config = model_config ,
457
455
)
@@ -462,7 +460,8 @@ def resolve_chat_template_content_format(
462
460
detected_format = detected_format ,
463
461
)
464
462
465
- return detected_format
463
+ return detected_format if given_format == "auto" else given_format
464
+
466
465
467
466
468
467
ModalityStr = Literal ["image" , "audio" , "video" , "image_embeds" ]
You can’t perform that action at this time.
0 commit comments