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

More readable error message #163

Merged
merged 2 commits into from
Jan 10, 2024
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
4 changes: 2 additions & 2 deletions docs/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
import google
from google.ai import generativelanguage as glm

import grpc
import grpc

# For showing the conditional imports and types in `content_types.py`
# grpc must be imported first.
typing.TYPE_CHECKING = True
from google import generativeai as palm



from tensorflow_docs.api_generator import generate_lib
from tensorflow_docs.api_generator import public_api

Expand Down
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
Loading