Skip to content

Conversation

@hackerpro536
Copy link

Description of the change

The error in your code is that the max_output_tokens parameter in the GenerationConfig is set to 20. This restricts the story to a very short length.

Motivation

User will got issue when run this block because max_output_tokens currently version is 20 so too small. I just change this value to better.

ValueError: The response.text' quick accessor only worlks 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.

Type of change

Bug fix

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.

@hackerpro536 hackerpro536 requested a review from a team as a code owner March 20, 2024 10:23
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:documentation Update docs labels Mar 20, 2024
@joefernandez
Copy link
Contributor

Obsolete. Closing.

@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants