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

Conversation

ftnext
Copy link
Contributor

@ftnext ftnext commented Jan 7, 2024

Description of the change

Error message style fix

Motivation

Thank you very much for developing this great library.
I saw the error message

  File "/.../venv/lib/python3.11/site-packages/google/generativeai/types/generation_types.py", line 328, in text
    raise ValueError(
ValueError: The `response.text` quick accessor only works for 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.

and found text.Use (no space!)

Type of change

Choose one: Other

Checklist

  • I have performed a self-review of my code.
  • I have added detailed comments to my code where applicable.
  • I have verified that my change does not break existing code.
  • My PR is based on the latest changes of the main branch (if unsure, please run git pull --rebase upstream main).
  • I am familiar with the Google Style Guide for the language I have coded in.
  • I have read through the Contributing Guide and signed the Contributor License Agreement.

@ftnext ftnext requested a review from a team as a code owner January 7, 2024 12:01
@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:python sdk Issue/PR related to Python SDK labels Jan 7, 2024
MarkDaoust
MarkDaoust previously approved these changes Jan 8, 2024
Copy link
Collaborator

@MarkDaoust MarkDaoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MarkDaoust MarkDaoust merged commit ad0e9f2 into google-gemini:main Jan 10, 2024
6 checks passed
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:python sdk Issue/PR related to Python SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants