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 a notebook test script. #187

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'main' into fix-notebooks
  • Loading branch information
MarkDaoust committed Jun 5, 2024
commit f97043e16e7889415142ed9a24231c424ac6d199
91 changes: 66 additions & 25 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 @@ -121,7 +121,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 2,
"metadata": {
"id": "wMltPyUpTu3h"
},
Expand Down Expand Up @@ -200,7 +200,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 3,
"metadata": {
"id": "jg1LjYNUWnsC"
},
Expand All @@ -213,8 +213,14 @@
" Latte\n",
" - Extra shot\n",
" Tea\n",
" - Earl Grey, hot\n",
"Is this correct? yes it is!\n"
" - Earl Grey, hot\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Is this correct? yes\n"
]
}
],
Expand Down Expand Up @@ -246,7 +252,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 4,
"metadata": {
"id": "IoBvZ1JYXgn5"
},
Expand Down Expand Up @@ -305,7 +311,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 @@ -326,7 +332,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 5,
"metadata": {
"id": "8vmtzAlPaQH-"
},
Expand All @@ -337,7 +343,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' if use_sys_inst else 'gemini-1.0-pro'\n",
"\n",
"if use_sys_inst:\n",
" model = genai.GenerativeModel(\n",
Expand Down Expand Up @@ -380,7 +386,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 6,
"metadata": {
"id": "38SAyrNNVhvE"
},
Expand All @@ -391,14 +397,20 @@
"text": [
"Welcome to Barista bot!\n",
"\n",
"\n",
"> Tea, Earl Grey, Hot.\n"
"\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"> I would like a capuccino with almond milk\n"
]
},
{
"data": {
"text/markdown": [
"OK, I have added an Earl Grey tea, hot, to your order."
"I have added a Cappuccino with Almond Milk to your order."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand All @@ -408,16 +420,16 @@
"output_type": "display_data"
},
{
"name": "stdout",
"name": "stdin",
"output_type": "stream",
"text": [
"> and a strong latte please\n"
"> do you have stone milk?\n"
]
},
{
"data": {
"text/markdown": [
"OK, and I have added a latte with double espresso to your order."
"I'm sorry, we do not have Stone Milk on the menu. Would you like any other type of milk with your cappuccino?"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand All @@ -426,23 +438,52 @@
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"> no, that's all\n"
]
},
{
"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"
" Cappuccino\n",
" - Almond Milk\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Is this correct? yes\n"
]
},
{
"data": {
"text/markdown": [
"Ok, I will place the order now."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"> thanks\n"
]
},
{
"data": {
"text/markdown": [
"Your order is confirmed, and it will be ready in about 4 minutes."
"Your order will be ready in about 10 minutes."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand All @@ -461,7 +502,7 @@
"[barista bot session over]\n",
"\n",
"Your order:\n",
" [('Earl Grey', ['Hot']), ('Latte', ['Double'])]\n",
" [('Cappuccino', ['Almond Milk'])]\n",
"\n",
"- Thanks for using Barista Bot!\n"
]
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.