[Model] Add optional parameter to reasoning parser constructor (#25554)

Signed-off-by: taohui <taohui3@gmail.com>
Signed-off-by: Tao Hui <taohui3@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Tao Hui
2025-09-26 01:12:50 +08:00
committed by GitHub
parent 13cc7f5370
commit b8d9e4a326
8 changed files with 15 additions and 15 deletions

View File

@@ -21,12 +21,12 @@ class MistralReasoningParser(DeepSeekR1ReasoningParser):
text. This parser extracts the reasoning content from the model output.
"""
def __init__(self, tokenizer: MistralTokenizer):
def __init__(self, tokenizer: MistralTokenizer, *args, **kwargs):
if not isinstance(tokenizer, MistralTokenizer):
raise ValueError(
"The tokenizer must be an instance of MistralTokenizer.")
ReasoningParser.__init__(self, tokenizer)
ReasoningParser.__init__(self, tokenizer, *args, **kwargs)
if not self.model_tokenizer:
raise ValueError(