Pārlūkot izejas kodu

fix: support gpt-image-1 with correct parameter

杨方亮 11 mēneši atpakaļ
vecāks
revīzija
9cc00afc6b
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      backend/open_webui/routers/images.py

+ 2 - 2
backend/open_webui/routers/images.py

@@ -501,9 +501,9 @@ async def image_generations(
                     else request.app.state.config.IMAGE_SIZE
                 ),
                 **(
-                    {"response_format": "b64_json"}
+                    {}
                     if "gpt-image-1" in request.app.state.config.IMAGE_GENERATION_MODEL
-                    else {}
+                    else {"response_format": "b64_json"}
                 ),
             }