mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-10 12:01:29 -05:00
fix/refac: image action button
This commit is contained in:
@@ -531,11 +531,17 @@ def upload_image(request, image_data, content_type, metadata, user):
|
|||||||
|
|
||||||
|
|
||||||
@router.post("/generations")
|
@router.post("/generations")
|
||||||
|
async def generate_images(
|
||||||
|
request: Request, form_data: CreateImageForm, user=Depends(get_verified_user)
|
||||||
|
):
|
||||||
|
return await image_generations(request, form_data, user=user)
|
||||||
|
|
||||||
|
|
||||||
async def image_generations(
|
async def image_generations(
|
||||||
request: Request,
|
request: Request,
|
||||||
form_data: CreateImageForm,
|
form_data: CreateImageForm,
|
||||||
metadata: Optional[dict] = None,
|
metadata: Optional[dict] = None,
|
||||||
user=Depends(get_verified_user),
|
user=None,
|
||||||
):
|
):
|
||||||
# if IMAGE_SIZE = 'auto', default WidthxHeight to the 512x512 default
|
# if IMAGE_SIZE = 'auto', default WidthxHeight to the 512x512 default
|
||||||
# This is only relevant when the user has set IMAGE_SIZE to 'auto' with an
|
# This is only relevant when the user has set IMAGE_SIZE to 'auto' with an
|
||||||
|
|||||||
Reference in New Issue
Block a user