Skip to content

Commit

Permalink
Reformat and update notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
shilpakancharla committed May 30, 2024
1 parent 3c8b8a8 commit 2850713
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions examples/prompting/Adding_context_information.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "h6NnvxwW9fT9"
Expand Down Expand Up @@ -64,7 +64,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {
"id": "Ne-3gnXqR0hI"
},
Expand All @@ -75,7 +75,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {
"id": "EconMHePQHGw"
},
Expand All @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {
"id": "v-JZzORUpVR2"
},
Expand All @@ -124,19 +124,19 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {
"id": "uFcm6Dd7ls_F"
},
"outputs": [
{
"data": {
"text/markdown": "The list you provided already includes all the athletes who competed in the Olympics exactly 9 times:\n\n* **Hubert Raudaschl**\n* **Afanasijs Kuzmins**\n* **Nino Salukvadze** \n",
"text/markdown": "Here are the athletes who competed in the Olympics exactly 9 times:\n\n* **Hubert Raudaschl**\n* **Afanasijs Kuzmins**\n* **Nino Salukvadze** \n",
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -146,6 +146,8 @@
"prompt = \"\"\"\n",
"QUERY: provide a list of atheletes that competed in olympics exactly 9 times.\n",
"CONTEXT:\n",
"\n",
"Table title: Olympic athletes and number of times they've competed\n",
"Ian Millar, 10\n",
"Hubert Raudaschl, 9\n",
"Afanasijs Kuzmins, 9\n",
Expand All @@ -157,8 +159,8 @@
"Ivan Osiier, 7\n",
"François Lafortune, Jr, 7\n",
"\n",
"ANSWER:\"\"\"\n",
"model = genai.GenerativeModel(model_name='gemini-1.5-flash-latest', generation_config={\"temperature\": 0})\n",
"\"\"\"\n",
"model = genai.GenerativeModel(model_name='gemini-1.5-flash-latest')\n",
"Markdown(model.generate_content(prompt).text)"
]
},
Expand Down

0 comments on commit 2850713

Please sign in to comment.