فهرست منبع

style: fix formatting issues

Andreas Fuerer 1 ماه پیش
والد
کامیت
df0d29c81c
2فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 5 3
      backend/open_webui/routers/images.py
  2. 1 1
      src/lib/components/admin/Settings/Images.svelte

+ 5 - 3
backend/open_webui/routers/images.py

@@ -549,10 +549,12 @@ async def image_generations(
                     else {"response_format": "b64_json"}
                 ),
             }
-            
+
             api_version_query_param = ""
-            if (request.app.state.config.IMAGES_OPENAI_API_VERSION):
-                api_version_query_param = f"?api-version={request.app.state.config.IMAGES_OPENAI_API_VERSION}"
+            if request.app.state.config.IMAGES_OPENAI_API_VERSION:
+                api_version_query_param = (
+                    f"?api-version={request.app.state.config.IMAGES_OPENAI_API_VERSION}"
+                )
 
             # Use asyncio.to_thread for the requests.post call
             r = await asyncio.to_thread(

+ 1 - 1
src/lib/components/admin/Settings/Images.svelte

@@ -624,7 +624,7 @@
 							</div>
 						</div>
 					</div>
-					
+
 					<div>
 						<div class=" mb-2 text-sm font-medium">{$i18n.t('API Version')}</div>
 						<div class="flex w-full">