Browse Source

fix: model import isolation

master
zhayujie 1 year ago
parent
commit
bca0939c9d
2 changed files with 3 additions and 5 deletions
  1. +1
    -1
      README.md
  2. +2
    -4
      channel/channel_factory.py

+ 1
- 1
README.md View File

@@ -13,7 +13,7 @@




# 更新日志 # 更新日志
>**2023.02.20:** 支持 [python-wechaty](https://github.com/wechaty/python-wechaty) Pad协议相对稳定,不易封号,但Token收费,可申请七天体验Token
>**2023.02.20:** 增加 [python-wechaty](https://github.com/wechaty/python-wechaty) 支持,Pad协议相对稳定,不易封号,但Token收费,可申请七天体验Token (使用参考[#244](https://github.com/zhayujie/chatgpt-on-wechat/pull/244),contributed by [ZQ7](https://github.com/ZQ7))


>**2023.02.09:** 扫码登录存在封号风险,请谨慎使用,参考[#58](https://github.com/AutumnWhj/ChatGPT-wechat-bot/issues/158) >**2023.02.09:** 扫码登录存在封号风险,请谨慎使用,参考[#58](https://github.com/AutumnWhj/ChatGPT-wechat-bot/issues/158)




+ 2
- 4
channel/channel_factory.py View File

@@ -2,10 +2,6 @@
channel factory channel factory
""" """


from channel.wechat.wechat_channel import WechatChannel
from channel.wechat.wechaty_channel import WechatyChannel


def create_channel(channel_type): def create_channel(channel_type):
""" """
create a channel instance create a channel instance
@@ -13,7 +9,9 @@ def create_channel(channel_type):
:return: channel instance :return: channel instance
""" """
if channel_type == 'wx': if channel_type == 'wx':
from channel.wechat.wechat_channel import WechatChannel
return WechatChannel() return WechatChannel()
elif channel_type == 'wxy': elif channel_type == 'wxy':
from channel.wechat.wechaty_channel import WechatyChannel
return WechatyChannel() return WechatyChannel()
raise RuntimeError raise RuntimeError

Loading…
Cancel
Save