diff --git a/google/generativeai/types/generation_types.py b/google/generativeai/types/generation_types.py index 42571bbe7..5a2012e64 100644 --- a/google/generativeai/types/generation_types.py +++ b/google/generativeai/types/generation_types.py @@ -532,7 +532,7 @@ def text(self): texts.extend([f"```{outcome_result}", part.code_execution_result.output, "```"]) continue - part_type = protos.Part.pb(part).whichOneof("data") + part_type = protos.Part.pb(part).WhichOneof("data") raise ValueError(f"Could not convert `part.{part_type}` to text.") return "\n".join(texts) diff --git a/tests/test_models.py b/tests/test_models.py index c7cd1dbcd..6f10f9123 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -169,14 +169,6 @@ def test_max_temperature(self): model = models.get_base_model(name) self.assertEqual(max_temperature, model.max_temperature) - @parameterized.named_parameters( - ["simple", "mystery-bison-001"], - ["model-instance", protos.Model(name="how?-bison-001")], - ) - def test_fail_with_unscoped_model_name(self, name): - with self.assertRaises(ValueError): - model = models.get_model(name) - def test_list_models(self): # The low level lib wraps the response in an iterable, so this is a fair test. self.responses = {