Add explanation for error suppression in the method

This commit is contained in:
shenchucheng 2024-05-31 15:50:05 +08:00
parent aeef03e29c
commit 9dc5212d47

View file

@ -62,6 +62,7 @@ class Browser:
with mem_fs.open(filename, "w") as f:
f.write(html)
# Since RAG is an optional optimization, if it fails, the simplified HTML can be used as a fallback.
with contextlib.suppress(Exception):
from metagpt.rag.engines import SimpleEngine # avoid circular import