Skip to content

Commit

Permalink
More readable error message (#163)
Browse files Browse the repository at this point in the history
* More readable error message

---------

Co-authored-by: Mark Daoust <[email protected]>
  • Loading branch information
ftnext and MarkDaoust authored Jan 10, 2024
1 parent 4df472e commit ad0e9f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/generativeai/types/generation_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def text(self):
if len(parts) != 1 or "text" not in parts[0]:
raise ValueError(
"The `response.text` quick accessor only works for "
"simple (single-`Part`) text responses. This response is not simple text."
"simple (single-`Part`) text responses. This response is not simple text. "
"Use the `result.parts` accessor or the full "
"`result.candidates[index].content.parts` lookup "
"instead."
Expand Down

0 comments on commit ad0e9f2

Please sign in to comment.