We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 695b0fd commit 8b6385fCopy full SHA for 8b6385f
site/en/gemini-api/docs/get-started/python.ipynb
@@ -1752,6 +1752,7 @@
1752
" # Only one candidate for now.\n",
1753
" candidate_count=1,\n",
1754
" stop_sequences=['x'],\n",
1755
+ " max_output_tokens=20,\n",
1756
" temperature=1.0)\n",
1757
")"
1758
]
@@ -1779,6 +1780,10 @@
1779
1780
],
1781
"source": [
1782
"text = response.text\n",
1783
+ "\n",
1784
+ "if response.candidates[0].finish_reason.name == \"MAX_TOKENS\":\n",
1785
+ " text += '...'\n",
1786
1787
"to_markdown(text)"
1788
1789
},
0 commit comments