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

Point gemini-1.5-flash-latest as default model for all notebooks on examples folder #181

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
117 changes: 11 additions & 106 deletions examples/Agents_Function_Calling_Barista_Bot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {
"id": "3IzLYKxmTHd5"
},
Expand All @@ -79,7 +79,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"metadata": {
"id": "0gOuwcCUTNAO"
},
Expand Down Expand Up @@ -112,7 +112,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {
"id": "wMltPyUpTu3h"
},
Expand Down Expand Up @@ -191,24 +191,11 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"metadata": {
"id": "jg1LjYNUWnsC"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Your order:\n",
" Latte\n",
" - Extra shot\n",
" Tea\n",
" - Earl Grey, hot\n",
"Is this correct? yes it is!\n"
]
}
],
"outputs": [],
"source": [
"# Test it out!\n",
"\n",
Expand Down Expand Up @@ -237,7 +224,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"metadata": {
"id": "IoBvZ1JYXgn5"
},
Expand Down Expand Up @@ -296,7 +283,7 @@
"\"Regular milk\" is the same as 'whole milk'.\n",
"\"Sweetened\" means add some regular sugar, not a sweetener.\n",
"\n",
"We have run out of Soy milk today, so soy is not available.\n",
"Soy milk has run out of stock today, so soy is not available.\n",
"\"\"\""
]
},
Expand All @@ -317,7 +304,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"metadata": {
"id": "8vmtzAlPaQH-"
},
Expand All @@ -328,7 +315,7 @@
"# Toggle this to switch between Gemini 1.5 with a system instruction, or Gemini 1.0 Pro.\n",
"use_sys_inst = False\n",
"\n",
"model_name = 'gemini-1.5-pro-latest' if use_sys_inst else 'gemini-1.0-pro-latest'\n",
"model_name = 'gemini-1.5-flash-latest' if use_sys_inst else 'gemini-1.0-pro-latest'\n",
"\n",
"if use_sys_inst:\n",
" model = genai.GenerativeModel(\n",
Expand Down Expand Up @@ -371,93 +358,11 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"metadata": {
"id": "38SAyrNNVhvE"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Welcome to Barista bot!\n",
"\n",
"\n",
"> Tea, Earl Grey, Hot.\n"
]
},
{
"data": {
"text/markdown": [
"OK, I have added an Earl Grey tea, hot, to your order."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"> and a strong latte please\n"
]
},
{
"data": {
"text/markdown": [
"OK, and I have added a latte with double espresso to your order."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"> great, that's all thanks\n",
"Your order:\n",
" Earl Grey\n",
" - Hot\n",
" Latte\n",
" - Double\n",
"Is this correct? make it so!\n"
]
},
{
"data": {
"text/markdown": [
"Your order is confirmed, and it will be ready in about 4 minutes."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\n",
"[barista bot session over]\n",
"\n",
"Your order:\n",
" [('Earl Grey', ['Hot']), ('Latte', ['Double'])]\n",
"\n",
"- Thanks for using Barista Bot!\n"
]
}
],
"outputs": [],
"source": [
"from IPython.display import display, Markdown\n",
"\n",
Expand Down
Loading
Loading