mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[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:
@@ -233,7 +233,7 @@ class Ernie4_5_VLProcessor(Ernie4_5Processor):
|
||||
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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user