loommii/dsh-thin-search0

dsh-thin-search

DSH 免费网页搜索插件,支持免 Key 引擎自动回退、平台搜索、网页抓取及搜索增强。

AI 分析

核心用途是为 DSH 提供零成本的联网搜索能力。适合需要智能体检索最新网页信息,但不想为搜索 API 付费,且希望支持代理和搜索词优化的用户。

包名
dsh-thin-search
版本
0.4.0
最近更新
2026年9月11日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:loommii/dsh-thin-search

使用

网页设置页(推荐)

打开 设置 → 搜索引擎

  • 搜索提供方:免费引擎(默认)/ 官方 DeepSeek 搜索 —— 切换会写 profile 的 cordis.patch.yml重启 DSH 后生效(页面会提示)
  • 搜索引擎:下拉框切换,保存即生效(默认 anysearch
  • 搜索增强默认关闭。开启后会用 LLM 把口语化输入规范化为搜索关键词(如「今天美元兑换日元的汇率多少?」→「美元 日元 汇率」),改善 Bing 等引擎对中文问句的效果。⚠️ 开启后每次搜索会消耗 Token;关闭则完全免费、零模型调用。支持自定义增强系统提示词:在"搜索增强"卡片中,文本框始终显示当前实际生效的提示词(内置默认或自定义),可直接编辑;"恢复默认"按钮会覆盖为内置默认提示词
  • 增强模型:可选指定用于搜索增强的 LLM 模型(下拉列出 DSH 中已配置的全部模型)。留空 = 跟随 DSH 默认模型;指定模型失败时自动回退默认模型
  • 网络代理:可选填 HTTP/HTTPS 代理地址(如 http://127.0.0.1:7890),用于访问需要外网的引擎。V2Ray / Clash 需开启 HTTP 端口;不支持 SOCKS5。留空 = 直连,保存即生效
  • 平台搜索:勾选启用的平台(platform_search 工具按此过滤)
  • 结果缓存时长:0 关闭缓存,1-5 分钟
  • 测试引擎:直测当前引擎可用性

聊天框切换引擎(/thin-search-engine)

输入 /thin-search-engine 弹出引擎选择窗口(和 /model 一样的交互),点选即切换,当前引擎会标记出来。命令只改首选引擎,搜索仍走自动回退链。

配置文件(~/.dsh/settings.yaml

thin-search:
  provider: anysearch        # anysearch / bing / ddg / ddg-lite / searxng
  searchEnhance: false        # 搜索增强:LLM 规范化搜索词(默认关,开启消耗 Token)
  enhanceModel: ""            # 增强模型 "provider:model";空 = 跟随 DSH 默认模型
  proxy: ""                   # HTTP/HTTPS 代理,如 http://127.0.0.1:7890;空 = 直连
  bingMarket: zh-CN           # Bing 市场
  region: cn-zh               # DuckDuckGo 区域(可选)
  searxngInstances:           # 自定义 SearXNG 实例(可选)
    - https://your-instance.example
  platforms:                  # platform_search 启用列表
    - github
    - v2ex
    - bilibili
    - reddit
    - hn
    - stackoverflow
    - wikipedia
    - npm
  cacheTtl: 5                 # 结果缓存分钟数(0-5)

Usage

Settings page: Settings → Search Engine (provider switch, engine, enhancement, platforms, cache TTL, proxy). Chat command: /thin-search-engine. Config file: ~/.dsh/settings.yaml under thin-search: (see the Chinese section above for the full schema).