From 3001ba92668bc642aac115d3221dc9f902ab3461 Mon Sep 17 00:00:00 2001 From: lanvent Date: Fri, 28 Apr 2023 11:06:17 +0800 Subject: [PATCH] fix: azure dalle generate image --- bot/chatgpt/chat_gpt_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/chatgpt/chat_gpt_bot.py b/bot/chatgpt/chat_gpt_bot.py index c35d711..b46751a 100644 --- a/bot/chatgpt/chat_gpt_bot.py +++ b/bot/chatgpt/chat_gpt_bot.py @@ -174,7 +174,7 @@ class AzureChatGPTBot(ChatGPTBot): time.sleep(int(retry_after)) response = requests.get(operation_location, headers=headers) status = response.json()["status"] - image_url = response.json()["result"]["contentUrl"] + image_url = response.json()["result"]["contentUrl"] return True, image_url except Exception as e: logger.error("create image error: {}".format(e))