<!-- markdownlint-disable MD033 MD036 MD041 -->
<div align="center">
<a href="https://v2.nonebot.dev/store">
<img src="https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo">
</a>
<p>
<img src="https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/template/plugin.svg" alt="NoneBotPluginText">
</p>
# nonebot-plugin-githubmodels
_✨ 一个调用 GitHub Models 的 AI 对话插件 ✨_



[](https://registry.nonebot.dev/plugin/nonebot-plugin-githubmodels:nonebot_plugin_githubmodels)
[](https://registry.nonebot.dev/plugin/nonebot-plugin-alconna:nonebot_plugin_alconna)
</div>
## 安装
使用nb-cli [推荐]
```shell
nb plugin install nonebot-plugin-githubmodels
```
使用pip
```shell
pip install nonebot-plugin-githubmodels
```
## 使用
命令需要加 [NoneBot 命令前缀](https://nonebot.dev/docs/appendices/config#command-start-和-command-separator) (默认为`/`)
使用命令`AI`/`ai`触发插件
命令选项`-r` 重置上下文记忆
命令选项`-i` 临时启用图片回复
## 配置项
配置方式:直接在 NoneBot 全局配置文件中添加以下配置项即可
### github_token [必填]
- 类型:`str`
- 默认值:`None`
- 说明:用于访问 GitHub Models 的 GitHub token
### max_context_length [选填]
- 类型:`int`
- 默认值:`20`
- 说明:记忆的上下文数量的最大值
### ai_reply_image [选填]
- 类型: `bool`
- 默认: `False`
- 说明: 是否以图片的形式回复
### ai_model_name [选填]
- 类型: `str`
- 默认: `gpt-4o-mini`
- 说明: 所使用的模型
### ai_temperature [选填]
- 类型: `float`
- 默认: `1.0`
- 说明: 生成的文本的多样性和连贯性
### ai_max_tokens [选填]
- 类型: `int`
- 默认: `1024`
- 说明: 模型生成文本的字数
## ai_top_p [选填]
- 类型: `float`
- 默认: `1.0`
- 说明: 生成文本随机性
Raw data
{
"_id": null,
"home_page": "https://github.com/lyqgzbl/nonebot-plugin-githubmodels",
"name": "nonebot-plugin-githubmodels",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "nonebot2, GitHub Models",
"author": "lyqgzbl",
"author_email": "admin@lyqgzbl.com",
"download_url": "https://files.pythonhosted.org/packages/12/6a/2337715b1f768ebed3ca9130edef21d857216b5292427c361b66c87e1699/nonebot_plugin_githubmodels-0.2.8.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable MD033 MD036 MD041 -->\n\n<div align=\"center\">\n\n<a href=\"https://v2.nonebot.dev/store\">\n <img src=\"https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\">\n</a>\n\n<p>\n <img src=\"https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/template/plugin.svg\" alt=\"NoneBotPluginText\">\n</p>\n\n# nonebot-plugin-githubmodels\n\n_\u2728 \u4e00\u4e2a\u8c03\u7528 GitHub Models \u7684 AI \u5bf9\u8bdd\u63d2\u4ef6 \u2728_\n\n\n\n \n[](https://registry.nonebot.dev/plugin/nonebot-plugin-githubmodels:nonebot_plugin_githubmodels)\n[](https://registry.nonebot.dev/plugin/nonebot-plugin-alconna:nonebot_plugin_alconna)\n\n</div>\n\n## \u5b89\u88c5\n\u4f7f\u7528nb-cli [\u63a8\u8350]\n```shell\nnb plugin install nonebot-plugin-githubmodels\n```\n\u4f7f\u7528pip\n```shell\npip install nonebot-plugin-githubmodels\n```\n\n## \u4f7f\u7528\n\u547d\u4ee4\u9700\u8981\u52a0 [NoneBot \u547d\u4ee4\u524d\u7f00](https://nonebot.dev/docs/appendices/config#command-start-\u548c-command-separator) (\u9ed8\u8ba4\u4e3a`/`) \n\u4f7f\u7528\u547d\u4ee4`AI`/`ai`\u89e6\u53d1\u63d2\u4ef6 \n\u547d\u4ee4\u9009\u9879`-r` \u91cd\u7f6e\u4e0a\u4e0b\u6587\u8bb0\u5fc6 \n\u547d\u4ee4\u9009\u9879`-i` \u4e34\u65f6\u542f\u7528\u56fe\u7247\u56de\u590d \n\n## \u914d\u7f6e\u9879\n\n\u914d\u7f6e\u65b9\u5f0f\uff1a\u76f4\u63a5\u5728 NoneBot \u5168\u5c40\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\u9879\u5373\u53ef\n\n### github_token [\u5fc5\u586b]\n\n- \u7c7b\u578b\uff1a`str`\n- \u9ed8\u8ba4\u503c\uff1a`None`\n- \u8bf4\u660e\uff1a\u7528\u4e8e\u8bbf\u95ee GitHub Models \u7684 GitHub token\n\n### max_context_length [\u9009\u586b]\n\n- \u7c7b\u578b\uff1a`int`\n- \u9ed8\u8ba4\u503c\uff1a`20`\n- \u8bf4\u660e\uff1a\u8bb0\u5fc6\u7684\u4e0a\u4e0b\u6587\u6570\u91cf\u7684\u6700\u5927\u503c\n\n### ai_reply_image [\u9009\u586b]\n\n\n- \u7c7b\u578b: `bool`\n- \u9ed8\u8ba4: `False`\n- \u8bf4\u660e: \u662f\u5426\u4ee5\u56fe\u7247\u7684\u5f62\u5f0f\u56de\u590d\n\n### ai_model_name [\u9009\u586b]\n\n- \u7c7b\u578b: `str`\n- \u9ed8\u8ba4: `gpt-4o-mini`\n- \u8bf4\u660e: \u6240\u4f7f\u7528\u7684\u6a21\u578b\n\n### ai_temperature [\u9009\u586b]\n\n- \u7c7b\u578b: `float`\n- \u9ed8\u8ba4: `1.0`\n- \u8bf4\u660e: \u751f\u6210\u7684\u6587\u672c\u7684\u591a\u6837\u6027\u548c\u8fde\u8d2f\u6027\n\n### ai_max_tokens [\u9009\u586b]\n\n- \u7c7b\u578b: `int`\n- \u9ed8\u8ba4: `1024`\n- \u8bf4\u660e: \u6a21\u578b\u751f\u6210\u6587\u672c\u7684\u5b57\u6570\n\n## ai_top_p [\u9009\u586b]\n\n- \u7c7b\u578b: `float`\n- \u9ed8\u8ba4: `1.0`\n- \u8bf4\u660e: \u751f\u6210\u6587\u672c\u968f\u673a\u6027",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u4e00\u4e2a\u8c03\u7528 GitHub Models \u7684 AI \u5bf9\u8bdd\u63d2\u4ef6",
"version": "0.2.8",
"project_urls": {
"Documentation": "https://github.com/lyqgzbl/nonebot-plugin-githubmodels#readme",
"Homepage": "https://github.com/lyqgzbl/nonebot-plugin-githubmodels",
"Repository": "https://github.com/lyqgzbl/nonebot-plugin-githubmodels"
},
"split_keywords": [
"nonebot2",
" github models"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "14c82fbc6d996f07a5864cfbd3aaae1f73f3fcfb4bae3529e2168ab536e9d355",
"md5": "a79cce747909a89d360b8b7829df4d98",
"sha256": "aab4e891480edd3ae51c8ac66b07cbbd4cb098670ec291a18a5437a631af9088"
},
"downloads": -1,
"filename": "nonebot_plugin_githubmodels-0.2.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a79cce747909a89d360b8b7829df4d98",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 7775,
"upload_time": "2025-01-29T01:58:23",
"upload_time_iso_8601": "2025-01-29T01:58:23.239472Z",
"url": "https://files.pythonhosted.org/packages/14/c8/2fbc6d996f07a5864cfbd3aaae1f73f3fcfb4bae3529e2168ab536e9d355/nonebot_plugin_githubmodels-0.2.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "126a2337715b1f768ebed3ca9130edef21d857216b5292427c361b66c87e1699",
"md5": "678b4d65e8ddd31376b05bef1bece8d5",
"sha256": "43c99140c4b528b4b27c9715d3c6ba36722ac7cde37ab559ea58139108b2d545"
},
"downloads": -1,
"filename": "nonebot_plugin_githubmodels-0.2.8.tar.gz",
"has_sig": false,
"md5_digest": "678b4d65e8ddd31376b05bef1bece8d5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 5509,
"upload_time": "2025-01-29T01:58:25",
"upload_time_iso_8601": "2025-01-29T01:58:25.639144Z",
"url": "https://files.pythonhosted.org/packages/12/6a/2337715b1f768ebed3ca9130edef21d857216b5292427c361b66c87e1699/nonebot_plugin_githubmodels-0.2.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-29 01:58:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lyqgzbl",
"github_project": "nonebot-plugin-githubmodels",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "nonebot-plugin-githubmodels"
}