From fe852640166395e4a4025ecc001af816c082a151 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Thu, 7 Nov 2024 15:55:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?stream=E6=B5=81=E5=BC=8F=E7=BB=93=E6=9D=9F=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/flow/workflow_manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/application/flow/workflow_manage.py b/apps/application/flow/workflow_manage.py index d5342c9c4cf..d2e99bce85d 100644 --- a/apps/application/flow/workflow_manage.py +++ b/apps/application/flow/workflow_manage.py @@ -304,11 +304,11 @@ def await_result(self, result): if chunk is None: break yield chunk - yield self.get_chunk_content('', True) finally: self.work_flow_post_handler.handler(self.params['chat_id'], self.params['chat_record_id'], self.answer, self) + yield self.get_chunk_content('', True) def run_chain_async(self, current_node): future = executor.submit(self.run_chain, current_node) From 93260ab372c01899fc03a5216de732fb15e8ff93 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Thu, 7 Nov 2024 17:49:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E5=8E=BB=E9=99=A4=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E7=9B=B4=E6=8E=A5=E8=BF=94=E5=9B=9E=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=9A=84=E6=A0=87=E9=A2=98=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../search_dataset_node/impl/base_search_dataset_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py b/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py index f86a8305e96..693495a6a78 100644 --- a/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py +++ b/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py @@ -73,7 +73,7 @@ def execute(self, dataset_id_list, dataset_setting, question, [f"{reset_title(paragraph.get('title', ''))}{paragraph.get('content')}" for paragraph in paragraph_list])[0:dataset_setting.get('max_paragraph_char_number', 5000)], 'directly_return': '\n'.join( - [f"{reset_title(paragraph.get('title', ''))}{paragraph.get('content')}" for paragraph in + [paragraph.get('content') for paragraph in result if paragraph.get('is_hit_handling_method')]), 'question': question},