wechatgpt3.5_demo / channel /channel_factory.py
lewisliuX123's picture
Duplicate from lewisliuX123/wechatgpt35
dbf8df0
raw
history blame contribute delete
455 Bytes
"""
channel factory
"""
def create_channel(channel_type):
"""
create a channel instance
:param channel_type: channel type code
:return: channel instance
"""
if channel_type == 'wx':
from channel.wechat.wechat_channel import WechatChannel
return WechatChannel()
elif channel_type == 'wxy':
from channel.wechat.wechaty_channel import WechatyChannel
return WechatyChannel()
raise RuntimeError