|
""" |
|
channel factory |
|
""" |
|
from common import const |
|
|
|
|
|
def create_bot(bot_type): |
|
""" |
|
create a bot_type instance |
|
:param bot_type: bot type code |
|
:return: bot instance |
|
""" |
|
if bot_type == const.BAIDU: |
|
|
|
|
|
|
|
from bot.baidu.baidu_wenxin import BaiduWenxinBot |
|
return BaiduWenxinBot() |
|
|
|
elif bot_type == const.CHATGPT: |
|
|
|
from bot.chatgpt.chat_gpt_bot import ChatGPTBot |
|
return ChatGPTBot() |
|
|
|
elif bot_type == const.OPEN_AI: |
|
|
|
from bot.openai.open_ai_bot import OpenAIBot |
|
return OpenAIBot() |
|
|
|
elif bot_type == const.CHATGPTONAZURE: |
|
|
|
from bot.chatgpt.chat_gpt_bot import AzureChatGPTBot |
|
return AzureChatGPTBot() |
|
|
|
elif bot_type == const.XUNFEI: |
|
from bot.xunfei.xunfei_spark_bot import XunFeiBot |
|
return XunFeiBot() |
|
|
|
elif bot_type == const.LINKAI: |
|
from bot.linkai.link_ai_bot import LinkAIBot |
|
return LinkAIBot() |
|
|
|
elif bot_type == const.CLAUDEAI: |
|
from bot.claude.claude_ai_bot import ClaudeAIBot |
|
return ClaudeAIBot() |
|
|
|
elif bot_type == const.QWEN: |
|
from bot.tongyi.tongyi_qwen_bot import TongyiQwenBot |
|
return TongyiQwenBot() |
|
raise RuntimeError |
|
|