From 3d17726c26d44b21cab4ef211f98fb4f126f6f4d Mon Sep 17 00:00:00 2001 From: jinhai Date: Thu, 28 Nov 2024 13:54:54 +0800 Subject: [PATCH] Fix display chunk issue Signed-off-by: jinhai --- rag/utils/infinity_conn.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rag/utils/infinity_conn.py b/rag/utils/infinity_conn.py index 1c0ec8fb29..5cedaf1ec7 100644 --- a/rag/utils/infinity_conn.py +++ b/rag/utils/infinity_conn.py @@ -310,7 +310,9 @@ def get( table_name = f"{indexName}_{knowledgebaseId}" table_instance = db_instance.get_table(table_name) kb_res = table_instance.output(["*"]).filter(f"id = '{chunkId}'").to_pl() - df_list.append(kb_res) + if len(kb_res) != 0 and kb_res.shape[0] > 0: + df_list.append(kb_res) + self.connPool.release_conn(inf_conn) res = concat_dataframes(df_list, ["id"]) res_fields = self.getFields(res, res.columns)