mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-03-04 15:47:52 +08:00
init: build minimum viable version
This commit is contained in:
16
bot/bot_factory.py
Normal file
16
bot/bot_factory.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
channel factory
|
||||
"""
|
||||
|
||||
from bot.baidu.baidu_unit_bot import BaiduUnitBot
|
||||
|
||||
|
||||
def create_bot(bot_type):
|
||||
"""
|
||||
create a channel instance
|
||||
:param channel_type: channel type code
|
||||
:return: channel instance
|
||||
"""
|
||||
if bot_type == 'baidu':
|
||||
return BaiduUnitBot()
|
||||
raise RuntimeError
|
||||
Reference in New Issue
Block a user