[BugFix] Fix ernie4_5_vl_processor.py and qwen_vl_processor.py can not disable thinking (#4762)

* fix ernie4_5_vl_processor.py and qwen_vl_processor.py

* add unit test
This commit is contained in:
kxz2002
2025-11-04 16:00:32 +08:00
committed by GitHub
parent 007ee71208
commit 8a40374bfe
3 changed files with 22 additions and 2 deletions

View File

@@ -237,7 +237,7 @@ class QwenVLProcessor(TextProcessor):
if chat_template_kwargs:
if isinstance(chat_template_kwargs, dict):
for k, v in chat_template_kwargs.items():
if k not in request:
if k not in request or request[k] is None:
request[k] = v
else:
raise ValueError("Invalid input: chat_template_kwargs must be a dict")