feat(tools): add support for self-hosted firecrawl
Adds optional FIRECRAWL_API_URL environment variable to support self-hosted Firecrawl deployments alongside the cloud service. - Add FIRECRAWL_API_URL to optional env vars in hermes_cli/config.py - Update _get_firecrawl_client() in tools/web_tools.py to accept custom API URL - Add tests for client initialization with/without URL - Document new env var in installation and config guides
This commit is contained in:
@@ -62,7 +62,12 @@ def _get_firecrawl_client():
|
||||
api_key = os.getenv("FIRECRAWL_API_KEY")
|
||||
if not api_key:
|
||||
raise ValueError("FIRECRAWL_API_KEY environment variable not set")
|
||||
_firecrawl_client = Firecrawl(api_key=api_key)
|
||||
|
||||
api_url = os.getenv("FIRECRAWL_API_URL")
|
||||
if api_url:
|
||||
_firecrawl_client = Firecrawl(api_key=api_key, api_url=api_url)
|
||||
else:
|
||||
_firecrawl_client = Firecrawl(api_key=api_key)
|
||||
return _firecrawl_client
|
||||
|
||||
DEFAULT_MIN_LENGTH_FOR_SUMMARIZATION = 5000
|
||||
|
||||
Reference in New Issue
Block a user