mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-06-14 03:15:58 +00:00
feat(community): add Brave Search web search tool (#3528)
* feat(community): add Brave Search web search tool Add a community web_search provider backed by the official Brave Search API (https://api.search.brave.com/res/v1/web/search). API key is read from the tool config (inline api_key) or the BRAVE_SEARCH_API_KEY env var. Output schema (title/url/content) matches existing search tools. No new dependencies (uses the existing httpx). Also wires up the setup wizard, doctor health check, config example, and EN/ZH docs. * refactor(community): drop redundant [:count] slice in Brave search The Brave API already caps results via the `count` request param, so client-side slicing was redundant. Tests now simulate the API honoring `count` instead of relying on the slice. Addresses PR review nit. * style(tests): apply ruff format to test_doctor.py Collapse multiline write_text calls onto single lines to satisfy the CI ruff formatter (lint-backend was failing on format --check).
This commit is contained in:
@@ -530,6 +530,16 @@ tools:
|
||||
# max_results: 5
|
||||
# # api_key: $SERPER_API_KEY # Optional if SERPER_API_KEY env var is set
|
||||
|
||||
# Web search tool (uses Brave Search API, requires BRAVE_SEARCH_API_KEY)
|
||||
# Brave Search returns results from an independent index. Sign up at
|
||||
# https://brave.com/search/api/ to get a key. Unlike the DuckDuckGo
|
||||
# `backend: brave` option above, this calls the official Brave API directly.
|
||||
# - name: web_search
|
||||
# group: web
|
||||
# use: deerflow.community.brave.tools:web_search_tool
|
||||
# max_results: 5 # Capped at 20 by the Brave Search API
|
||||
# # api_key: $BRAVE_SEARCH_API_KEY # Optional if the env var is set
|
||||
|
||||
# Web search tool (requires Tavily API key)
|
||||
# - name: web_search
|
||||
# group: web
|
||||
|
||||
Reference in New Issue
Block a user