fix: force image parser json output (#15847)

### What problem does this PR solve?
Force image parser runtime output format to JSON so downstream chunking
reads OCR results from the JSON output and image parser chunks can be
displayed.

### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: Wang Qi <wangq8@outlook.com>
This commit is contained in:
buua436
2026-06-09 19:02:37 +08:00
committed by GitHub
parent 719ce15c95
commit 7b8d6f34b3

View File

@@ -1055,7 +1055,7 @@ class Parser(ProcessBase):
self.callback(random.randint(1, 5) / 100.0, "Start to work on an image.")
conf = self._param.setups["image"]
self.set_output("output_format", conf["output_format"])
self.set_output("output_format", "json")
img = Image.open(io.BytesIO(blob)).convert("RGB")