fix: strip partial think tags in streaming output
This commit is contained in:
@@ -102,6 +102,14 @@ class TestStripThinkMalformedLeaks:
|
||||
assert strip_think("<channel|>喷泉策略:09:00 开启") == ("喷泉策略:09:00 开启")
|
||||
assert strip_think("<|channel|>answer") == "answer"
|
||||
|
||||
def test_partial_trailing_think_tag_after_visible_text(self):
|
||||
assert strip_think("喷泉策略说明 <thin") == "喷泉策略说明"
|
||||
assert strip_think("answer <thought") == "answer"
|
||||
|
||||
def test_partial_trailing_channel_marker_after_visible_text(self):
|
||||
assert strip_think("喷泉策略说明 <|chan") == "喷泉策略说明"
|
||||
assert strip_think("answer <channel") == "answer"
|
||||
|
||||
|
||||
class TestStripThinkConservativePreserve:
|
||||
"""Regression: the malformed-tag / orphan cleanup must NOT touch
|
||||
|
||||
Reference in New Issue
Block a user