Skip to content

Commit 8e0a723

Browse files
committed
docs: simplify web search documentation to match upstream style
1 parent 6275fc3 commit 8e0a723

2 files changed

Lines changed: 25 additions & 212 deletions

File tree

docs/en/use/websearch.md

Lines changed: 13 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Web Search
23

34
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.
@@ -19,120 +20,26 @@ AstrBot currently supports 5 web search providers: `Tavily`, `BoCha`, `Baidu AI
1920

2021
Go to `Configuration`, scroll down to find Web Search, where you can select `Tavily`, `BoCha`, `Baidu AI Search`, `Brave`, or `Exa`.
2122

22-
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:
23-
24-
![](https://files.astrbot.app/docs/source/images/websearch/image1.png)
25-
26-
## Tavily
27-
28-
Go to [Tavily](https://app.tavily.com/home) to get an API key, then fill it in the corresponding configuration item.
29-
30-
To use a proxy or self-hosted instance, modify the `Tavily API Base URL` configuration item.
31-
32-
Tavily exposes two tools:
33-
34-
### Search (`web_search_tavily`)
35-
36-
| Parameter | Type | Required | Default | Description |
37-
|---|---|---|---|---|
38-
| `query` | string | Yes | - | Search query |
39-
| `max_results` | number | No | 7 | Maximum number of results to return. Range: 5-20 |
40-
| `search_depth` | string | No | `basic` | Search depth. Must be `basic` or `advanced` |
41-
| `topic` | string | No | `general` | Search topic. Must be `general` or `news` |
42-
| `days` | number | No | 3 | Number of days back from today to include. Only available when `topic` is `news` |
43-
| `time_range` | string | No | - | Time range for results. Must be `day`, `week`, `month`, or `year` |
44-
| `start_date` | string | No | - | Start date in `YYYY-MM-DD` format |
45-
| `end_date` | string | No | - | End date in `YYYY-MM-DD` format |
46-
| `timeout` | number | No | 30 | Request timeout in seconds. Minimum is 30 |
47-
48-
### Extract Web Page (`tavily_extract_web_page`)
49-
50-
| Parameter | Type | Required | Default | Description |
51-
|---|---|---|---|---|
52-
| `url` | string | Yes | - | The URL to extract content from |
53-
| `extract_depth` | string | No | `basic` | Extraction depth. Must be `basic` or `advanced` |
54-
| `timeout` | number | No | 30 | Request timeout in seconds. Minimum is 30 |
55-
56-
## Baidu AI Search
57-
58-
Go to the [BCE Console](https://console.bce.baidu.com/iam/#/iam/apikey/list) to get an API key, then fill it in the `websearch_baidu_app_builder_key` configuration item.
23+
### Tavily
5924

60-
Baidu AI Search exposes one tool:
25+
Go to [Tavily](https://app.tavily.com/home) to get an API Key, then fill it in the corresponding configuration item.
6126

62-
### Search (`web_search_baidu`)
27+
### BoCha
6328

64-
| Parameter | Type | Required | Default | Description |
65-
|---|---|---|---|---|
66-
| `query` | string | Yes | - | Search query |
67-
| `top_k` | number | No | 10 | Number of web results to return. Maximum 50 |
68-
| `search_recency_filter` | string | No | - | Time filter. Must be `week`, `month`, `semiyear`, or `year` |
69-
| `site` | string | No | - | Restrict search to specific sites, separated by `,` or `\|` |
70-
| `timeout` | number | No | 30 | Request timeout in seconds. Minimum is 30 |
29+
Get an API Key from the BoCha platform, then fill it in the corresponding configuration item.
7130

72-
## BoCha
31+
### Baidu AI Search
7332

74-
Go to [BoCha](https://www.bocha.ai) to get an API key, then fill it in the corresponding configuration item.
33+
Get an API Key from Baidu Qianfan APP Builder, then fill it in the corresponding configuration item.
7534

76-
BoCha exposes one tool:
35+
### Brave
7736

78-
### Search (`web_search_bocha`)
37+
Get an API Key from Brave Search, then fill it in the corresponding configuration item.
7938

80-
| Parameter | Type | Required | Default | Description |
81-
|---|---|---|---|---|
82-
| `query` | string | Yes | - | Search query |
83-
| `freshness` | string | No | `noLimit` | Time range filter. Supported values: `noLimit`, `oneDay`, `oneWeek`, `oneMonth`, `oneYear`, `YYYY-MM-DD..YYYY-MM-DD`, or `YYYY-MM-DD` |
84-
| `summary` | boolean | No | `false` | Whether to include a summary for each result |
85-
| `include` | string | No | - | Domains to include. Multiple domains separated by `\|` or `,` |
86-
| `exclude` | string | No | - | Domains to exclude. Multiple domains separated by `\|` or `,` |
87-
| `count` | number | No | 10 | Number of results to return. Range: 1-50 |
88-
| `timeout` | number | No | 30 | Request timeout in seconds. Minimum is 30 |
39+
### Exa
8940

90-
## Brave
41+
Go to [Exa](https://dashboard.exa.ai) to get an API Key, then fill it in the corresponding configuration item.
9142

92-
Go to Brave Search to get an API key, then fill it in the corresponding configuration item.
93-
94-
Brave exposes one tool:
95-
96-
### Search (`web_search_brave`)
97-
98-
| Parameter | Type | Required | Default | Description |
99-
|---|---|---|---|---|
100-
| `query` | string | Yes | - | Search query |
101-
| `count` | number | No | 10 | Number of results to return. Range: 1-20 |
102-
| `country` | string | No | `US` | Country code for region-specific results |
103-
| `search_lang` | string | No | `zh-hans` | Brave language code |
104-
| `freshness` | string | No | - | Time range. Must be `day`, `week`, `month`, or `year` |
105-
| `timeout` | number | No | 30 | Request timeout in seconds. Minimum is 30 |
106-
107-
## Exa
108-
109-
Go to [Exa](https://dashboard.exa.ai) to get an API key, then fill it in the corresponding configuration item.
110-
111-
To use a proxy or self-hosted instance, modify the `Exa API Base URL` configuration item.
112-
113-
Exa exposes three tools:
114-
115-
### Search (`web_search_exa`)
116-
117-
| Parameter | Type | Required | Default | Description |
118-
|---|---|---|---|---|
119-
| `query` | string | Yes | - | Search query |
120-
| `max_results` | number | No | 10 | Maximum number of results to return. Range: 1-100 |
121-
| `search_type` | string | No | `auto` | Search type. Must be `auto`, `neural`, `fast`, `instant`, or `deep` |
122-
| `category` | string | No | - | Vertical category. Supported values: `company`, `people`, `research paper`, `news`, `personal site`, `financial report` |
123-
| `timeout` | number | No | 30 | Request timeout in seconds. Minimum is 30 |
124-
125-
### Content Extraction (`exa_extract_web_page`)
126-
127-
| Parameter | Type | Required | Default | Description |
128-
|---|---|---|---|---|
129-
| `url` | string | Yes | - | The URL to extract content from |
130-
| `timeout` | number | No | 30 | Request timeout in seconds. Minimum is 30 |
131-
132-
### Find Similar (`exa_find_similar`)
43+
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:
13344

134-
| Parameter | Type | Required | Default | Description |
135-
|---|---|---|---|---|
136-
| `url` | string | Yes | - | The URL to find similar content for |
137-
| `max_results` | number | No | 10 | Maximum number of results to return. Range: 1-100 |
138-
| `timeout` | number | No | 30 | Request timeout in seconds. Minimum is 30 |
45+
![](https://files.astrbot.app/docs/source/images/websearch/image1.png)

docs/zh/use/websearch.md

Lines changed: 12 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -19,120 +19,26 @@ AstrBot 当前支持 5 种网页搜索源接入方式:`Tavily`、`BoCha`、`
1919

2020
进入 `配置`,下拉找到网页搜索,你可选择 `Tavily``BoCha``百度 AI 搜索``Brave``Exa`
2121

22-
如果你使用 Tavily 作为网页搜索源,在 AstrBot ChatUI 上会获得更好的引用来源展示体验:
22+
### Tavily
2323

24-
![](https://files.astrbot.app/docs/source/images/websearch/image1.png)
25-
26-
## Tavily
27-
28-
前往 [Tavily](https://app.tavily.com/home) 获取 API Key,然后填写在相应配置项中。
29-
30-
如需使用代理或自建实例,可修改 `Tavily API Base URL` 配置项。
31-
32-
Tavily 提供两个工具:
33-
34-
### 搜索(`web_search_tavily`
35-
36-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
37-
|---|---|---|---|---|
38-
| `query` | string || - | 搜索关键词 |
39-
| `max_results` | number || 7 | 返回最大结果数,范围 5-20 |
40-
| `search_depth` | string || `basic` | 搜索深度,可选 `basic``advanced` |
41-
| `topic` | string || `general` | 搜索主题,可选 `general``news` |
42-
| `days` | number || 3 | 向前追溯的天数,仅 `topic=news` 时生效 |
43-
| `time_range` | string || - | 时间范围,可选 `day``week``month``year` |
44-
| `start_date` | string || - | 起始日期,格式 `YYYY-MM-DD` |
45-
| `end_date` | string || - | 结束日期,格式 `YYYY-MM-DD` |
46-
| `timeout` | number || 30 | 请求超时时间(秒),最小 30 |
47-
48-
### 网页内容提取(`tavily_extract_web_page`
49-
50-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
51-
|---|---|---|---|---|
52-
| `url` | string || - | 要提取内容的网页 URL |
53-
| `extract_depth` | string || `basic` | 提取深度,可选 `basic``advanced` |
54-
| `timeout` | number || 30 | 请求超时时间(秒),最小 30 |
55-
56-
## 百度 AI 搜索
57-
58-
前往 [百度智能云控制台](https://console.bce.baidu.com/iam/#/iam/apikey/list) 获取 API Key,然后填写在 `websearch_baidu_app_builder_key` 配置项中。
59-
60-
百度 AI 搜索提供一个工具:
61-
62-
### 搜索(`web_search_baidu`
24+
前往 [Tavily](https://app.tavily.com/home) 获取 API Key,然后填写在相应的配置项。
6325

64-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
65-
|---|---|---|---|---|
66-
| `query` | string || - | 搜索关键词 |
67-
| `top_k` | number || 10 | 返回的网页结果数量,最大 50 |
68-
| `search_recency_filter` | string || - | 时间范围,可选 `week``month``semiyear``year` |
69-
| `site` | string || - | 限定搜索站点,多个站点可用 `,``\|` 分隔 |
70-
| `timeout` | number || 30 | 请求超时时间(秒),最小 30 |
26+
### BoCha
7127

72-
## BoCha
28+
前往 BoCha 平台获取 API Key,然后填写在相应的配置项。
7329

74-
前往 [BoCha](https://www.bocha.ai) 获取 API Key,然后填写在相应配置项中。
30+
### 百度 AI 搜索
7531

76-
BoCha 提供一个工具:
32+
前往百度千帆 APP Builder 获取 API Key,然后填写在相应的配置项。
7733

78-
### 搜索(`web_search_bocha`
34+
### Brave
7935

80-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
81-
|---|---|---|---|---|
82-
| `query` | string || - | 搜索关键词 |
83-
| `freshness` | string || `noLimit` | 时间范围筛选,可选 `noLimit``oneDay``oneWeek``oneMonth``oneYear``YYYY-MM-DD..YYYY-MM-DD``YYYY-MM-DD` |
84-
| `summary` | boolean || `false` | 是否返回每条结果的摘要 |
85-
| `include` | string || - | 仅搜索指定域名,多个域名用 `\|``,` 分隔 |
86-
| `exclude` | string || - | 排除指定域名,多个域名用 `\|``,` 分隔 |
87-
| `count` | number || 10 | 返回结果数量,范围 1-50 |
88-
| `timeout` | number || 30 | 请求超时时间(秒),最小 30 |
36+
前往 Brave Search 获取 API Key,然后填写在相应的配置项。
8937

90-
## Brave
38+
### Exa
9139

92-
前往 Brave Search 获取 API Key,然后填写在相应配置项中
40+
前往 [Exa](https://dashboard.exa.ai) 获取 API Key,然后填写在相应的配置项
9341

94-
Brave 提供一个工具
42+
如果你使用 Tavily 作为网页搜索源,在 AstrBot ChatUI 上会获得更好的体验优化,包括引用来源展示等
9543

96-
### 搜索(`web_search_brave`
97-
98-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
99-
|---|---|---|---|---|
100-
| `query` | string || - | 搜索关键词 |
101-
| `count` | number || 10 | 返回结果数量,范围 1-20 |
102-
| `country` | string || `US` | 国家/地区代码 |
103-
| `search_lang` | string || `zh-hans` | 搜索语言代码 |
104-
| `freshness` | string || - | 时间范围,可选 `day``week``month``year` |
105-
| `timeout` | number || 30 | 请求超时时间(秒),最小 30 |
106-
107-
## Exa
108-
109-
前往 [Exa](https://dashboard.exa.ai) 获取 API Key,然后填写在相应配置项中。
110-
111-
如需使用代理或自建实例,可修改 `Exa API Base URL` 配置项。
112-
113-
Exa 提供三个工具:
114-
115-
### 搜索(`web_search_exa`
116-
117-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
118-
|---|---|---|---|---|
119-
| `query` | string || - | 搜索关键词 |
120-
| `max_results` | number || 10 | 返回最大结果数,范围 1-100 |
121-
| `search_type` | string || `auto` | 搜索类型,可选 `auto``neural``fast``instant``deep` |
122-
| `category` | string || - | 垂直类别,可选 `company``people``research paper``news``personal site``financial report` |
123-
| `timeout` | number || 30 | 请求超时时间(秒),最小 30 |
124-
125-
### 内容提取(`exa_extract_web_page`
126-
127-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
128-
|---|---|---|---|---|
129-
| `url` | string || - | 要提取内容的网页 URL |
130-
| `timeout` | number || 30 | 请求超时时间(秒),最小 30 |
131-
132-
### 相似链接(`exa_find_similar`
133-
134-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
135-
|---|---|---|---|---|
136-
| `url` | string || - | 用于查找相似内容的网页 URL |
137-
| `max_results` | number || 10 | 返回最大结果数,范围 1-100 |
138-
| `timeout` | number || 30 | 请求超时时间(秒),最小 30 |
44+
![](https://files.astrbot.app/docs/source/images/websearch/image1.png)

0 commit comments

Comments
 (0)