From 61e03a0eb75f92c90b453983898c05d359251450 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Thu, 25 Sep 2025 18:47:54 +0800 Subject: [PATCH 1/2] fix: Add file name to prompt when processing images with doc --- 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 8d3c7476767..d5f18c3b15f 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}](./oss/file/{image_uuid})' return None return None From f6fae664044b9c5e1feb0e90e3b315e480bdcdb4 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Thu, 25 Sep 2025 18:50:48 +0800 Subject: [PATCH 2/2] fix: Add file name to prompt when processing images with doc --- 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 d5f18c3b15f..33f234767ed 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'![{part.filename}](./oss/file/{image_uuid})' + return f'![{part.filename.replace("[", "").replace("]", "")}](./oss/file/{image_uuid})' return None return None