fix conflict

This commit is contained in:
seehi 2024-03-07 15:39:41 +08:00
commit 0f2f460ddc
7 changed files with 17 additions and 13 deletions

View file

@ -171,6 +171,6 @@ class SimpleEngine(RetrieverQueryEngine):
def _try_reconstruct_obj(nodes: list[NodeWithScore]):
"""If node is object, then dynamically reconstruct object, and save object to node.metadata["obj"]."""
for node in nodes:
if node.metadata.get("is_obj"):
if node.metadata.get("is_obj", False):
obj_cls = import_class(node.metadata["obj_cls_name"], node.metadata["obj_mod_name"])
node.metadata["obj"] = obj_cls(**node.metadata["obj_dict"])