Skip to main content

适用于 Nonebot2 的AI画画插件(对接文心大模型API)

Project description

nonebot-plugin-drawer

基于文心大模型的AI机器人画画插件。

前提: nonebot2的部署

这里推荐两篇机器人部署教程
1.https://blog.csdn.net/weixin_47113651/article/details/121353191
2.https://zhuanlan.zhihu.com/p/371264976

通过nb-cli安装(推荐)

nb plugin install nonebot-plugin-drawer

通过pip安装

1.pip install nonebot-plugin-drawer 进行安装  
2.在bot.py添加nonebot.load_plugin('nonebot_plugin_drawer')

配置env.*

请在env.*配置文件中加入如下两行

wenxin_ak = "xxxxxxxxxxxxxxxx"
wenxin_sk = "xxxxxxxxxxxxxxxx"
wenxin_cd_time = 300 # 技能冷却时间,以秒为单位
wenxin_image_count = 3 # 画画的图片数量
wenxin_manager_list = ["123456789", "98765432"] # 管理员列表(不触发冷却时间限制)

文心的ak和sk申请链接:https://wenxin.baidu.com/younger/apiDetail?id=20008

使用方法(仅支持群聊)

触发菜单命令:画画帮助 当前支持油画、水彩画、卡通画、粉笔画、儿童画、蜡笔画, 主要擅长风景写意画,请尽量给定比较明确的意象
如:油画 江上落日与晚霞

3a83453d5d28d1eedf0a0ddb5c90d29
油画 江上落日与晚霞

8887badee1c74c8488b613e4ceb83c2
油画 思乡

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot-plugin-drawer-0.4.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_drawer-0.4.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file nonebot-plugin-drawer-0.4.0.tar.gz.

File metadata

  • Download URL: nonebot-plugin-drawer-0.4.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.9 Windows/10

File hashes

Hashes for nonebot-plugin-drawer-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3c444ee0e4a13dafba04d867daeb3c2fece40befa4c3f9aa58537f8bc3362959
MD5 4e782330c4b166b5b1d302149de19c5e
BLAKE2b-256 879c7d20b870d0dfd51f87523189ab58699319e1d19df89d954df5a8c73bf5e4

See more details on using hashes here.

File details

Details for the file nonebot_plugin_drawer-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_drawer-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48fe911e2fbf0ae0ec16035b316f2bb52506b75174d164cf7a8053dd87348f15
MD5 43de9ec000a64390e140dc5aff8ed945
BLAKE2b-256 dc557a5732f8ea2d583c39b29c97db2f2c6dfdacaafd189bb07fc909ac76e728

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page