You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 2 година
пре 2 година
пре 2 година
1234567891011121314151617181920212223242526
  1. """
  2. channel factory
  3. """
  4. def create_bot(bot_type):
  5. """
  6. create a channel instance
  7. :param channel_type: channel type code
  8. :return: channel instance
  9. """
  10. if bot_type == 'baidu':
  11. # Baidu Unit对话接口
  12. from bot.baidu.baidu_unit_bot import BaiduUnitBot
  13. return BaiduUnitBot()
  14. elif bot_type == 'chatGPT':
  15. # ChatGPT 网页端web接口
  16. from bot.chatgpt.chat_gpt_bot import ChatGPTBot
  17. return ChatGPTBot()
  18. elif bot_type == 'openAI':
  19. # OpenAI 官方对话模型API
  20. from bot.openai.open_ai_bot import OpenAIBot
  21. return OpenAIBot()
  22. raise RuntimeError