feat(web_search_engine): adds google as a provider (#1226)

This commit is contained in:
Amin Roosta
2025-02-10 00:21:55 -05:00
committed by GitHub
parent 59fdbd72a4
commit c07d396e30
3 changed files with 52 additions and 4 deletions

View File

@@ -550,15 +550,16 @@ For more information, see [Custom Providers](https://github.com/yetone/avante.nv
## Web Search Engines
Avante's tools include some web search engines, currently support [tavily](https://tavily.com/) and [serpapi](https://serpapi.com/). The default is tavily, and can be changed through configuring `Config.web_search_engine.provider`:
Avante's tools include some web search engines, currently support [tavily](https://tavily.com/), [serpapi](https://serpapi.com/) and google's [programmable search engine](https://developers.google.com/custom-search/v1/overview). The default is tavily, and can be changed through configuring `Config.web_search_engine.provider`:
```lua
web_search_engine = {
provider = "tavily", -- tavily or serpapi
provider = "tavily", -- tavily, serpapi or google
}
```
You need to set the environment variable `TAVILY_API_KEY` or `SERPAPI_API_KEY` to use tavily or serpapi.
You need to set the environment variable `TAVILY_API_KEY` , `SERPAPI_API_KEY` to use tavily or serpapi.
To use google, set the `GOOGLE_SEARCH_API_KEY` as the [API key](https://developers.google.com/custom-search/v1/overview), and `GOOGLE_SEARCH_ENGINE_ID` as the [search engine](https://programmablesearchengine.google.com) ID.
## Disable Tools