From d92dcd722b785043c953eec46f1559da412bfa2b Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Thu, 25 Sep 2025 18:51:21 +0800 Subject: [PATCH] fix: Add file name to prompt when processing images with doc (#4114) --- apps/common/handle/impl/text/doc_split_handle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/handle/impl/text/doc_split_handle.py b/apps/common/handle/impl/text/doc_split_handle.py index 8d3c74767..33f234767 100644 --- a/apps/common/handle/impl/text/doc_split_handle.py +++ b/apps/common/handle/impl/text/doc_split_handle.py @@ -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