改进rerank效果
This commit is contained in:
@@ -168,14 +168,14 @@ def get_db_documents(configs: list[DBLoaderConfig]):
|
||||
engine = create_engine(entry.uri)
|
||||
sql_database = SQLDatabase(engine)
|
||||
|
||||
table_schema_objs = makeDescriptionByEngine(sql_database)
|
||||
table_node_mapping = SQLTableNodeMapping(sql_database)
|
||||
|
||||
nodes = table_node_mapping.to_nodes(table_schema_objs)
|
||||
for node in nodes:
|
||||
node.metadata.update(metadata)
|
||||
|
||||
docs.extend(nodes)
|
||||
# table_schema_objs = makeDescriptionByEngine(sql_database)
|
||||
# table_node_mapping = SQLTableNodeMapping(sql_database)
|
||||
#
|
||||
# nodes = table_node_mapping.to_nodes(table_schema_objs)
|
||||
# for node in nodes:
|
||||
# node.metadata.update(metadata)
|
||||
#
|
||||
# docs.extend(nodes)
|
||||
|
||||
queries = entry.queries or []
|
||||
loader = CustomDatabaseReader(sql_database)
|
||||
|
||||
Reference in New Issue
Block a user