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"