From 08514346eac34cf1e53fa6b729cca4984264239b Mon Sep 17 00:00:00 2001 From: bilgeyucel Date: Fri, 31 Oct 2025 16:49:02 +0100 Subject: [PATCH] Change the order of HITL tutorial --- index.toml | 4 +- tutorials/47_Human_in_the_Loop_Agent.ipynb | 245 ++++++++++----------- 2 files changed, 124 insertions(+), 125 deletions(-) diff --git a/index.toml b/index.toml index 758fe77..eab13c8 100644 --- a/index.toml +++ b/index.toml @@ -221,7 +221,7 @@ dependencies = ["sentence-transformers>=4.1.0", "datasets", "accelerate"] title = "Creating a Multi-Agent System with Haystack" description = "Use agents specialized in specific tasks to build more complex, modular agent workflows" level = "advanced" -weight = 10 +weight = 11 notebook = "45_Creating_a_Multi_Agent_System.ipynb" aliases = [] completion_time = "20 min" @@ -245,7 +245,7 @@ featured = true title = "Human-in-the-Loop with Haystack Agents" description = "Learn how to use confirmation strategies to get user input before tool execution for safer, more controllable AI systems." level = "advanced" -weight = 11 +weight = 10 notebook = "47_Human_in_the_Loop_Agent.ipynb" aliases = [] completion_time = "20 min" diff --git a/tutorials/47_Human_in_the_Loop_Agent.ipynb b/tutorials/47_Human_in_the_Loop_Agent.ipynb index 8b255f4..0066a34 100644 --- a/tutorials/47_Human_in_the_Loop_Agent.ipynb +++ b/tutorials/47_Human_in_the_Loop_Agent.ipynb @@ -21,10 +21,9 @@ "\n", "**Why is this useful?** Imagine an AI agent that can access your bank account, send emails, or make purchases. You probably want human approval before it executes sensitive operations. Confirmation strategies let you define exactly when the agent should ask for permission.\n", "\n", - "> ๐Ÿงช Beta Feature Notice:\n", - "\n", - "> The Human-in-the-Loop feature is currently in **beta**, available in the [haystack-experimental](https://github.com/deepset-ai/haystack-experimental) repository.\n", - "We'd love your feedback, join the conversation in [this GitHub discussion](https://github.com/deepset-ai/haystack-experimental/discussions/381) and help us shape this feature!" + "> ๐Ÿงช **Beta Feature Notice**:\n", + ">\n", + "> The **Human-in-the-Loop** feature is currently in **beta**, available in the [haystack-experimental](https://github.com/deepset-ai/haystack-experimental) repository. We'd love your feedback, join the conversation in [this GitHub discussion](https://github.com/deepset-ai/haystack-experimental/discussions/381) and help us shape this feature!" ] }, { @@ -86,11 +85,11 @@ "execution_count": 2, "id": "82bdb67e-7187-45d8-8408-49102c8432c4", "metadata": { - "id": "82bdb67e-7187-45d8-8408-49102c8432c4", - "outputId": "6d2cb151-20bd-4972-84d1-b93ef2c5a65c", "colab": { "base_uri": "https://localhost:8080/" - } + }, + "id": "82bdb67e-7187-45d8-8408-49102c8432c4", + "outputId": "6d2cb151-20bd-4972-84d1-b93ef2c5a65c" }, "outputs": [ { @@ -295,26 +294,16 @@ "execution_count": 6, "id": "5a29facf-abbb-4aea-8671-339e03c0a807", "metadata": { - "id": "5a29facf-abbb-4aea-8671-339e03c0a807", - "outputId": "a6d487a2-9aa3-40e2-8d07-b6ac2bf35a5d", "colab": { "base_uri": "https://localhost:8080/", "height": 185 - } + }, + "id": "5a29facf-abbb-4aea-8671-339e03c0a807", + "outputId": "a6d487a2-9aa3-40e2-8d07-b6ac2bf35a5d" }, "outputs": [ { - "output_type": "display_data", "data": { - "text/plain": [ - "โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n", - "โ”‚ \u001b[1;33mTool:\u001b[0m get_bank_balance โ”‚\n", - "โ”‚ \u001b[1;33mDescription:\u001b[0m Get the bank balance for a given account ID. โ”‚\n", - "โ”‚ โ”‚\n", - "โ”‚ \u001b[1;33mArguments:\u001b[0m โ”‚\n", - "โ”‚ \u001b[36maccount_id:\u001b[0m 56789 โ”‚\n", - "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n" - ], "text/html": [ "
โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n",
               "โ”‚ Tool: get_bank_balance                                                                                          โ”‚\n",
@@ -324,23 +313,33 @@
               "โ”‚ account_id: 56789                                                                                               โ”‚\n",
               "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n",
               "
\n" + ], + "text/plain": [ + "โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n", + "โ”‚ \u001b[1;33mTool:\u001b[0m get_bank_balance โ”‚\n", + "โ”‚ \u001b[1;33mDescription:\u001b[0m Get the bank balance for a given account ID. โ”‚\n", + "โ”‚ โ”‚\n", + "โ”‚ \u001b[1;33mArguments:\u001b[0m โ”‚\n", + "โ”‚ \u001b[36maccount_id:\u001b[0m 56789 โ”‚\n", + "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" }, { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "Your choice \u001b[1;35m[y/n/m]\u001b[0m \u001b[1;36m(y)\u001b[0m: " - ], "text/html": [ "
\n",
               "Your choice [y/n/m] (y): 
\n" + ], + "text/plain": [ + "\n", + "Your choice \u001b[1;35m[y/n/m]\u001b[0m \u001b[1;36m(y)\u001b[0m: " ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" }, { "name": "stdout", @@ -350,19 +349,19 @@ ] }, { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "\u001b[1;32mAgent Result:\u001b[0m The balance of account \u001b[1;36m56789\u001b[0m is $\u001b[1;36m1\u001b[0m,\u001b[1;36m234.56\u001b[0m.\n" - ], "text/html": [ "
\n",
               "Agent Result: The balance of account 56789 is $1,234.56.\n",
               "
\n" + ], + "text/plain": [ + "\n", + "\u001b[1;32mAgent Result:\u001b[0m The balance of account \u001b[1;36m56789\u001b[0m is $\u001b[1;36m1\u001b[0m,\u001b[1;36m234.56\u001b[0m.\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -387,28 +386,28 @@ "execution_count": 7, "id": "073bc908-bcfe-46d5-b5c1-7b19fb95252a", "metadata": { - "id": "073bc908-bcfe-46d5-b5c1-7b19fb95252a", - "outputId": "77e32ff2-e779-410c-d4f1-ec5357e031a4", "colab": { "base_uri": "https://localhost:8080/", "height": 34 - } + }, + "id": "073bc908-bcfe-46d5-b5c1-7b19fb95252a", + "outputId": "77e32ff2-e779-410c-d4f1-ec5357e031a4" }, "outputs": [ { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "\u001b[1;32mAgent Result:\u001b[0m The sum of \u001b[1;36m5.5\u001b[0m and \u001b[1;36m3.2\u001b[0m is \u001b[1;36m8.7\u001b[0m.\n" - ], "text/html": [ "
\n",
               "Agent Result: The sum of 5.5 and 3.2 is 8.7.\n",
               "
\n" + ], + "text/plain": [ + "\n", + "\u001b[1;32mAgent Result:\u001b[0m The sum of \u001b[1;36m5.5\u001b[0m and \u001b[1;36m3.2\u001b[0m is \u001b[1;36m8.7\u001b[0m.\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -431,26 +430,16 @@ "execution_count": 8, "id": "9f60ce1e-c892-41f6-a031-255a4b7b53c1", "metadata": { - "id": "9f60ce1e-c892-41f6-a031-255a4b7b53c1", - "outputId": "04db2a1b-0134-4a22-c0a9-6d2003165ddc", "colab": { "base_uri": "https://localhost:8080/", "height": 185 - } + }, + "id": "9f60ce1e-c892-41f6-a031-255a4b7b53c1", + "outputId": "04db2a1b-0134-4a22-c0a9-6d2003165ddc" }, "outputs": [ { - "output_type": "display_data", "data": { - "text/plain": [ - "โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n", - "โ”‚ \u001b[1;33mTool:\u001b[0m get_phone_number โ”‚\n", - "โ”‚ \u001b[1;33mDescription:\u001b[0m Get the phone number for a given name. โ”‚\n", - "โ”‚ โ”‚\n", - "โ”‚ \u001b[1;33mArguments:\u001b[0m โ”‚\n", - "โ”‚ \u001b[36mname:\u001b[0m Alice โ”‚\n", - "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n" - ], "text/html": [ "
โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n",
               "โ”‚ Tool: get_phone_number                                                                                          โ”‚\n",
@@ -460,23 +449,33 @@
               "โ”‚ name: Alice                                                                                                     โ”‚\n",
               "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n",
               "
\n" + ], + "text/plain": [ + "โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n", + "โ”‚ \u001b[1;33mTool:\u001b[0m get_phone_number โ”‚\n", + "โ”‚ \u001b[1;33mDescription:\u001b[0m Get the phone number for a given name. โ”‚\n", + "โ”‚ โ”‚\n", + "โ”‚ \u001b[1;33mArguments:\u001b[0m โ”‚\n", + "โ”‚ \u001b[36mname:\u001b[0m Alice โ”‚\n", + "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" }, { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "Your choice \u001b[1;35m[y/n/m]\u001b[0m \u001b[1;36m(y)\u001b[0m: " - ], "text/html": [ "
\n",
               "Your choice [y/n/m] (y): 
\n" + ], + "text/plain": [ + "\n", + "Your choice \u001b[1;35m[y/n/m]\u001b[0m \u001b[1;36m(y)\u001b[0m: " ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" }, { "name": "stdout", @@ -486,19 +485,19 @@ ] }, { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "\u001b[1;32mAgent Result:\u001b[0m The phone number of Alice is \u001b[1m(\u001b[0m\u001b[1;36m123\u001b[0m\u001b[1m)\u001b[0m \u001b[1;36m456\u001b[0m-\u001b[1;36m7890\u001b[0m.\n" - ], "text/html": [ "
\n",
               "Agent Result: The phone number of Alice is (123) 456-7890.\n",
               "
\n" + ], + "text/plain": [ + "\n", + "\u001b[1;32mAgent Result:\u001b[0m The phone number of Alice is \u001b[1m(\u001b[0m\u001b[1;36m123\u001b[0m\u001b[1m)\u001b[0m \u001b[1;36m456\u001b[0m-\u001b[1;36m7890\u001b[0m.\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -523,28 +522,28 @@ "execution_count": 9, "id": "d63207c7-f3fb-4bec-aaf7-5b8a25d5eb3b", "metadata": { - "id": "d63207c7-f3fb-4bec-aaf7-5b8a25d5eb3b", - "outputId": "6abd466c-09ca-4c8d-9257-0d32d09edc1e", "colab": { "base_uri": "https://localhost:8080/", "height": 34 - } + }, + "id": "d63207c7-f3fb-4bec-aaf7-5b8a25d5eb3b", + "outputId": "6abd466c-09ca-4c8d-9257-0d32d09edc1e" }, "outputs": [ { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "\u001b[1;32mAgent Result:\u001b[0m The phone number of Alice is \u001b[1m(\u001b[0m\u001b[1;36m123\u001b[0m\u001b[1m)\u001b[0m \u001b[1;36m456\u001b[0m-\u001b[1;36m7890\u001b[0m.\n" - ], "text/html": [ "
\n",
               "Agent Result: The phone number of Alice is (123) 456-7890.\n",
               "
\n" + ], + "text/plain": [ + "\n", + "\u001b[1;32mAgent Result:\u001b[0m The phone number of Alice is \u001b[1m(\u001b[0m\u001b[1;36m123\u001b[0m\u001b[1m)\u001b[0m \u001b[1;36m456\u001b[0m-\u001b[1;36m7890\u001b[0m.\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -672,28 +671,28 @@ "execution_count": 12, "id": "8061d79b-faaa-4ce4-baba-4c4cef8de637", "metadata": { - "id": "8061d79b-faaa-4ce4-baba-4c4cef8de637", - "outputId": "6db71bc6-616b-4a55-a313-521d4903b021", "colab": { "base_uri": "https://localhost:8080/", "height": 34 - } + }, + "id": "8061d79b-faaa-4ce4-baba-4c4cef8de637", + "outputId": "6db71bc6-616b-4a55-a313-521d4903b021" }, "outputs": [ { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "\u001b[1;32mAgent Result:\u001b[0m Expense report for the business lunch \u001b[1m(\u001b[0m$\u001b[1;36m10\u001b[0m\u001b[1m)\u001b[0m was submitted successfully.\n" - ], "text/html": [ "
\n",
               "Agent Result: Expense report for the business lunch ($10) was submitted successfully.\n",
               "
\n" + ], + "text/plain": [ + "\n", + "\u001b[1;32mAgent Result:\u001b[0m Expense report for the business lunch \u001b[1m(\u001b[0m$\u001b[1;36m10\u001b[0m\u001b[1m)\u001b[0m was submitted successfully.\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -716,27 +715,16 @@ "execution_count": 14, "id": "e89ca219-2e0f-4840-be65-82ca4f782586", "metadata": { - "id": "e89ca219-2e0f-4840-be65-82ca4f782586", - "outputId": "f0d4127a-30a1-4f2e-841d-5a06ec023425", "colab": { "base_uri": "https://localhost:8080/", "height": 253 - } + }, + "id": "e89ca219-2e0f-4840-be65-82ca4f782586", + "outputId": "f0d4127a-30a1-4f2e-841d-5a06ec023425" }, "outputs": [ { - "output_type": "display_data", "data": { - "text/plain": [ - "โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n", - "โ”‚ \u001b[1;33mTool:\u001b[0m expense โ”‚\n", - "โ”‚ \u001b[1;33mDescription:\u001b[0m Submit an expense report that has a `cost` and `description` โ”‚\n", - "โ”‚ โ”‚\n", - "โ”‚ \u001b[1;33mArguments:\u001b[0m โ”‚\n", - "โ”‚ \u001b[36mcost:\u001b[0m 200 โ”‚\n", - "โ”‚ \u001b[36mdescription:\u001b[0m business travel โ”‚\n", - "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n" - ], "text/html": [ "
โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n",
               "โ”‚ Tool: expense                                                                                                   โ”‚\n",
@@ -747,23 +735,34 @@
               "โ”‚ description: business travel                                                                                    โ”‚\n",
               "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n",
               "
\n" + ], + "text/plain": [ + "โ•ญโ”€ ๐Ÿ”ง Tool Execution Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ\n", + "โ”‚ \u001b[1;33mTool:\u001b[0m expense โ”‚\n", + "โ”‚ \u001b[1;33mDescription:\u001b[0m Submit an expense report that has a `cost` and `description` โ”‚\n", + "โ”‚ โ”‚\n", + "โ”‚ \u001b[1;33mArguments:\u001b[0m โ”‚\n", + "โ”‚ \u001b[36mcost:\u001b[0m 200 โ”‚\n", + "โ”‚ \u001b[36mdescription:\u001b[0m business travel โ”‚\n", + "โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" }, { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "Your choice \u001b[1;35m[y/n/m]\u001b[0m \u001b[1;36m(y)\u001b[0m: " - ], "text/html": [ "
\n",
               "Your choice [y/n/m] (y): 
\n" + ], + "text/plain": [ + "\n", + "Your choice \u001b[1;35m[y/n/m]\u001b[0m \u001b[1;36m(y)\u001b[0m: " ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" }, { "name": "stdout", @@ -773,16 +772,16 @@ ] }, { - "output_type": "display_data", "data": { - "text/plain": [ - "Feedback message (optional) \u001b[1;36m()\u001b[0m: " - ], "text/html": [ "
Feedback message (optional) (): 
\n" + ], + "text/plain": [ + "Feedback message (optional) \u001b[1;36m()\u001b[0m: " ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" }, { "name": "stdout", @@ -792,21 +791,21 @@ ] }, { - "output_type": "display_data", "data": { - "text/plain": [ - "\n", - "\u001b[1;32mAgent Result:\u001b[0m The expense report submission was not successful because the cost was considered too high. Please let\n", - "me know if you'd like to adjust the amount or provide additional details.\n" - ], "text/html": [ "
\n",
               "Agent Result: The expense report submission was not successful because the cost was considered too high. Please let\n",
               "me know if you'd like to adjust the amount or provide additional details.\n",
               "
\n" + ], + "text/plain": [ + "\n", + "\u001b[1;32mAgent Result:\u001b[0m The expense report submission was not successful because the cost was considered too high. Please let\n", + "me know if you'd like to adjust the amount or provide additional details.\n" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -838,6 +837,9 @@ } ], "metadata": { + "colab": { + "provenance": [] + }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", @@ -854,11 +856,8 @@ "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.11" - }, - "colab": { - "provenance": [] } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +}