feat: 增加moonshot api集成

moonshot本来可直接使用openai sdk,
但是要求openai sdk必须在1.0以上,与本项目冲突,
故现使用http接口对接的方式集成
This commit is contained in:
weishao zeng
2024-03-27 15:02:51 +08:00
parent b8cc62ae95
commit 38e1db7a37
5 changed files with 203 additions and 0 deletions

View File

@@ -59,5 +59,9 @@ def create_bot(bot_type):
from bot.zhipuai.zhipuai_bot import ZHIPUAIBot
return ZHIPUAIBot()
elif bot_type == const.MOONSHOT:
from bot.moonshot.moonshot_bot import MoonshotBot
return MoonshotBot()
raise RuntimeError