Skip to content

Commit

Permalink
[Frontend] Clarify model_type error messages (vllm-project#9345)
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Garg <[email protected]>
  • Loading branch information
stevegrubb authored and garg-amit committed Oct 28, 2024
1 parent 79b7731 commit e09fa4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vllm/entrypoints/chat_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down

0 comments on commit e09fa4e

Please sign in to comment.