Explorar o código

fix: azure dalle generate image

lanvent %!s(int64=2) %!d(string=hai) anos
pai
achega
3001ba9266
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      bot/chatgpt/chat_gpt_bot.py

+ 1 - 1
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))