forked from open-webui/open-webui
		
	fix
This commit is contained in:
		
							parent
							
								
									482f010d22
								
							
						
					
					
						commit
						989a4d3165
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -402,7 +402,7 @@ def generate_image( | ||||||
|             for image in res["data"]: |             for image in res["data"]: | ||||||
|                 image_filename = save_b64_image(image["b64_json"]) |                 image_filename = save_b64_image(image["b64_json"]) | ||||||
|                 images.append({"url": f"/cache/image/generations/{image_filename}"}) |                 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: |                 with open(file_body_path, "w") as f: | ||||||
|                     json.dump(data, f) |                     json.dump(data, f) | ||||||
|  | @ -477,7 +477,7 @@ def generate_image( | ||||||
|             for image in res["images"]: |             for image in res["images"]: | ||||||
|                 image_filename = save_b64_image(image) |                 image_filename = save_b64_image(image) | ||||||
|                 images.append({"url": f"/cache/image/generations/{image_filename}"}) |                 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: |                 with open(file_body_path, "w") as f: | ||||||
|                     json.dump({**data, "info": res["info"]}, f) |                     json.dump({**data, "info": res["info"]}, f) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek