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

Add output to Gemini API quickstart Colab #322

Merged
merged 2 commits into from
Mar 22, 2024
Merged
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
47 changes: 40 additions & 7 deletions site/en/tutorials/quickstart_colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
Copy link

@JGW97357 JGW97357 Jul 10, 2024

Choose a reason for hiding this comment

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

안녕. JG (주)제이지 97357 piease 내 계좌로Nh Jang DooSoon312 5821379791 이체.


Reply via ReviewNB

{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"cellView": "form",
"id": "tuOe1ymfHZPu"
Expand Down Expand Up @@ -94,11 +94,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {
"id": "J6Pd9SFJ1yVi"
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/137.4 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m10.2/137.4 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.0/137.4 kB\u001b[0m \u001b[31m498.4 kB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━\u001b[0m \u001b[32m133.1/137.4 kB\u001b[0m \u001b[31m1.3 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.4/137.4 kB\u001b[0m \u001b[31m1.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h"
]
}
],
"source": [
"!pip install -q -U google-generativeai"
]
Expand All @@ -120,7 +129,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {
"id": "HTiaTu6O1LRC"
},
Expand Down Expand Up @@ -148,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {
"id": "s-JqXcDe2hZ_"
},
Expand All @@ -168,11 +177,35 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {
"id": "j51mcrLD4Y2W"
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"In the bustling city of Evermore, there lived an ordinary schoolgirl named Anya. Little did she know that her life was about to take an extraordinary turn when she discovered a peculiar backpack.\n",
"\n",
"One morning, as Anya rummaged through her grandmother's attic, her eyes fell upon a dusty old backpack. Intrigued, she picked it up and unzipped it. Inside, she found a jumble of papers, trinkets, and a small, glowing crystal.\n",
"\n",
"As Anya reached out to touch the crystal, the backpack hummed with a soft energy. Suddenly, strange things began to happen. The zippers moved on their own, opening and closing compartments that revealed hidden pockets. Book pages turned themselves, revealing forgotten spells and incantations.\n",
"\n",
"Anya realized that this was no ordinary backpack. It was a magical backpack, imbued with ancient enchantments. Excited and overwhelmed, she carefully put on the backpack and felt its power surge through her.\n",
"\n",
"The next day at school, Anya couldn't resist testing out her new secret. She wished her homework was done, and to her amazement, the backpack performed its magic. The pen in her pocket began scribbling away, completing her assignments in a matter of minutes.\n",
"\n",
"As days turned into weeks, Anya's backpack became her most precious possession. She used its enchantments to help those in need, from repairing broken toys to granting small wishes. But she knew she had to be careful, lest the power of the backpack become too much for her to handle.\n",
"\n",
"One day, a nefarious sorcerer named Eldric learned of Anya's secret. Coveting its power, he plotted to steal the backpack. A fierce battle ensued, with Anya's backpack summoning magical creatures to her aid.\n",
"\n",
"In the end, Anya's courage and the power of the backpack prevailed. Eldric was defeated, and the city of Evermore was safe from his tyranny.\n",
"\n",
"From that day forward, Anya became known as the Guardian of the Magic Backpack. She used its enchantments wisely, always remembering the lesson she had learned: with great power comes great responsibility. And so, the legend of the magic backpack was passed down through generations, a testament to the power of kindness, courage, and the boundless imagination of a young schoolgirl.\n"
]
}
],
"source": [
"response = model.generate_content(\"Write a story about a magic backpack.\")\n",
"print(response.text)"
Expand Down
Loading