NoneBot Plugin AkashGen
一个使用 Akash Network 为 NoneBot2 提供 AI 图像生成功能的插件。
功能
- 通过简单的命令调用 AI 进行画图。
- 支持自定义参数,如负面提示词、采样器和调度器。
- 内置速率限制和权限控制。
- 显示生成任务的详细信息(GPU、地理位置、耗时等)。
安装
通过 pip 或 nb-cli 安装:
pip install nonebot-plugin-akashgen
nb plugin install nonebot-plugin-akashgen
配置
在你的 NoneBot 项目的 .env 或 .env.* 文件中添加以下配置项:
# Akash Network API Base URL (默认为官方地址)
# AKASH_API_BASE_URL="https://gen.akash.network"
# 请求超时时间 (秒)
# AKASH_REQUEST_TIMEOUT=60
# 最大重试次数
# AKASH_MAX_RETRIES=3
# 任务状态轮询间隔 (秒)
# AKASH_POLL_INTERVAL=1.0
# 默认负面提示词
# AKASH_NEGATIVE_PROMPT=""
# 默认采样器
# AKASH_SAMPLER="dpmpp_2m"
# 默认调度器
# AKASH_SCHEDULER="sgm_uniform"
# 最大提示词长度
# AKASH_MAX_PROMPT_LENGTH=500
# 命令冷却时间 (秒)
# AKASH_COOLDOWN_SECONDS=30
# 是否显示队列信息
# AKASH_ENABLE_QUEUE_INFO=True
# 是否仅限超级用户使用
# AKASH_SUPERUSER_ONLY=False
# 允许使用的群组列表 (留空则不限制)
# AKASH_ALLOWED_GROUPS=[]
# 禁用用户列表
# AKASH_BLOCKED_USERS=[]
使用
/draw <描述>: 生成一张图片。/画图 <描述>:/draw的别名。
高级用法:
你可以在命令中使用参数来微调生成过程:
-n <负面提示词>: 指定不希望在图片中出现的内容。-s <采样器>: 指定使用的采样器。-c <调度器>: 指定使用的调度器。
示例:
/draw a beautiful sunset over the mountains/画图 一只可爱的猫/draw -n blurry,ugly -s dpmpp_sde a robot holding a flower
管理命令:
/draw_help: 显示帮助信息。/draw_status: (仅限超级用户) 显示插件的运行状态。
Metadata
Release files for nonebot-plugin-akashgen 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_akashgen-0.1.1.tar.gz | 21.2 kB | Without provenance | Details for nonebot_plugin_akashgen-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_akashgen-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_akashgen-0.1.1-py3-none-any.whl |
Total release size: 42.6 kB
Release files / nonebot_plugin_akashgen-0.1.1.tar.gz
| Download URL | nonebot_plugin_akashgen-0.1.1.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b24bfd9042395302074bc58342c9c6372a0537eccdc13d4c6a5faaa0c899c178
|
|
BLAKE2b-256 checksum How to use checksums |
a313cc0792222b987d9e019464d44d858e7d76c30a8475301ca64d2e9b3e7e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / nonebot_plugin_akashgen-0.1.1-py3-none-any.whl
| Download URL | nonebot_plugin_akashgen-0.1.1-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd376e19cab5bf7de7a453b3fdaf56dc5019240e841b1be1a77ced450cf61bca
|
|
BLAKE2b-256 checksum How to use checksums |
4f8e6abf7c9d56d40392716b11856e4e3e29a080ccd6b4db342aad72881c62df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for nonebot-plugin-akashgen 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.