mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 09:48:22 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cec674cb47 | ||
|
|
c5a90823fa |
@@ -72,13 +72,15 @@ def qrCallback(uuid,status,qrcode):
|
||||
if status == '0':
|
||||
import qrcode
|
||||
url = f"https://login.weixin.qq.com/l/{uuid}"
|
||||
|
||||
qr_api="https://api.isoyu.com/qr/?m=1&e=L&p=20&url={}".format(url)
|
||||
print("You can also scan QRCode in the website below:\n{}".format(qr_api))
|
||||
|
||||
qr = qrcode.QRCode(border=1)
|
||||
qr.add_data(url)
|
||||
qr.make(fit=True)
|
||||
qr.print_ascii(invert=True)
|
||||
|
||||
qr_api="https://api.isoyu.com/qr/?m=1&e=L&p=20&url={}".format(url)
|
||||
print("You can also scan QRCode in website below:\n{}".format(qr_api))
|
||||
@singleton
|
||||
class WechatChannel(ChatChannel):
|
||||
def __init__(self):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## 插件化初衷
|
||||
|
||||
之前未插件化的代码耦合程度高,如果要定制一些个性化功能(如流量控制、接入`NovelAI`画图平台等),需要了解代码主体,避免影响到其他的功能。在实现多个功能后,不但无法调整功能的优先级顺序,功能的配置项也会变得非常混乱。
|
||||
之前未插件化的代码耦合程度高,如果要定制一些个性化功能(如流量控制、接入`NovelAI`画图平台等),需要了解代码主体,避免影响到其他的功能。多个功能同时存在时,无法调整功能的优先级顺序,功能配置项也非常混乱。
|
||||
|
||||
此时插件化应声而出。
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
- [x] 插件化能够自由开关和调整优先级。
|
||||
- [x] 每个插件可在插件文件夹内维护独立的配置文件,方便代码的测试和调试,可以在独立的仓库开发插件。
|
||||
|
||||
PS: 插件目前仅支持`itchat`
|
||||
PS: 插件目前支持`itchat`和`wechaty`
|
||||
|
||||
## 插件化实现
|
||||
|
||||
|
||||
Reference in New Issue
Block a user