mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 05:27:59 +08:00
init: build minimum viable version
This commit is contained in:
15
channel/channel_factory.py
Normal file
15
channel/channel_factory.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
channel factory
|
||||
"""
|
||||
|
||||
from channel.wechat.wechat_channel import WechatChannel
|
||||
|
||||
def create_channel(channel_type):
|
||||
"""
|
||||
create a channel instance
|
||||
:param channel_type: channel type code
|
||||
:return: channel instance
|
||||
"""
|
||||
if channel_type == 'wx':
|
||||
return WechatChannel()
|
||||
raise RuntimeError
|
||||
Reference in New Issue
Block a user