fix: Add file name to prompt when processing images with doc (#4114)

v3.2
shaohuzhang1 2025-09-25 18:51:21 +08:00 committed by GitHub
parent d70d6e1fa7
commit d92dcd722b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ def image_to_mode(image, doc: Document, images_list, get_image_id):
if len([i for i in images_list if i.id == image_uuid]) == 0:
image = File(id=image_uuid, file_name=part.filename, meta={'debug': False, 'content': part.blob})
images_list.append(image)
return f'![](./oss/file/{image_uuid})'
return f'![{part.filename.replace("[", "").replace("]", "")}](./oss/file/{image_uuid})'
return None
return None