Adding f-string to validation error which is missing (#6748)

This commit is contained in:
LF Marques 2024-07-24 16:55:53 +01:00 committed by GitHub
parent f4f8a9d892
commit 545146349c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ def _image_token_str(model_config: ModelConfig,
return tokenizer.decode(model_config.hf_config.image_token_index)
if model_type == "chameleon":
return "<image>"
raise TypeError("Unknown model type: {model_type}")
raise TypeError(f"Unknown model type: {model_type}")
# TODO: Let user specify how to insert image tokens into prompt