GithubHelp home page GithubHelp logo

angjustinl / nonebot_plugin_face2cartoonpic_main Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 114 KB

基于腾讯云合成图的以图绘图

License: GNU Affero General Public License v3.0

Python 100.00%
nonebot nonebot-plugin

nonebot_plugin_face2cartoonpic_main's Introduction

NoneBotPluginLogo

NoneBotPluginText

nonebot_plugin_face2cartoonpic

✨基于腾讯云合成图的以图绘图的Nonebot插件✨


license languages pypi python

💿 安装

1. nb-cli安装(推荐)

bot根目录下打开命令行,执行nb命令安装插件,插件配置会自动添加至配置文件

nb plugin install nonebot_plugin_face2cartoonpic

2. pip安装

pip install nonebot_plugin_face2cartoonpic --upgrade

打开 nonebot2 项目的 bot.py 文件, 在其中写入
nonebot.load_plugin('nonebot_plugin_face2cartoonpic')

或在bot路径pyproject.toml[tool.nonebot]plugins中添加nonebot_plugin_face2cartoonpic即可
pyproject.toml配置例如:

[tool.nonebot]
plugin_dirs = ["src/plugins"]
plugins = ["nonebot_plugin_face2cartoonpic","xxxxx"]

📖 配置


官方指南 https://cloud.tencent.com/document/product/1202/41796

先到腾讯云这里获取服务资源包 https://console.cloud.tencent.com/ft/resource

再去 https://console.cloud.tencent.com/cam/capi 的api密钥管理获取api密钥


bot根目录下.env文件

  
Secret_Id = ""这两个写从腾讯云获取的api密钥
  
Secret_Key = ""
  
FaceCartoonPic_cd_time = 60{int}默认60  
  

🎉 使用

指令表

指令 需要@ 范围 说明
人像变换 + 图片 群聊/私聊 对发送的图片启用模型, 支持回复图片

使用示例:

/人像变换 <图像>

注意

默认情况下, 您应该在指令前加上命令前缀, 通常是 /

nonebot_plugin_face2cartoonpic_main's People

Contributors

angjustinl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

nonebot_plugin_face2cartoonpic_main's Issues

文档错误

首先命令是人像变换
其次,在bot.py文件里的加载指令错了,你给加载到戒色打卡里了

key填入没错,还是提示画图失败,输入的不是人像(或api密钥错误)

key输入成功 证书签名如下 [b'6yght85z0XwoHq1hdS5jqJBeCAQ='] <Response [200]> 输入的不是人像 02-02 20:46:31 [ERROR] nonebot_plugin_face2cartoonpic | 画图失败,输入的不是人像(或api密钥错误) error2 02-02 20:46:32 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_face2cartoonpic) running complete
不知道哪里的问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.