NoneBot 集成 GitHub Copilot 和 OpenAI 的 AI 代码生成模型插件
Project description
安装
使用nb-cli [推荐]
nb plugin install nonebot-plugin-githubmodels
使用pip
pip install nonebot-plugin-githubmodels
使用
命令需要加 NoneBot 命令前缀 (默认为/)
使用命令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 - 默认:
openai/gpt-4.1-mini - 说明: 所使用的模型
ai_temperature [选填]
- 类型:
float - 默认:
1.0 - 说明: 生成的文本的多样性和连贯性
ai_top_p [选填]
- 类型:
float - 默认:
1.0 - 说明: 生成文本随机性
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_githubmodels-1.0.1.tar.gz.
File metadata
- Download URL: nonebot_plugin_githubmodels-1.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5fce11e6b71ab9f3115be328fb05e7d0f6e489b73f7fae7bfbde77a9cb4178e
|
|
| MD5 |
23d59498709c0fb053349577af085a6b
|
|
| BLAKE2b-256 |
b5bc9addcf59a73565be0d34e175393745fcf5adb3a6639b9faf506ec6d4b79d
|
File details
Details for the file nonebot_plugin_githubmodels-1.0.1-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_githubmodels-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36bf1b6d066a5063f9525e5100e8739daade23aafa5e0d198e25d7b9cf2350ef
|
|
| MD5 |
ebc4a66ed15b9245d96e2910e1137719
|
|
| BLAKE2b-256 |
f5edab25eacc3c683ea7f64511e3084dfead6e67333d498771ee58f8a1471283
|