mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
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:
parent
21d61bdd71
commit
d7d10b14cd
7 changed files with 68 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue