Metadata-Version: 2.1
Name: nonebot_plugin_suggarex_cf
Version: 1.1.4.post3
Summary: 适用于SuggarChat插件的CloudFlare协议适配器实现，SuggarChat附属插件
Keywords: chat", "suggar", "nonebot
Author-Email: JohnRichard4096 <windowserror@163.com>
License: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/LiteSuggarDEV/nonebot_plugin_suggarex_cf
Project-URL: Source, https://github.com/LiteSuggarDEV/nonebot_plugin_suggarex_cf
Project-URL: Issue Tracker, https://github.com/LiteSuggarDEV/nonebot_plugin_suggarex_cf/issues
Requires-Python: <4.0,>=3.9
Requires-Dist: nonebot2>=2.2.0
Requires-Dist: nonebot-plugin-suggarchat>=2.1.0
Requires-Dist: nonebot-adapter-onebot>=2.0.0
Requires-Dist: aiohttp>=3.9.0
Description-Content-Type: text/markdown

# nonebot_plugin_suggarex_cf

Cloudflare Workers AI 协议适配器，用于 [SuggarChat](https://github.com/LiteSuggarDEV/nonebot_plugin_suggarchat)

> 为 SuggarChat 提供 Cloudflare Workers AI 接入支持

## 📦 安装

提供两种安装方式：

- 方法一（推荐）：

  ```bash
  nb plugin install nonebot-plugin-suggarex-cf
  ```

- 方法二（手动安装）：

  ```bash
  pip install nonebot_plugin_suggarex_cf
  ```

  若使用方法二，还需在 `pyproject.toml` 中手动添加插件名：

  ```toml
  plugins = ["nonebot_plugin_suggarex_cf"]
  ```

## ⚙️ 配置

在配置文件中新增了以下字段：

| 配置项       | 说明                                                                                                          | 默认值 |
| ------------ | ------------------------------------------------------------------------------------------------------------- | ------ |
| `cf_user_id` | Cloudflare Workers AI 用户 ID，请前往 [Workers AI 控制台](https://developers.cloudflare.com/workers-ai/) 获取 | `null` |

---

## 🚀 使用说明

将 Suggar 配置文件中的 `protocol` 字段设为：

```toml
protocol = "cf"
```

并配置好 `token` 与模型名称。模型字段填写 Cloudflare Workers AI 的文本生成模型 ID，例如：

```toml
model = "llama-3.2-xxxx"
```

无需使用 `@` 进行拼接。具体参数与格式请参考 [SuggarChat 官方文档](https://github.com/LiteSuggarDEV/nonebot_plugin_suggarchat)。

---

如果你有任何建议或问题，欢迎提 Issue 或 PR！
