Skip to content

Commit

Permalink
Add optional parameter to pass custom api url in firecrawl (#2097)
Browse files Browse the repository at this point in the history
## Description

Add optional parameter to pass custom api url in firecrawl

Fixed #2093 
---

## Type of change

Please check the options that are relevant:

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Model update (Addition or modification of models)
- [ ] Other (please describe):

---

## Checklist

- [x] Adherence to standards: Code complies with Agno’s style guidelines
and best practices.
- [x] Formatting and validation: You have run `./scripts/format.sh` and
`./scripts/validate.sh` to ensure code is formatted and linted.
- [x] Self-review completed: A thorough review has been performed by the
contributor(s).
- [ ] Documentation: Docstrings and comments have been added or updated
for any complex logic.
- [ ] Examples and guides: Relevant cookbook examples have been included
or updated (if applicable).
- [ ] Tested in a clean environment: Changes have been tested in a clean
environment to confirm expected behavior.
- [ ] Tests (optional): Tests have been added or updated to cover any
new or changed functionality.

---
  • Loading branch information
anuragts authored Feb 12, 2025
1 parent b47519a commit d9e5e56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/agno/agno/tools/firecrawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def __init__(
limit: int = 10,
scrape: bool = True,
crawl: bool = False,
api_url: Optional[str] = "https://api.firecrawl.dev",
):
super().__init__(name="firecrawl_tools")

Expand All @@ -28,7 +29,7 @@ def __init__(

self.formats: Optional[List[str]] = formats
self.limit: int = limit
self.app: FirecrawlApp = FirecrawlApp(api_key=self.api_key)
self.app: FirecrawlApp = FirecrawlApp(api_key=self.api_key, api_url=api_url)

# Start with scrape by default. But if crawl is set, then set scrape to False.
if crawl:
Expand Down

0 comments on commit d9e5e56

Please sign in to comment.