[Bugfix]: Fix Step3ReasoningParser missing is_reasoning_end_streaming (#31969)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
@@ -100,6 +100,12 @@ class Step3ReasoningParser(ReasoningParser):
|
|||||||
def is_reasoning_end(self, input_ids: list[int]) -> bool:
|
def is_reasoning_end(self, input_ids: list[int]) -> bool:
|
||||||
return self.think_end_token_id in input_ids
|
return self.think_end_token_id in input_ids
|
||||||
|
|
||||||
|
def is_reasoning_end_streaming(
|
||||||
|
self, input_ids: list[int], delta_ids: list[int]
|
||||||
|
) -> bool:
|
||||||
|
end_token_id = self.think_end_token_id
|
||||||
|
return end_token_id in delta_ids
|
||||||
|
|
||||||
def extract_content_ids(self, input_ids: list[int]) -> list[int]:
|
def extract_content_ids(self, input_ids: list[int]) -> list[int]:
|
||||||
if self.think_end_token_id not in input_ids[:-1]:
|
if self.think_end_token_id not in input_ids[:-1]:
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user