From 365eb0f9ed235074624d4f71d85893ec3187d5ce Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Thu, 19 Oct 2023 16:05:59 +0800 Subject: [PATCH] bugfix(ChatData): ChatData 1.empty table show bug fix; --- pilot/scene/chat_db/auto_execute/out_parser.py | 4 ++-- pilot/scene/chat_db/data_loader.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pilot/scene/chat_db/auto_execute/out_parser.py b/pilot/scene/chat_db/auto_execute/out_parser.py index 03c71b431..577cac1ef 100644 --- a/pilot/scene/chat_db/auto_execute/out_parser.py +++ b/pilot/scene/chat_db/auto_execute/out_parser.py @@ -36,8 +36,8 @@ def parse_view_response(self, speak, data) -> str: ### tool out data to table view data_loader = DbDataLoader() - if len(data) <= 1: - data.insert(0, ["result"]) + if len(data) < 1: + data.insert(0, []) df = pd.DataFrame(data[1:], columns=data[0]) if not CFG.NEW_SERVER_MODE and not CFG.SERVER_LIGHT_MODE: table_style = """