Skip to content

Commit ecb57a5

Browse files
authored
Add f to f-string (#322)
This was exposing the `{name}` when it raised.
1 parent a96feda commit ecb57a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google/generativeai/types/model_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def make_model_name(name: AnyModelNameOptions):
350350
raise TypeError("Expected: str, Model, or TunedModel")
351351

352352
if not (name.startswith("models/") or name.startswith("tunedModels/")):
353-
raise ValueError("Model names should start with `models/` or `tunedModels/`, got: {name}")
353+
raise ValueError(f"Model names should start with `models/` or `tunedModels/`, got: {name}")
354354

355355
return name
356356

0 commit comments

Comments
 (0)