Browse Source

Set get_config as the name of the function

Rodrigo Agundez 3 months ago
parent
commit
ac3338265d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      backend/open_webui/routers/images.py

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

@@ -34,7 +34,7 @@ router = APIRouter()
 
 
 
 
 @router.get("/config")
 @router.get("/config")
-async def get_def(request: Request, user=Depends(get_admin_user)):
+async def get_config(request: Request, user=Depends(get_admin_user)):
     return {
     return {
         "enabled": request.app.state.config.ENABLE_IMAGE_GENERATION,
         "enabled": request.app.state.config.ENABLE_IMAGE_GENERATION,
         "engine": request.app.state.config.IMAGE_GENERATION_ENGINE,
         "engine": request.app.state.config.IMAGE_GENERATION_ENGINE,
@@ -456,7 +456,7 @@ async def image_generations(
                 requests.post,
                 requests.post,
                 url=f"{request.app.state.config.IMAGES_OPENAI_API_BASE_URL}/images/generations",
                 url=f"{request.app.state.config.IMAGES_OPENAI_API_BASE_URL}/images/generations",
                 json=data,
                 json=data,
-                headers=headers,
+                headers=headers,    
             )
             )
 
 
             r.raise_for_status()
             r.raise_for_status()