mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-11 17:47:44 -05:00
refac
This commit is contained in:
@@ -849,6 +849,7 @@ class EditImageForm(BaseModel):
|
||||
size: Optional[str] = None
|
||||
n: Optional[int] = None
|
||||
negative_prompt: Optional[str] = None
|
||||
background: Optional[str] = None
|
||||
|
||||
|
||||
@router.post("/edit")
|
||||
@@ -953,6 +954,7 @@ async def image_edits(
|
||||
"prompt": form_data.prompt,
|
||||
**({"n": form_data.n} if form_data.n else {}),
|
||||
**({"size": size} if size else {}),
|
||||
**({"background": form_data.background} if form_data.background else {}),
|
||||
**(
|
||||
{}
|
||||
if re.match(
|
||||
|
||||
@@ -241,7 +241,8 @@ export const imageEdits = async (
|
||||
prompt: string,
|
||||
model?: string,
|
||||
size?: string,
|
||||
n?: number
|
||||
n?: number,
|
||||
background?: string
|
||||
) => {
|
||||
let error = null;
|
||||
|
||||
@@ -258,7 +259,8 @@ export const imageEdits = async (
|
||||
prompt,
|
||||
...(model && { model }),
|
||||
...(size && { size }),
|
||||
...(n && { n })
|
||||
...(n && { n }),
|
||||
...(background && { background })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user