合并代码

This commit is contained in:
wanyaokun
2024-08-28 19:58:37 +08:00
parent 20510a937b
commit 4020b603b1
12 changed files with 189 additions and 80 deletions
+3 -1
View File
@@ -25,7 +25,9 @@ def get_chat_engine(filters=None, params=None):
#tools.append(sql_query_tool)
# Add query tool if index exists
index = get_index()
indexs = get_index()
if len(indexs) > 0:
index = list(indexs.values())[0]
if index is not None:
summary_query_engine = create_summary_query_engine(index,top_k,use_reranker,filters)
summary_query_tool = QueryEngineTool.from_defaults( query_engine=summary_query_engine, name="summary_query_tool",