From e1fae2e4543edc87f98d16753a9076c6639ff33d Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Tue, 15 Oct 2024 00:29:01 -0400 Subject: [PATCH] [Frontend] Clarify model_type error messages (#9345) Signed-off-by: Vinay Damodaran --- vllm/entrypoints/chat_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vllm/entrypoints/chat_utils.py b/vllm/entrypoints/chat_utils.py index e05b6c9712c4e..1d2b88fb5a28a 100644 --- a/vllm/entrypoints/chat_utils.py +++ b/vllm/entrypoints/chat_utils.py @@ -166,15 +166,15 @@ def _placeholder_str(self, modality: ModalityStr, if model_type == "molmo": return "" - raise TypeError(f"Unknown model type: {model_type}") + raise TypeError(f"Unknown {modality} model type: {model_type}") elif modality == "audio": if model_type == "ultravox": return "<|reserved_special_token_0|>" - raise TypeError(f"Unknown model type: {model_type}") + raise TypeError(f"Unknown {modality} model type: {model_type}") elif modality == "video": if model_type == "qwen2_vl": return "<|vision_start|><|video_pad|><|vision_end|>" - raise TypeError(f"Unknown model type: {model_type}") + raise TypeError(f"Unknown {modality} model type: {model_type}") else: raise TypeError(f"Unknown modality: {modality}")