最新情报
网站 api 更新,已适配。 2025/02/20
前两天网站抽风,现已恢复正常。2023/08/25
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-anime-trace
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip install nonebot-plugin-anime-trace
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot-plugin-anime-trace"]
🎉 使用
默认配置下
命令: {#} {识别|角色|人物|} [gal|动漫]
说明:命令符不是命令头,只要包含命令符和命令关键字就会触发响应,例如“foo 识别 foo#foo”也可以触发
大括号内{}为必要关键字, 中括号内[]为可选参数, 默认使用动漫模型
附带一张图片、或回复一张图片、或再发送一张图片
可以自定义命令符、命令关键字
示例:
⚙️ 配置
如果需要自定义配置,请在 nonebot2 项目的.env文件中添加配置
class Config(BaseModel):
# 是否合并转发消息
animetrace_send_forward: bool = True
# 是否检测ai图
animetrace_ai_detect: bool = True
# 是否拆分每个识别结果:角色,作品,链接
animetrace_extract: bool = True
# 是否发送萌娘百科链接
animetrace_moegirl: bool = False
# 自定义搜索链接, 设置为空""则取消
animetrace_url: str = "zh.wikipedia.org/w/index.php?search="
# 命令符
animetrace_cmd: str = "#"
# 命令关键字
animetrace_keyword: set[str] = {"识别", "角色", "人物"}
# 响应优先级
animetrace_priority: int = 10
# 动漫模型
animetrace_model_anime: str = "anime_model_lovelive"
# galgame模型
animetrace_model_gal: str = "full_game_model_kira"
# 一个角色最多返回几个识别结果
animetrace_max_num: int = 3
# bot昵称
nickname: list[str] = ["anime trace"]
动漫模型和 galgame 模型请前往 ai.animedb.cn查看
常见问题 Q&A
没有识别到任何角色
网站没有识别到该图中的角色
出错啦~可能是图里角色太多了 content:{code:-1}
网站处理图片出错,可能是图中角色过多、或者网站后端挂了,可以尝试裁剪图片
识别失败,换张图片试试吧~<Response [504 Gateway Time-out]>
网站接收图片出错,可能是图中角色过多、或者网站后端挂了,可以尝试裁剪图片
其他
请先去ai.animedb.cn尝试能否识别,若能识别,联系我更新;若不能识别,等待站长修复
TODO
- 增加 ai 绘图鉴别
- 添加结果图片对比
- 跨平台兼容
跨平台兼容
合并转发消息
send_group_forward_msg
字段 类型 说明 group_id uint 群号 messages List[Node] 自定义转发消息
Node
字段 类型 说明 uin string QQ 号 name string 昵称 content List[OneBotSegment] / OneBotSegment 消息内容
send_private_forward_msg
字段 类型 说明 user_id uint 好友 QQ 号 messages List[Node] 自定义转发消息
赞助
救救 developer,孩子吃不起饭了
Metadata
Release files for nonebot-plugin-anime-trace 0.2.3
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_anime_trace-0.2.3.tar.gz | 7.4 kB | Without provenance | Details for nonebot_plugin_anime_trace-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_anime_trace-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_anime_trace-0.2.3-py3-none-any.whl |
Total release size: 17.4 kB
Release files / nonebot_plugin_anime_trace-0.2.3.tar.gz
| Download URL | nonebot_plugin_anime_trace-0.2.3.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e8ca6133284be6b092a8f36030efcce27cd90ea1cb621ee49e7de6a7afe9555
|
|
BLAKE2b-256 checksum How to use checksums |
1e4bcfb3e54f5dfd51f69a6d237f176a94ef53c113e4961ec227581dd91c609e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / nonebot_plugin_anime_trace-0.2.3-py3-none-any.whl
| Download URL | nonebot_plugin_anime_trace-0.2.3-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d966707b4fde71859a0daf01abfac17415c7e0f2c2d5a02e23e3d785315af53c
|
|
BLAKE2b-256 checksum How to use checksums |
66217c51210cc1066dcbbb6f866fb6e078b2a330bc873eed47a014744972c684
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Security for nonebot-plugin-anime-trace 0.2.3
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.