Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
b1eb08b4
Unverified
Commit
b1eb08b4
authored
May 02, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
May 02, 2024
Browse files
Merge pull request #1929 from open-webui/dev
fix
parents
443a256f
989a4d31
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
backend/apps/images/main.py
backend/apps/images/main.py
+2
-2
No files found.
backend/apps/images/main.py
View file @
b1eb08b4
...
...
@@ -402,7 +402,7 @@ def generate_image(
for
image
in
res
[
"data"
]:
image_filename
=
save_b64_image
(
image
[
"b64_json"
])
images
.
append
({
"url"
:
f
"/cache/image/generations/
{
image_filename
}
"
})
file_body_path
=
IMAGE_CACHE_DIR
.
joinpath
(
f
"
{
image_
id
}
.json"
)
file_body_path
=
IMAGE_CACHE_DIR
.
joinpath
(
f
"
{
image_
filename
}
.json"
)
with
open
(
file_body_path
,
"w"
)
as
f
:
json
.
dump
(
data
,
f
)
...
...
@@ -477,7 +477,7 @@ def generate_image(
for
image
in
res
[
"images"
]:
image_filename
=
save_b64_image
(
image
)
images
.
append
({
"url"
:
f
"/cache/image/generations/
{
image_filename
}
"
})
file_body_path
=
IMAGE_CACHE_DIR
.
joinpath
(
f
"
{
image_
id
}
.json"
)
file_body_path
=
IMAGE_CACHE_DIR
.
joinpath
(
f
"
{
image_
filename
}
.json"
)
with
open
(
file_body_path
,
"w"
)
as
f
:
json
.
dump
({
**
data
,
"info"
:
res
[
"info"
]},
f
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment