Do not reraise exception

Tool use is optional and missing dependency
should not raise error
This commit is contained in:
Carlos Souza
2024-11-29 05:51:55 -05:00
parent a94470772f
commit 49ad43ff08

View File

@@ -65,8 +65,10 @@ class FirecrawlScrapeWebsiteTool(BaseTool):
try:
from firecrawl import FirecrawlApp
# Must rebuild model after class is defined
FirecrawlScrapeWebsiteTool.model_rebuild()
except ImportError:
raise ImportError(
"`firecrawl` package not found, please run `pip install firecrawl-py`"
)
"""
When this tool is not used, then exception can be ignored.
"""
pass