Skip to main content
NoneBotPluginLogo

NoneBotPluginText

Nonebot-Plugin-NaiLongMagic

✨ 一个基于 AI 模型的简单插件~ ✨

python pdm-managed
Pydantic Version 1 Or 2 license pypi pypi download
NoneBot Registry Supported Adapters

📖 介绍

声明

本插件仅供娱乐和学习交流。本插件仅供娱乐和学习交流。目前1.x版本仍处于内测阶段,生成图片可能并不理想,如有BUG等问题随时欢迎进群反馈。

简介

世界就是一个巨大的奶龙~

技术

基于StableDiffusion模型,通过Lora微调训练而来

安装

以下提到的方法 任选其一 即可

[推荐] 使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-nailongmagic
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-nailongmagic
pdm
pdm add nonebot-plugin-nailongmagic
poetry
poetry add nonebot-plugin-nailongmagic
conda
conda install nonebot-plugin-nailongmagic

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分的 plugins 项里追加写入

[tool.nonebot]
plugins = [
    # ...
    "nonebot_plugin_nailongmagic"
]

⚙️ 配置

在 nonebot2 项目的 .env 文件中添加下表中的必填配置

配置项 必填 默认值 说明
全局配置
PROXY 否 None 下载模型等文件时使用的代理地址
响应配置
NAILONGMAGIC_NEED_SUPERUSER 否 True 是否只处理超级用户发送的图片
NAILONGMAGIC_LIST_SCENES 否 [] 聊天场景 ID 黑白名单列表
在单级聊天下为该聊天 ID,如 QQ 群号;
在多级聊天下为以 _ 分割的各级聊天 ID,如频道下的子频道或频道下私聊
NAILONGMAGIC_BLACKLIST 否 True 是否使用黑名单模式
NAILONGMAGIC_USER_BLACKLIST 否 [] 用户 ID 黑名单列表
NAILONGMAGIC_PRIORITY 否 100 Matcher 优先级
模型配置
NAILONGMAGIC_TIP 否 ["奶龙已生成~{$checked_result}"] 发送的提示,使用 Alconna 的消息模板,可用变量见下,随机发送列表其中一条消息
NAILONGMAGIC_PROMPT 否 ["nailong"] 模型生成图片所使用的关键词
NAILONGMAGIC_CACHE_DIR 否 ./data/nailongmagic 模型的下载位置
NAILONGMAGIC_AUTO_UPDATE_MODEL 否 True 是否自动更新模型
NAILONGMAGIC_HF_TOKEN 否 None GitHub Access Token,遇到模型下载或更新问题时可尝试填写

消息模板可用变量

变量名 类型 说明
$event Event 当前事件
$target Target 事件目标
$message_id str 消息 ID
$msg UniMessage 当前消息
$ss Session 当前会话
$checked_result Image 模型生成的图片

🎉 使用

发送“变奶龙+[咒语(可选,即prompt)]+图片”,等待时间后,即可收到bot返回消息,例如:变奶龙nailong[图片],或者变奶龙[图片]

📞 联系

欢迎大家进群一起学习交流~

📝 更新日志

1.0.0

  • 创建了插件

Metadata

Release files for nonebot-plugin-nailongmagic 1.0.5.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-nailongmagic 1.0.5.post2
File Size Uploaded
nonebot_plugin_nailongmagic-1.0.5.post2.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-nailongmagic 1.0.5.post2
File Interpreter ABI Platform
nonebot_plugin_nailongmagic-1.0.5.post2-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / nonebot_plugin_nailongmagic-1.0.5.post2.tar.gz

Download URL nonebot_plugin_nailongmagic-1.0.5.post2.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0aab08b151513f36f0647e8bc1a8eef22b599217fc7e9a3644de6d06fc39bb0d
BLAKE2b-256 checksum
How to use checksums
80f6b8a97b7294ed95279b6ef9c0d98931cb8936d1510759cb523672e0c3d009
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2025.

Transparency log

Release files / nonebot_plugin_nailongmagic-1.0.5.post2-py3-none-any.whl

Download URL nonebot_plugin_nailongmagic-1.0.5.post2-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2c9c413c1bdb5ed453e2c66adf2fd2be764e26796252bc3bc1e727caa2e9bfa
BLAKE2b-256 checksum
How to use checksums
14d69778c62a396eef5553e0b7dac74c9f059e2499632f0a951b4ff26d768938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2025.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page