mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-02-06 07:52:24 +08:00
增加群组语言功能
This commit is contained in:
6
app.py
6
app.py
@@ -1,6 +1,6 @@
|
||||
# encoding:utf-8
|
||||
|
||||
import config
|
||||
from config import conf, load_config
|
||||
from channel import channel_factory
|
||||
from common.log import logger
|
||||
|
||||
@@ -9,10 +9,10 @@ from plugins import *
|
||||
def run():
|
||||
try:
|
||||
# load config
|
||||
config.load_config()
|
||||
load_config()
|
||||
|
||||
# create channel
|
||||
channel_name='wx'
|
||||
channel_name=conf().get('channel_type', 'wx')
|
||||
channel = channel_factory.create_channel(channel_name)
|
||||
if channel_name=='wx':
|
||||
PluginManager().load_plugins()
|
||||
|
||||
@@ -6,9 +6,9 @@ from common import const
|
||||
|
||||
def create_bot(bot_type):
|
||||
"""
|
||||
create a channel instance
|
||||
:param channel_type: channel type code
|
||||
:return: channel instance
|
||||
create a bot_type instance
|
||||
:param bot_type: bot type code
|
||||
:return: bot instance
|
||||
"""
|
||||
if bot_type == const.BAIDU:
|
||||
# Baidu Unit对话接口
|
||||
|
||||
Reference in New Issue
Block a user