[Bugfix] Align deepseek v4 parser thinking default with tokenizer (#51296)
Signed-off-by: sfeng33 <4florafeng@gmail.com>
This commit is contained in:
@@ -217,10 +217,12 @@ class DeepSeekV4Parser(ParserEngine):
|
||||
**kwargs,
|
||||
) -> None:
|
||||
chat_kwargs = kwargs.pop("chat_template_kwargs", None) or {}
|
||||
thinking = (
|
||||
bool(chat_kwargs.get("thinking") or chat_kwargs.get("enable_thinking"))
|
||||
and chat_kwargs.get("reasoning_effort") != "none"
|
||||
thinking = bool(
|
||||
chat_kwargs.get("thinking") or chat_kwargs.get("enable_thinking")
|
||||
)
|
||||
if "thinking" not in chat_kwargs and "enable_thinking" not in chat_kwargs:
|
||||
thinking = True
|
||||
thinking = thinking and chat_kwargs.get("reasoning_effort") != "none"
|
||||
super().__init__(
|
||||
tokenizer,
|
||||
tools,
|
||||
|
||||
Reference in New Issue
Block a user