allow stream in file extraction

This commit is contained in:
Billy Bao 2025-11-14 13:35:34 +08:00
parent ce45a3618d
commit 82ef0614ca

View file

@ -138,6 +138,7 @@ class Message(ComponentBase):
yield rand_cnt[s: ]
self.set_output("content", all_content)
self._convert_content(all_content)
def _is_jinjia2(self, content:str) -> bool:
patt = [
@ -151,7 +152,7 @@ class Message(ComponentBase):
return
rand_cnt = random.choice(self._param.content)
if self._param.stream and self._param.output_format is None and not self._is_jinjia2(rand_cnt):
if self._param.stream and not self._is_jinjia2(rand_cnt):
self.set_output("content", partial(self._stream, rand_cnt))
return