From 27f035dfb0181768512c5c8a9d48ddf5e68fc1d9 Mon Sep 17 00:00:00 2001 From: Zhicheng Zhang Date: Mon, 28 Oct 2024 17:46:04 +0800 Subject: [PATCH] add missing image --- modelscope_agent/tools/code_interpreter/code_interpreter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modelscope_agent/tools/code_interpreter/code_interpreter.py b/modelscope_agent/tools/code_interpreter/code_interpreter.py index 50662793..b24cbf8d 100644 --- a/modelscope_agent/tools/code_interpreter/code_interpreter.py +++ b/modelscope_agent/tools/code_interpreter/code_interpreter.py @@ -463,7 +463,8 @@ def _execute_code(self, kc: BlockingKernelClient, code: str, text = msg['content']['data'].get('text/plain', '') if 'image/png' in msg['content']['data']: image_b64 = msg['content']['data']['image/png'] - image_url = self._serve_image(image_b64, 'png') + image_url = self._serve_image(image_b64, 'png', + is_remote) image_idx += 1 image = '![IMAGEGEN](%s)' % (image_url) elif 'text/html' in msg['content']['data']: