From e1c5664cd877880dcafb2f4989fd2e43a775de67 Mon Sep 17 00:00:00 2001 From: Billy Bao Date: Tue, 18 Nov 2025 16:54:57 +0800 Subject: [PATCH] add error handle with message --- agent/component/message.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/component/message.py b/agent/component/message.py index 555534610..36cee1422 100644 --- a/agent/component/message.py +++ b/agent/component/message.py @@ -177,6 +177,9 @@ class Message(ComponentBase): def _convert_content(self, content): doc_id = get_uuid() + + if not self._param.output_format or not isinstance(self._param.output_format, str): + return if self._param.output_format.lower() not in {"markdown", "html", "pdf", "docx"}: self._param.output_format = "markdown"