small f-string syntax fix in generate.py (#2483)

Probably low priority, but helps the error message be more clear by
hopefully displaying model_name.
This commit is contained in:
Lincoln Stein 2023-02-03 18:29:50 -05:00 committed by GitHub
commit 0d141c1d84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -847,7 +847,7 @@ class Generate:
# the model cache does the loading and offloading
cache = self.model_manager
if not cache.valid_model(model_name):
raise KeyError('** "{model_name}" is not a known model name. Cannot change.')
raise KeyError(f'** "{model_name}" is not a known model name. Cannot change.')
cache.print_vram_usage()