🐛 fix: segmented reply caused incomplete non-llm-response #503

This commit is contained in:
Soulter
2025-02-14 16:19:09 +08:00
parent a4bfa96502
commit f1a448708c
@@ -82,7 +82,9 @@ class ResultDecorateStage(Stage):
# 不分段回复
new_chain.append(comp)
continue
split_response = re.findall(self.regex, comp.text)
split_response = []
for line in comp.text.split("\n"):
split_response.extend(re.findall(self.regex, line))
if not split_response:
new_chain.append(comp)
continue