# 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!
Raw data
{
"_id": null,
"home_page": null,
"name": "nonebot_plugin_suggarex_cf",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "chat\", \"suggar\", \"nonebot",
"author": null,
"author_email": "JohnRichard4096 <windowserror@163.com>",
"download_url": "https://files.pythonhosted.org/packages/e7/b3/82ad7e47c0040b796ee7e63121a02871af6be8e40cedf4d0d8c30a9a95b2/nonebot_plugin_suggarex_cf-1.1.5.tar.gz",
"platform": null,
"description": "# nonebot_plugin_suggarex_cf\n\nCloudflare Workers AI \u534f\u8bae\u9002\u914d\u5668\uff0c\u7528\u4e8e [SuggarChat](https://github.com/LiteSuggarDEV/nonebot_plugin_suggarchat)\n\n> \u4e3a SuggarChat \u63d0\u4f9b Cloudflare Workers AI \u63a5\u5165\u652f\u6301\n\n## \ud83d\udce6 \u5b89\u88c5\n\n\u63d0\u4f9b\u4e24\u79cd\u5b89\u88c5\u65b9\u5f0f\uff1a\n\n- \u65b9\u6cd5\u4e00\uff08\u63a8\u8350\uff09\uff1a\n\n ```bash\n nb plugin install nonebot-plugin-suggarex-cf\n ```\n\n- \u65b9\u6cd5\u4e8c\uff08\u624b\u52a8\u5b89\u88c5\uff09\uff1a\n\n ```bash\n pip install nonebot_plugin_suggarex_cf\n ```\n\n \u82e5\u4f7f\u7528\u65b9\u6cd5\u4e8c\uff0c\u8fd8\u9700\u5728 `pyproject.toml` \u4e2d\u624b\u52a8\u6dfb\u52a0\u63d2\u4ef6\u540d\uff1a\n\n ```toml\n plugins = [\"nonebot_plugin_suggarex_cf\"]\n ```\n\n## \u2699\ufe0f \u914d\u7f6e\n\n\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u65b0\u589e\u4e86\u4ee5\u4e0b\u5b57\u6bb5\uff1a\n\n| \u914d\u7f6e\u9879 | \u8bf4\u660e | \u9ed8\u8ba4\u503c |\n| ------------ | ------------------------------------------------------------------------------------------------------------- | ------ |\n| `cf_user_id` | Cloudflare Workers AI \u7528\u6237 ID\uff0c\u8bf7\u524d\u5f80 [Workers AI \u63a7\u5236\u53f0](https://developers.cloudflare.com/workers-ai/) \u83b7\u53d6 | `null` |\n\n---\n\n## \ud83d\ude80 \u4f7f\u7528\u8bf4\u660e\n\n\u5c06 Suggar \u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 `protocol` \u5b57\u6bb5\u8bbe\u4e3a\uff1a\n\n```toml\nprotocol = \"cf\"\n```\n\n\u5e76\u914d\u7f6e\u597d `token` \u4e0e\u6a21\u578b\u540d\u79f0\u3002\u6a21\u578b\u5b57\u6bb5\u586b\u5199 Cloudflare Workers AI \u7684\u6587\u672c\u751f\u6210\u6a21\u578b ID\uff0c\u4f8b\u5982\uff1a\n\n```toml\nmodel = \"llama-3.2-xxxx\"\n```\n\n\u65e0\u9700\u4f7f\u7528 `@` \u8fdb\u884c\u62fc\u63a5\u3002\u5177\u4f53\u53c2\u6570\u4e0e\u683c\u5f0f\u8bf7\u53c2\u8003 [SuggarChat \u5b98\u65b9\u6587\u6863](https://github.com/LiteSuggarDEV/nonebot_plugin_suggarchat)\u3002\n\n---\n\n\u5982\u679c\u4f60\u6709\u4efb\u4f55\u5efa\u8bae\u6216\u95ee\u9898\uff0c\u6b22\u8fce\u63d0 Issue \u6216 PR\uff01\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "\u9002\u7528\u4e8eSuggarChat\u63d2\u4ef6\u7684CloudFlare\u534f\u8bae\u9002\u914d\u5668\u5b9e\u73b0\uff0cSuggarChat\u9644\u5c5e\u63d2\u4ef6",
"version": "1.1.5",
"project_urls": {
"Homepage": "https://github.com/LiteSuggarDEV/nonebot_plugin_suggarex_cf",
"Issue Tracker": "https://github.com/LiteSuggarDEV/nonebot_plugin_suggarex_cf/issues",
"Source": "https://github.com/LiteSuggarDEV/nonebot_plugin_suggarex_cf"
},
"split_keywords": [
"chat\"",
" \"suggar\"",
" \"nonebot"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e3758225bd0f8740a0e2c020ab16babfea6793a4760a613dca8c6e98acecdf3d",
"md5": "8063d090f00c44c3e410f6f7c452f341",
"sha256": "1fd438bac2f0a6ea890843ae762e330fa85dac263e97c6a883fa0b8b328f79a9"
},
"downloads": -1,
"filename": "nonebot_plugin_suggarex_cf-1.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8063d090f00c44c3e410f6f7c452f341",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 16335,
"upload_time": "2025-07-29T03:50:17",
"upload_time_iso_8601": "2025-07-29T03:50:17.480318Z",
"url": "https://files.pythonhosted.org/packages/e3/75/8225bd0f8740a0e2c020ab16babfea6793a4760a613dca8c6e98acecdf3d/nonebot_plugin_suggarex_cf-1.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e7b382ad7e47c0040b796ee7e63121a02871af6be8e40cedf4d0d8c30a9a95b2",
"md5": "ec2f3588352272e73dd28925c6060091",
"sha256": "cc54cb7e965fe6b835b039e64ac4e623da1108fec5d28d53cfc195066b903c91"
},
"downloads": -1,
"filename": "nonebot_plugin_suggarex_cf-1.1.5.tar.gz",
"has_sig": false,
"md5_digest": "ec2f3588352272e73dd28925c6060091",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 16220,
"upload_time": "2025-07-29T03:50:18",
"upload_time_iso_8601": "2025-07-29T03:50:18.370731Z",
"url": "https://files.pythonhosted.org/packages/e7/b3/82ad7e47c0040b796ee7e63121a02871af6be8e40cedf4d0d8c30a9a95b2/nonebot_plugin_suggarex_cf-1.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-29 03:50:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LiteSuggarDEV",
"github_project": "nonebot_plugin_suggarex_cf",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot_plugin_suggarex_cf"
}