feat: add Firecrawl provider support
This commit is contained in:
67
README.md
67
README.md
@@ -1,6 +1,6 @@
|
||||
# pi-web-search
|
||||
|
||||
`pi-web-search` is a Pi extension package that adds `web_search` and `web_fetch` tools backed by pluggable providers such as Exa and Tavily.
|
||||
`pi-web-search` is a Pi extension package that adds `web_search` and `web_fetch` tools backed by pluggable providers such as Exa, Tavily, and Firecrawl.
|
||||
|
||||
## Install
|
||||
|
||||
@@ -24,6 +24,71 @@ pi install https://gitea.rwiesner.com/pi/pi-web-search
|
||||
|
||||
Provider configuration is managed by the extension's own commands and config files.
|
||||
|
||||
Example `~/.pi/agent/web-search.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"defaultProvider": "firecrawl-main",
|
||||
"providers": [
|
||||
{
|
||||
"name": "firecrawl-main",
|
||||
"type": "firecrawl",
|
||||
"apiKey": "fc-...",
|
||||
"fallbackProviders": ["exa-fallback"]
|
||||
},
|
||||
{
|
||||
"name": "exa-fallback",
|
||||
"type": "exa",
|
||||
"apiKey": "exa_..."
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Self-hosted Firecrawl:
|
||||
|
||||
```json
|
||||
{
|
||||
"defaultProvider": "firecrawl-selfhosted",
|
||||
"providers": [
|
||||
{
|
||||
"name": "firecrawl-selfhosted",
|
||||
"type": "firecrawl",
|
||||
"baseUrl": "https://firecrawl.internal.example/v2"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Tool examples:
|
||||
|
||||
```json
|
||||
{
|
||||
"query": "pi docs",
|
||||
"provider": "firecrawl-main",
|
||||
"firecrawl": {
|
||||
"country": "DE",
|
||||
"categories": ["github"],
|
||||
"scrapeOptions": {
|
||||
"formats": ["markdown"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"urls": ["https://pi.dev"],
|
||||
"provider": "firecrawl-main",
|
||||
"summary": true,
|
||||
"firecrawl": {
|
||||
"formats": ["markdown", "summary", "images"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Run `web-search-config` inside Pi to add or edit Tavily, Exa, and Firecrawl providers interactively.
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user