跳到正文

sunshine-lang/dsh-weather

41最近提交 2026年8月14日

dsh-weather DSH 插件

dsh-weather 是一个 DeepSeek Harness 插件,提供 `get_weather` 工具,可获取实时天气状况和可选的多日预报(最多 7 天)。它使用免费的 Open-Meteo API,支持摄氏/华氏温度单位,无需 API key 或注册。

如何安装 dsh-weather DSH 插件

dsh plugin --profile web add "github:sunshine-lang/dsh-weather

复制不会执行命令。安装 dsh-weather DSH 插件前请核对仓库和版本。

dsh-weather DSH 插件数据来源

dsh-weather DSH 插件快照日期:2026年8月16日

discovered

dsh-weather DSH 插件能做什么

  • 获取任意地点的实时温度、体感温度、湿度、风速和天气状况
  • 可选的多日预报(1–7 天),包含每日最高/最低温度和天气状况
  • 支持摄氏和华氏温度单位
  • 无需 API key 或注册;数据来自 Open-Meteo
  • 可通过插件配置自定义默认单位、超时时间和最大预报天数

dsh-weather DSH 插件适合哪些场景

  • 在与 AI 对话时查询任意城市的当前天气
  • 规划旅行时询问目的地的 3 天预报
  • 实时比较多个地点的天气状况
  • 将天气数据集成到 DSH 技能或工作流中

dsh-weather DSH 插件适合谁

  • 需要 AI 快速提供天气信息的 DeepSeek Harness 用户
  • 在 DSH 环境中构建需要天气上下文的应用的开发者

dsh-weather DSH 插件的限制

  • 需要运行 DeepSeek Harness 的 Web UI 配置(`--profile web`)
  • 天气数据依赖 Open-Meteo 免费 API,可能存在速率限制或数据覆盖范围限制(README 未明确说明)

dsh-weather DSH 插件的仓库 README 摘录

以下文字摘自 dsh-weather DSH 插件的上游仓库 sunshine-lang/dsh-weather 的 README,版权归原作者,仅作引用。

- `get_weather` 工具:实时温度、体感温度、湿度、风速与天气状况。 - 可选多日预报(最多 7 天):每日最高/最低温度与天气状况。 - 支持摄氏 / 华氏温度单位。 - 无需 API key;数据来源:[Open-Meteo](https://open-meteo.com/)。 ## 安装 ### 从 GitHub 安装 ```sh dsh plugin --profile web add "github:sunshine-lang/dsh-weather" ``` 然后重启 `dsh --profile web`。`lib/` 已预构建并提交,安装无需构建权限。 ### 从 npm 安装 ```sh dsh plugin --profile web add dsh-weather ``` ### 从本地源码安装(开发) ```sh dsh plugin --profile web add ./dsh-weather ``` > 注意:pnpm 对 `link:` 方式的本地依赖不会自动安装其依赖,需要手动添加到 profile(通过 registry 或 GitHub 安装则会自动处理): > > ```sh > dsh plugin --profile web add @deepseek-ai/dsh-tools @deepseek-ai/cordis @deepseek-ai/schemastery > ``` ### 验证 ```sh dsh --profile web --dump-config # 应能看到 "# == dsh-weather" 层 ``` ## 使用方法 启动 Web UI 后,向模型提问,例如: > 上海现在天气怎么样? > > 查一下东京的天气,用华氏度,并给出 3 天预报。 模型会调用 `get_weather`:参数 `location`(必填),可选 `units`(`celsius` | `fahrenheit`)和 `days`(1–7)。 ## 配置 可通过 `cordis.patch.yml` 或 profile 的 patch 层覆盖任意配置项: ```yaml - patch: - id: dsh-weather config: defaultUnits: fahrenheit timeoutMs: 15000 maxForecastDays: 5 ``` | 配置项 | 默认值 | 含义 | | --- | --- | --- | | `defaultUnits` | `celsius` | 模型未传 `units` 时使用的温度单位 | | `timeoutMs` | `1000

阅读完整 README仓库许可: MIT

dsh-weather DSH 插件常见问题

如何安装 dsh-weather 插件?

可以通过命令 `dsh plugin --profile web add github:sunshine-lang/dsh-weather` 或 `dsh plugin --profile web add dsh-weather`(从 npm 安装)来安装。安装后重启 DSH Web UI(`dsh --profile web`)即可生效。

使用这个插件需要 API key 吗?

不需要。插件使用 Open-Meteo API,完全免费且无需 API key 或注册。安装后即可直接查询天气。

如何将默认温度单位改为华氏度?

可以通过修改插件配置实现。在你的 `cordis.patch.yml` 或 profile 的 patch 层中添加如下内容:`- patch: [id: dsh-weather, config: {defaultUnits: fahrenheit}]`,然后重启 Web UI。

能查询任意城市未来 7 天的天气预报吗?

可以。你可以在提问时指定 `days` 参数(1–7),插件会返回对应天数的预报。默认最大天数为 7,可通过 `maxForecastDays` 配置调整。实际预报可用性取决于 Open-Meteo 对该城市的数据覆盖。

查询天气时出现错误怎么办?

如果插件因配置无效加载失败,会显示可操作的错误信息。API 调用时可能因网络问题或超时(默认 10 秒)失败。请检查网络连接,并确保 Web UI profile 配置正确。