Skip to content

Commit

Permalink
Resolve review coments.
Browse files Browse the repository at this point in the history
Change-Id: Ieb900190f42e883337028ae25da3be819507db4a
  • Loading branch information
MarkDaoust committed May 28, 2024
1 parent 7c6d927 commit c884dc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions google/generativeai/protos.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
>>> from google.generativeai import protos
>>> import inspect
>>> print(inspect.getsource(protos.GenerateContentRequest))
>>> print(inspect.getsource(protos.Part))
Proto classes can have "oneof" fields. Use `in` to check which `oneof` field is set.
Expand All @@ -37,9 +37,9 @@
>>> type(p.inline_data) is protos.Blob
True
>>> 'inline_data' in p
False
>>> 'text' in p
True
>>> 'text' in p
False
Instances of all Message classes can be converted into JSON compatible dictionaries with the following construct
(Bytes are base64 encoded):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_protos.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
class UnitTests(parameterized.TestCase):
def test_check_glm_imports(self):
for fpath in ROOT.rglob("*.py"):
if fpath.name == "build_docs.py":
continue
content = fpath.read_text()
for match in re.findall("glm\.\w+", content):
if "__" in match:
continue
self.assertIn(
"Client",
match,
Expand Down

0 comments on commit c884dc2

Please sign in to comment.