mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-05 08:10:30 +00:00
refac
This commit is contained in:
parent
619f260466
commit
2543252bb0
1 changed files with 18 additions and 0 deletions
|
|
@ -245,6 +245,15 @@ async def generate_image(
|
|||
},
|
||||
}
|
||||
)
|
||||
# Return a message indicating the image is already displayed
|
||||
return json.dumps(
|
||||
{
|
||||
"status": "success",
|
||||
"message": "The image has been successfully generated and is already visible to the user in the chat. You do not need to display or embed the image again - just acknowledge that it has been created.",
|
||||
"images": images,
|
||||
},
|
||||
ensure_ascii=False,
|
||||
)
|
||||
|
||||
return json.dumps({"status": "success", "images": images}, ensure_ascii=False)
|
||||
except Exception as e:
|
||||
|
|
@ -290,6 +299,15 @@ async def edit_image(
|
|||
},
|
||||
}
|
||||
)
|
||||
# Return a message indicating the image is already displayed
|
||||
return json.dumps(
|
||||
{
|
||||
"status": "success",
|
||||
"message": "The edited image has been successfully generated and is already visible to the user in the chat. You do not need to display or embed the image again - just acknowledge that it has been created.",
|
||||
"images": images,
|
||||
},
|
||||
ensure_ascii=False,
|
||||
)
|
||||
|
||||
return json.dumps({"status": "success", "images": images}, ensure_ascii=False)
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue