mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-23 17:55:21 +00:00
fix/refac: image action button
This commit is contained in:
parent
423983f5a7
commit
0a78323406
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue