mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-09-24 16:39:52 +08:00
refactor: remove default web search (#7416)
* refactor: remove default web search * chore: ruff format
This commit is contained in:
@@ -58,7 +58,7 @@ The default AstrBot configuration is as follows:
|
||||
"provider_pool": ["*"], # "*" means use all available providers
|
||||
"wake_prefix": "",
|
||||
"web_search": False,
|
||||
"websearch_provider": "default",
|
||||
"websearch_provider": "tavily",
|
||||
"websearch_tavily_key": [],
|
||||
"websearch_bocha_key": [],
|
||||
"websearch_brave_key": [],
|
||||
@@ -288,9 +288,7 @@ Whether to enable AstrBot's built-in web search capability. Default is `false`.
|
||||
|
||||
#### `provider_settings.websearch_provider`
|
||||
|
||||
Web search provider type. Default is `default`. Currently supports `default`, `tavily`, `bocha`, `baidu_ai_search`, and `brave`.
|
||||
|
||||
- `default`: Works best when Google is accessible. If Google fails, it tries Bing and Sogou in order.
|
||||
Web search provider type. Default is `tavily`. Currently supports `tavily`, `bocha`, `baidu_ai_search`, and `brave`.
|
||||
|
||||
- `tavily`: Uses the Tavily search engine.
|
||||
- `bocha`: Uses the BoCha search engine.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
# Web Search
|
||||
|
||||
The web search feature aims to provide large language models with the ability to invoke search engines like Google, Bing, and Sogou to obtain recent world information, which can improve the accuracy of model responses and reduce hallucinations to some extent.
|
||||
The web search feature gives large language models internet retrieval capability for recent information, which can improve response accuracy and reduce hallucinations to some extent.
|
||||
|
||||
AstrBot's built-in web search functionality relies on the large language model's `function calling` capability. If you're not familiar with function calling, please refer to: [Function Calling](/use/websearch).
|
||||
|
||||
@@ -14,22 +14,28 @@ When using a large language model that supports function calling with the web se
|
||||
|
||||
And other prompts with search intent to trigger the model to invoke the search tool.
|
||||
|
||||
AstrBot supports 3 types of web search source integration: `default`, `Tavily`, and `Baidu AI Search`.
|
||||
|
||||
The former uses AstrBot's built-in web search requester to query Google, Bing, and Sogou search engines, performing best in network environments with Google access. **We recommend using Tavily**.
|
||||
AstrBot currently supports 4 web search providers: `Tavily`, `BoCha`, `Baidu AI Search`, and `Brave`.
|
||||
|
||||

|
||||
|
||||
Go to `Configuration`, scroll down to find Web Search, where you can select `default` (default, not recommended) or `Tavily`.
|
||||
|
||||
### default (Not Recommended)
|
||||
|
||||
If your device is in China and you have a proxy, you can enable the proxy and enter the HTTP proxy address in `Admin Panel - Other Configuration - HTTP Proxy` to apply the proxy.
|
||||
Go to `Configuration`, scroll down to find Web Search, where you can select `Tavily`, `BoCha`, `Baidu AI Search`, or `Brave`.
|
||||
|
||||
### Tavily
|
||||
|
||||
Go to [Tavily](https://app.tavily.com/home) to get an API Key, then fill it in the corresponding configuration item.
|
||||
|
||||
### BoCha
|
||||
|
||||
Get an API Key from the BoCha platform, then fill it in the corresponding configuration item.
|
||||
|
||||
### Baidu AI Search
|
||||
|
||||
Get an API Key from Baidu Qianfan APP Builder, then fill it in the corresponding configuration item.
|
||||
|
||||
### Brave
|
||||
|
||||
Get an API Key from Brave Search, then fill it in the corresponding configuration item.
|
||||
|
||||
If you use Tavily as your web search source, you will get a better experience optimization on AstrBot ChatUI, including citation source display and more:
|
||||
|
||||

|
||||
|
||||
@@ -58,7 +58,7 @@ AstrBot 默认配置如下:
|
||||
"provider_pool": ["*"], # "*" 表示使用所有可用的提供者
|
||||
"wake_prefix": "",
|
||||
"web_search": False,
|
||||
"websearch_provider": "default",
|
||||
"websearch_provider": "tavily",
|
||||
"websearch_tavily_key": [],
|
||||
"websearch_bocha_key": [],
|
||||
"websearch_brave_key": [],
|
||||
@@ -288,9 +288,7 @@ ID 白名单。填写后,将只处理所填写的 ID 发来的消息事件。
|
||||
|
||||
#### `provider_settings.websearch_provider`
|
||||
|
||||
网页搜索提供商类型。默认为 `default`。目前支持 `default`、`tavily`、`bocha`、`baidu_ai_search`、`brave`。
|
||||
|
||||
- `default`:能访问 Google 时效果最佳。如果 Google 访问失败,程序会依次访问 Bing, Sogo 搜索引擎。
|
||||
网页搜索提供商类型。默认为 `tavily`。目前支持 `tavily`、`bocha`、`baidu_ai_search`、`brave`。
|
||||
|
||||
- `tavily`:使用 Tavily 搜索引擎。
|
||||
- `bocha`:使用 BoCha 搜索引擎。
|
||||
|
||||
+16
-10
@@ -1,6 +1,6 @@
|
||||
# 网页搜索
|
||||
|
||||
网页搜索功能旨在提供大模型调用 Google,Bing,搜狗等搜索引擎以获取世界最近信息的能力,一定程度上能够提高大模型的回复准确度,减少幻觉。
|
||||
网页搜索功能旨在为大模型提供联网检索能力,以获取最近信息,一定程度上能够提高回复准确度,减少幻觉。
|
||||
|
||||
AstrBot 内置的网页搜索功能依赖大模型提供 `函数调用` 能力。如果你不了解函数调用,请参考:[函数调用](/use/websearch)。
|
||||
|
||||
@@ -13,22 +13,28 @@ AstrBot 内置的网页搜索功能依赖大模型提供 `函数调用` 能力
|
||||
|
||||
等等带有搜索意味的提示让大模型触发调用搜索工具。
|
||||
|
||||
AstrBot 支持 3 种网页搜索源接入方式:`默认`、`Tavily`、`百度 AI 搜索`。
|
||||
|
||||
前者使用 AstrBot 内置的网页搜索请求器请求 Google、Bing、搜狗搜索引擎,在能够使用 Google 的网络环境下表现最佳。**我们推荐使用 Tavily**。
|
||||
AstrBot 当前支持 4 种网页搜索源接入方式:`Tavily`、`BoCha`、`百度 AI 搜索`、`Brave`。
|
||||
|
||||

|
||||
|
||||
进入 `配置`,下拉找到网页搜索,您可选择 `default`(默认,不推荐) 或 `Tavily`。
|
||||
|
||||
### default(不推荐)
|
||||
|
||||
如果您的设备在国内并且有代理,可以开启代理并在 `管理面板-其他配置-HTTP代理` 填入 HTTP 代理地址以应用代理。
|
||||
进入 `配置`,下拉找到网页搜索,您可选择 `Tavily`、`BoCha`、`百度 AI 搜索` 或 `Brave`。
|
||||
|
||||
### Tavily
|
||||
|
||||
前往 [Tavily](https://app.tavily.com/home) 得到 API Key,然后填写在相应的配置项。
|
||||
|
||||
### BoCha
|
||||
|
||||
前往 BoCha 平台获取 API Key,然后填写在相应的配置项。
|
||||
|
||||
### 百度 AI 搜索
|
||||
|
||||
前往百度千帆 APP Builder 获取 API Key,然后填写在相应的配置项。
|
||||
|
||||
### Brave
|
||||
|
||||
前往 Brave Search 获取 API Key,然后填写在相应的配置项。
|
||||
|
||||
如果您使用 Tavily 作为网页搜索源,在 AstrBot ChatUI 上将会获得更好的体验优化,包括引用来源展示等:
|
||||
|
||||

|
||||

|
||||
|
||||
Reference in New Issue
Block a user