@klarkxy/dsh-web-search-manager 0.2.5 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -8
- package/docs/README.zh-CN.md +13 -7
- package/lib/client.inner.cjs +414 -423
- package/lib/client.inner.cjs.map +1 -1
- package/lib/client.js +414 -423
- package/lib/contracts.d.ts +7 -1
- package/lib/contracts.js +6 -1
- package/lib/contracts.js.map +1 -1
- package/lib/index.d.ts +7 -2
- package/lib/index.js +287 -62
- package/lib/index.js.map +1 -1
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +15 -12
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[简体中文](docs/README.zh-CN.md)
|
|
6
6
|
|
|
7
|
-
Choose which service answers the model's web searches, set request limits, and let the model read public web pages — all from one settings page.
|
|
7
|
+
Choose which service answers the model's web searches, set request limits, and let the model read public web pages — all from one settings page, with a tab each for search, page reading, and request limits.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -12,17 +12,21 @@ Choose which service answers the model's web searches, set request limits, and l
|
|
|
12
12
|
dsh plugin --profile web add @klarkxy/dsh-web-search-manager
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Replace `web` with your profile name, restart DSH Web, and open **Plugins → Web Search**.
|
|
15
|
+
Replace `web` with your profile name, restart DSH Web, and open **Plugins → Web Search**. Restart DSH after plugin updates too; refreshing the page alone does not load updated search code.
|
|
16
16
|
|
|
17
17
|
## Set up search
|
|
18
18
|
|
|
19
|
-
DuckDuckGo works out of the box with no key. You can also enable DeepSeek Search, Exa, Brave, Bocha, Serper, Firecrawl, or
|
|
19
|
+
DuckDuckGo works out of the box with no key. You can also enable DeepSeek Search, Exa, Brave, Bocha, Serper, Firecrawl, Tavily, Perplexity, or You.com by entering their API keys. Drag the list to set the order; each search uses the first ready service. Search services added by other plugins, such as Zhihu, appear in the same list. New services are not enabled automatically.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
The **Settings** tab sets the number of results, queries per call, the total timeout, and the maximum page length.
|
|
22
22
|
|
|
23
23
|
## Read web pages
|
|
24
24
|
|
|
25
|
-
Turn on **
|
|
25
|
+
Turn on **Read web pages**, enable the services you want to use, and drag them or use the up/down arrow keys to set their priority. Each fetch uses the first configured, available service. Fetch services connected by other plugins also appear in the list; new services need to be enabled manually. Services that are temporarily unloaded keep their selection and position.
|
|
26
|
+
|
|
27
|
+
Your previously selected fetch service is kept as the first entry. The bundled **Read web pages** service uses the free Jina Reader, falling back to one direct request if that fails. Services supplied by the host or other plugins use their own fetching method.
|
|
28
|
+
|
|
29
|
+
You can also enable **Firecrawl** to read Markdown pages with the same API key as Firecrawl search. Search and page reads are billed separately. Newly added services stay outside your priority lists until you enable them. Perplexity uses its Search API without generating answers; You.com returns web and news snippets without requesting extra full-page extraction.
|
|
26
30
|
|
|
27
31
|
## Give the tools to the model
|
|
28
32
|
|
|
@@ -36,9 +40,11 @@ The model then gets `web_search` and `web_fetch` while search and fetch are turn
|
|
|
36
40
|
|
|
37
41
|
## Limits
|
|
38
42
|
|
|
39
|
-
- Paid services may charge for
|
|
40
|
-
-
|
|
41
|
-
-
|
|
43
|
+
- Paid services may charge for search or fetch requests; the plugin's counts are not a bill.
|
|
44
|
+
- When using the bundled Jina Reader, page addresses are sent to Jina; do not fetch URLs containing private tokens.
|
|
45
|
+
- Firecrawl page reads require a page status code and final URL in the service response; missing metadata produces an error. Its page content may come from the service's cache. URLs are sent to the selected fetch service.
|
|
46
|
+
- Failed search or fetch requests do not switch to another service in the list automatically.
|
|
47
|
+
- Cancellation and timeouts ask the active service to stop and wait for it to finish cleaning up. A third-party service that ignores cancellation can delay the result and plugin unloading; the plugin cannot forcibly stop code running inside DSH.
|
|
42
48
|
|
|
43
49
|
## License
|
|
44
50
|
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[English](../README.md)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
在一个设置页里选择由哪个服务回答模型的网络搜索、设置请求限制,并让模型读取公开网页。搜索服务、网页读取和请求限制各占一个页签。
|
|
8
8
|
|
|
9
9
|
## 安装
|
|
10
10
|
|
|
@@ -12,17 +12,21 @@
|
|
|
12
12
|
dsh plugin --profile web add @klarkxy/dsh-web-search-manager
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
把 `web` 换成你的 profile 名,重启 DSH Web 后打开「插件 →
|
|
15
|
+
把 `web` 换成你的 profile 名,重启 DSH Web 后打开「插件 → 网页搜索」。更新插件后也需要重启 DSH;仅刷新页面不会加载新版搜索代码。
|
|
16
16
|
|
|
17
17
|
## 配置搜索
|
|
18
18
|
|
|
19
|
-
DuckDuckGo 默认可用,无需密钥。也可以填写 API Key 启用 DeepSeek 搜索、Exa、Brave、博查、Serper、Firecrawl 或
|
|
19
|
+
DuckDuckGo 默认可用,无需密钥。也可以填写 API Key 启用 DeepSeek 搜索、Exa、Brave、博查、Serper、Firecrawl、Tavily、Perplexity 或 You.com。拖拽列表调整顺序,每次搜索使用第一个就绪的服务。其他插件提供的搜索服务(例如知乎)也会出现在同一列表中。新服务不会自动开启。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
「设置」页签用于设置结果条数、每次调用的查询数、总超时和网页正文长度上限。
|
|
22
22
|
|
|
23
23
|
## 读取网页
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
打开「网页读取」后,选择参与读取的服务,拖拽或用上下方向键调整优先顺序。每次读取使用第一个已配置且可用的服务;其他插件接入的网页读取服务也会出现在列表中,新服务需要手动开启。暂时未加载的服务会保留原有选择和顺序。
|
|
26
|
+
|
|
27
|
+
原先选中的读取服务会保留为列表中的首项。内置「网页读取」通过免费的 Jina Reader 读取,失败时改为直接请求一次;如果使用宿主或其他插件的服务,则按该服务的方式读取。
|
|
28
|
+
|
|
29
|
+
也可以开启 **Firecrawl** 读取 Markdown 网页,与 Firecrawl 搜索共用 API Key;搜索与网页读取分别计费。新增服务需要手动加入优先列表。Perplexity 使用 Search API,不生成回答;You.com 返回网页与新闻摘要,不额外请求全文提取。
|
|
26
30
|
|
|
27
31
|
## 让模型使用
|
|
28
32
|
|
|
@@ -37,8 +41,10 @@ DuckDuckGo 默认可用,无需密钥。也可以填写 API Key 启用 DeepSeek
|
|
|
37
41
|
## 限制
|
|
38
42
|
|
|
39
43
|
- 付费服务可能按次收费;插件的计数不是账单。
|
|
40
|
-
-
|
|
41
|
-
-
|
|
44
|
+
- 使用内置 Jina Reader 时,网址会发送给 Jina,请勿读取包含私密令牌的链接。
|
|
45
|
+
- Firecrawl 网页读取要求服务返回网页状态码和最终网址,缺失时会报错;正文可能来自服务缓存。读取的网址会发送给所选服务。
|
|
46
|
+
- 搜索或网页读取请求失败时,不会自动换用列表中的其他服务。
|
|
47
|
+
- 取消与超时会请求当前服务停止,并等待其完成清理。忽略取消的第三方服务可能延迟结果返回和插件卸载;插件无法强制终止 DSH 进程内运行的代码。
|
|
42
48
|
|
|
43
49
|
## 许可证
|
|
44
50
|
|