From 94fb112979ddf1979d66f1195216f19ce3454f03 Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Mon, 24 Jul 2023 16:19:19 +0800 Subject: [PATCH] web bug fix --- pilot/scene/chat_db/auto_execute/chat.py | 2 +- pilot/scene/chat_db/professional_qa/chat.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pilot/scene/chat_db/auto_execute/chat.py b/pilot/scene/chat_db/auto_execute/chat.py index 588cff855..d5a8ede04 100644 --- a/pilot/scene/chat_db/auto_execute/chat.py +++ b/pilot/scene/chat_db/auto_execute/chat.py @@ -44,7 +44,7 @@ class ChatWithDbAutoExecute(BaseChat): raise ValueError("Could not import DBSummaryClient. ") client = DBSummaryClient() try: - table_infos = client.get_similar_tables(dbname=self.db_name, query=self.current_user_input, topk=self.top_k) + table_infos = client.get_db_summary(dbname=self.db_name, query=self.current_user_input, topk=self.top_k) except Exception as e: print("db summary find error!" + str(e)) table_infos = self.database.table_simple_info() diff --git a/pilot/scene/chat_db/professional_qa/chat.py b/pilot/scene/chat_db/professional_qa/chat.py index a0a571988..d38599bb5 100644 --- a/pilot/scene/chat_db/professional_qa/chat.py +++ b/pilot/scene/chat_db/professional_qa/chat.py @@ -48,13 +48,13 @@ class ChatWithDbQA(BaseChat): if self.db_name: client = DBSummaryClient() try: - table_infos = client.get_similar_tables(dbname=self.db_name, query=self.current_user_input, + table_infos = client.get_db_summary(dbname=self.db_name, query=self.current_user_input, topk=self.top_k) except Exception as e: print("db summary find error!" + str(e)) table_infos = self.database.table_simple_info() - # table_info = self.database.table_simple_info(self.db_connect) + # table_infos = self.database.table_simple_info() dialect = self.database.dialect input_values = {