fix: clouse issue #2469 by fixing the type (#2533)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong 2025-03-28 05:46:44 +08:00 committed by GitHub
parent 10619aaf96
commit 7c05bc1784
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,9 +38,7 @@ class ChatWithDbQA(BaseChat):
if self.database.is_graph_type():
# When the current graph database retrieves source data from ChatDB, the
# topk uses the sum of node table and edge table.
self.top_k = len(self.tables["vertex_tables"]) + len(
self.tables["edge_tables"]
)
self.top_k = len(list(self.tables))
else:
logger.info(f"Dialect: {self.database.db_type}")
self.top_k = self.curr_config.schema_retrieve_top_k