Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo #684

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion google/generativeai/types/generation_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Loading