Support Azure hosted chatgpt service

This commit is contained in:
Pin Fang
2023-03-24 23:41:53 +08:00
parent ae06cf844d
commit 04fec4a585
6 changed files with 73 additions and 6 deletions

View File

@@ -24,4 +24,9 @@ def create_bot(bot_type):
# OpenAI 官方对话模型API
from bot.openai.open_ai_bot import OpenAIBot
return OpenAIBot()
elif bot_type == const.CHATGPTONAZURE:
# Azure chatgpt service https://azure.microsoft.com/en-in/products/cognitive-services/openai-service/
from bot.chatgpt.chat_gpt_bot import AzureChatGPTBot
return AzureChatGPTBot()
raise RuntimeError