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 = {