Adapt the old parameter enable_thinking in chat_template_kwargs (#30852)
Signed-off-by: xinsong.gao <1418762819@qq.com> Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
@@ -26,6 +26,8 @@ class DeepSeekV3ReasoningParser(ReasoningParser):
|
||||
|
||||
chat_kwargs = kwargs.pop("chat_template_kwargs", {}) or {}
|
||||
thinking = bool(chat_kwargs.pop("thinking", False))
|
||||
enable_thinking = bool(chat_kwargs.pop("enable_thinking", False))
|
||||
thinking = thinking or enable_thinking
|
||||
|
||||
if thinking:
|
||||
self._parser = DeepSeekR1ReasoningParser(tokenizer, *args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user