SmolAgent_Tutorial/T1_WebSearch_Agent/web_search_agent_gui.ipynb

696 lines
55 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Install the Gradio by build the simple user interface"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: gradio in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (5.17.1)\n",
"Requirement already satisfied: aiofiles<24.0,>=22.0 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (23.2.1)\n",
"Requirement already satisfied: anyio<5.0,>=3.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (4.6.2.post1)\n",
"Requirement already satisfied: fastapi<1.0,>=0.115.2 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (0.115.3)\n",
"Requirement already satisfied: ffmpy in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (0.5.0)\n",
"Requirement already satisfied: gradio-client==1.7.1 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (1.7.1)\n",
"Requirement already satisfied: httpx>=0.24.1 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (0.28.1)\n",
"Requirement already satisfied: huggingface-hub>=0.28.1 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (0.29.1)\n",
"Requirement already satisfied: jinja2<4.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (3.1.4)\n",
"Requirement already satisfied: markupsafe~=2.0 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (2.1.5)\n",
"Requirement already satisfied: numpy<3.0,>=1.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (1.26.4)\n",
"Requirement already satisfied: orjson~=3.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (3.10.0)\n",
"Requirement already satisfied: packaging in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (24.1)\n",
"Requirement already satisfied: pandas<3.0,>=1.0 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (2.2.3)\n",
"Requirement already satisfied: pillow<12.0,>=8.0 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (11.1.0)\n",
"Requirement already satisfied: pydantic>=2.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (2.9.2)\n",
"Requirement already satisfied: pydub in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (0.25.1)\n",
"Requirement already satisfied: python-multipart>=0.0.18 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (0.0.20)\n",
"Requirement already satisfied: pyyaml<7.0,>=5.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (6.0.2)\n",
"Requirement already satisfied: ruff>=0.9.3 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (0.9.7)\n",
"Requirement already satisfied: safehttpx<0.2.0,>=0.1.6 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (0.1.6)\n",
"Requirement already satisfied: semantic-version~=2.0 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from gradio) (2.10.0)\n",
"Requirement already satisfied: starlette<1.0,>=0.40.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (0.41.0)\n",
"Requirement already satisfied: tomlkit<0.14.0,>=0.12.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (0.13.2)\n",
"Requirement already satisfied: typer<1.0,>=0.12 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (0.12.5)\n",
"Requirement already satisfied: typing-extensions~=4.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (4.12.2)\n",
"Requirement already satisfied: uvicorn>=0.14.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio) (0.32.0)\n",
"Requirement already satisfied: fsspec in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio-client==1.7.1->gradio) (2024.10.0)\n",
"Requirement already satisfied: websockets<15.0,>=10.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from gradio-client==1.7.1->gradio) (13.1)\n",
"Requirement already satisfied: idna>=2.8 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from anyio<5.0,>=3.0->gradio) (3.10)\n",
"Requirement already satisfied: sniffio>=1.1 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n",
"Requirement already satisfied: certifi in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from httpx>=0.24.1->gradio) (2024.8.30)\n",
"Requirement already satisfied: httpcore==1.* in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from httpx>=0.24.1->gradio) (1.0.6)\n",
"Requirement already satisfied: h11<0.15,>=0.13 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)\n",
"Requirement already satisfied: filelock in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from huggingface-hub>=0.28.1->gradio) (3.16.1)\n",
"Requirement already satisfied: requests in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from huggingface-hub>=0.28.1->gradio) (2.32.3)\n",
"Requirement already satisfied: tqdm>=4.42.1 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from huggingface-hub>=0.28.1->gradio) (4.66.5)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from pandas<3.0,>=1.0->gradio) (2.9.0.post0)\n",
"Requirement already satisfied: pytz>=2020.1 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from pandas<3.0,>=1.0->gradio) (2024.2)\n",
"Requirement already satisfied: tzdata>=2022.7 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from pandas<3.0,>=1.0->gradio) (2024.2)\n",
"Requirement already satisfied: annotated-types>=0.6.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from pydantic>=2.0->gradio) (0.7.0)\n",
"Requirement already satisfied: pydantic-core==2.23.4 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from pydantic>=2.0->gradio) (2.23.4)\n",
"Requirement already satisfied: click>=8.0.0 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from typer<1.0,>=0.12->gradio) (8.1.8)\n",
"Requirement already satisfied: shellingham>=1.3.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n",
"Requirement already satisfied: rich>=10.11.0 in c:\\users\\wingp\\anaconda3\\envs\\smolagent\\lib\\site-packages (from typer<1.0,>=0.12->gradio) (13.9.4)\n",
"Requirement already satisfied: colorama in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from click>=8.0.0->typer<1.0,>=0.12->gradio) (0.4.6)\n",
"Requirement already satisfied: six>=1.5 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from python-dateutil>=2.8.2->pandas<3.0,>=1.0->gradio) (1.16.0)\n",
"Requirement already satisfied: markdown-it-py>=2.2.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.18.0)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from requests->huggingface-hub>=0.28.1->gradio) (3.4.0)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from requests->huggingface-hub>=0.28.1->gradio) (2.2.3)\n",
"Requirement already satisfied: mdurl~=0.1 in c:\\users\\wingp\\appdata\\roaming\\python\\python312\\site-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"[notice] A new release of pip is available: 24.3.1 -> 25.0.1\n",
"[notice] To update, run: python.exe -m pip install --upgrade pip\n"
]
}
],
"source": [
"!pip install gradio"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tutorial Start"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Import the modules of smolagent"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\wingp\\AppData\\Roaming\\Python\\Python312\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n"
]
}
],
"source": [
"from typing import Optional\n",
"\n",
"from smolagents import HfApiModel, LiteLLMModel, TransformersModel, tool\n",
"from smolagents.agents import CodeAgent, ToolCallingAgent\n",
"from smolagents import DuckDuckGoSearchTool"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import gradio as gr"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Get the LLM model from ollama"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"model = LiteLLMModel(\n",
" model_id=\"ollama_chat/llama3.1\",\n",
" api_base=\"http://localhost:11434\", # replace with remote open-ai compatible server if necessary\n",
" #api_key=\"your-api-key\", # replace with API key if necessary\n",
" #num_ctx=8192, # ollama default is 2048 which will often fail horribly. 8192 works for easy tasks, more is better. Check https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator to calculate how much VRAM this will need for the selected model.\n",
" )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Assign the tools and model to agent"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"agent = ToolCallingAgent(tools=[DuckDuckGoSearchTool()], model=model)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Create the web search Agent function"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"def webSearcher(prompt: str) -> str:\n",
" return agent.run(prompt)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Create the User inferface with Gradio"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"demo = gr.Interface(\n",
" fn=webSearcher, \n",
" inputs=[\n",
" gr.Textbox(label=\"Enter your search query\", placeholder=\"who is the current world champion in football?\")\n",
" ],\n",
" outputs=[\n",
" gr.Textbox(label=\"Search Result\")\n",
" ],\n",
" title=\"Web Search Agent\",\n",
" description=\"This is a web search agent that can answer your questions\",\n",
")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"* Running on local URL: http://127.0.0.1:7860\n",
"\n",
"To create a public link, set `share=True` in `launch()`.\n"
]
},
{
"data": {
"text/html": [
"<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": []
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">╭──────────────────────────────────────────────────── </span><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">New run</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ────────────────────────────────────────────────────╮</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\">who is the current world cup winner</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">╰─ LiteLLMModel - ollama_chat/llama3.1 ───────────────────────────────────────────────────────────────────────────╯</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m╭─\u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[1;38;2;212;183;2mNew run\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╮\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1mwho is the current world cup winner\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m╰─\u001b[0m\u001b[38;2;212;183;2m LiteLLMModel - ollama_chat/llama3.1 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m1\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n",
"│ Calling tool: 'web_search' with arguments: {'query': 'Current FIFA World Cup winner'} │\n",
"╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n",
"</pre>\n"
],
"text/plain": [
"╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n",
"│ Calling tool: 'web_search' with arguments: {'query': 'Current FIFA World Cup winner'} │\n",
"╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Observations: ## Search Results\n",
"\n",
"|List of FIFA World Cup finals - Wikipedia<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://en.wikipedia.org/wiki/List_of_FIFA_World_Cup_finals)</span>\n",
"Football tournament FIFA World Cup final Founded <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span> ; <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">95</span> years ago <span style=\"font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span><span style=\"font-weight: bold\">)</span> Current champions Argentina <span style=\"font-weight: bold\">(</span>3rd title<span style=\"font-weight: bold\">)</span>\n",
"Most successful <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">team</span><span style=\"font-weight: bold\">(</span>s<span style=\"font-weight: bold\">)</span> Brazil <span style=\"font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5</span> titles<span style=\"font-weight: bold\">)</span> The FIFA World Cup is an international association football competition \n",
"contested by the senior men's national teams of the Fédération Internationale de Football Association <span style=\"font-weight: bold\">(</span>FIFA<span style=\"font-weight: bold\">)</span>, the \n",
"sport's global governing body. The championship <span style=\"color: #808000; text-decoration-color: #808000\">...</span>\n",
"\n",
"|World Cup Football Winners List - Topend Sports<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://www.topendsports.com/events/worldcupsoccer/winners.htm)</span>\n",
"The first African country that is going to win the world cup trophy is Zimbabwe; Sergemweze <span style=\"font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2014</span><span style=\"font-weight: bold\">)</span> African,Asian or\n",
"north American representatives are not yet at the level of winning FIFA World cup, It doesn't matter the last \n",
"result,Spain will win it. The Final game will be SPAIN V. NEDERLAND. Gerard sergemweze <span style=\"font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2014</span><span style=\"font-weight: bold\">)</span>\n",
"\n",
"|World Cup » Champions - worldfootball.net<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://www.worldfootball.net/winner/wm/)</span>\n",
"List of World Cup champions.\n",
"\n",
"|FIFA World Cup - Wikipedia<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://en.wikipedia.org/wiki/FIFA_World_Cup)</span>\n",
"FIFA U-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span> World Cup FIFA U-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17</span> World Cup: Current champions <span style=\"color: #808000; text-decoration-color: #808000\">...</span> two layers of semi-precious malachite while the \n",
"bottom side of the trophy bears the engraved year and name of each FIFA World Cup winner since <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1974</span>. |<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">62</span><span style=\"font-weight: bold\">]</span> The \n",
"description of the trophy by Gazzaniga was: \"The lines spring out from the base, rising in spirals, stretching out \n",
"to receive <span style=\"color: #808000; text-decoration-color: #808000\">...</span>\n",
"\n",
"|World Cup winners from <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1982</span>, <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1986</span>, <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1990</span>, <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1994</span>, <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1998</span>, <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2002</span>, <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2006</span> <span style=\"color: #808000; text-decoration-color: #808000\">...</span> - \n",
"FIFA<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://www.fifa.com/en/articles/world-cup-champions-1982-2022-italy-argentina-germany-brazil-france-spain)</span>\n",
"FIFA details the World Cup winners from the past <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">11</span> tournaments including Italy, Argentina, West Germany, Brazil, \n",
"France, Spain and Germany.\n",
"\n",
"|FIFA World Cup Winners List from <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span>-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span>, Complete List and \n",
"Hosts<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://currentaffairs.adda247.com/fifa-world-cup-winners-list-from-1930-to-2022/)</span>\n",
"FIFA World Cup Winners Argentina. What a great match! Undoubtedly, it was one of the best finals ever. But in the \n",
"end Argentina defeated France by <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4</span>-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span> in penalty shootout after the match drawn <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span>-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span> in the normal time to win FIFA \n",
"World Cup <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span> title. Kylian Mbappe from France was the top goal scorer in FIFA World Cup <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span>, he scored <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">7</span> \n",
"goals.France forward Kylian Mbappe became the first <span style=\"color: #808000; text-decoration-color: #808000\">...</span>\n",
"\n",
"|Complete FIFA World Cup Winners List: Every Winner Since \n",
"<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span><span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://soccermavericks.com/fifa-world-cup-winners-list/)</span>\n",
"In this post, we'll go through every FIFA World Cup winner since <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span>. So let's get started! Read our article on \n",
"the countries with the most FIFA World Cup wins. List of All The FIFA World Cup Winners. Here is the list of all \n",
"the FIFA World Cup winners. It has winners from the start of the tournament in <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span> to the most recent one in <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span>.\n",
"\n",
"|History of WC - FIFA World Cup Results<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://www.fifaworldcupnews.com/world-cup-results/)</span>\n",
"The tournament has taken place organized every four years, except in <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1942</span> and <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1946</span>, when the competition was \n",
"canceled due to World War II. France is the current FIFA World Cup, champion team. The final of the 21st FIFA World\n",
"Cup was held in Russia. The match was contested by France and Croatia. Antoine Griezmann was Men of the match of \n",
"the <span style=\"color: #808000; text-decoration-color: #808000\">...</span>\n",
"\n",
"|FIFA World Cup records and statistics - \n",
"Wikipedia<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://en.wikipedia.org/wiki/FIFA_World_Cup_records_and_statistics)</span>\n",
"As of the <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span> FIFA World Cup, <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">80</span> national teams have competed at the finals of the FIFA World Cup. |<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"font-weight: bold\">]</span> Brazil is \n",
"the only team to have appeared in all <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">22</span> tournaments to date, with Germany having participated in <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>, Italy and \n",
"Argentina in <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18</span> and Mexico in <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17</span>. |<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"font-weight: bold\">]</span> Eight nations have won the tournament. The inaugural winners in <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span> were \n",
"Uruguay; the current champions are Argentina.\n",
"\n",
"|List of FIFA World Cup Winners from <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span> to <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span>, Champions List \n",
"Updated<span style=\"font-weight: bold\">](</span><span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://www.studyiq.com/articles/fifa-world-cup-winners-list/)</span>\n",
"This event has <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">32</span> teams in it altogether. <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">64</span> matches were played as <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">32</span> teams competed for a place on the FIFA World\n",
"Cup winners list. On December <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18</span>, <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span>, when the two greatest teams compete for the title, the FIFA World Cup <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span> \n",
"winner will be selected. Below is a detailed analysis of the FIFA World Cup winners by year from <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1930</span> to <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2022</span>.\n",
"</pre>\n"
],
"text/plain": [
"Observations: ## Search Results\n",
"\n",
"|List of FIFA World Cup finals - Wikipedia\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://en.wikipedia.org/wiki/List_of_FIFA_World_Cup_finals\u001b[0m\u001b[4;94m)\u001b[0m\n",
"Football tournament FIFA World Cup final Founded \u001b[1;36m1930\u001b[0m ; \u001b[1;36m95\u001b[0m years ago \u001b[1m(\u001b[0m\u001b[1;36m1930\u001b[0m\u001b[1m)\u001b[0m Current champions Argentina \u001b[1m(\u001b[0m3rd title\u001b[1m)\u001b[0m\n",
"Most successful \u001b[1;35mteam\u001b[0m\u001b[1m(\u001b[0ms\u001b[1m)\u001b[0m Brazil \u001b[1m(\u001b[0m\u001b[1;36m5\u001b[0m titles\u001b[1m)\u001b[0m The FIFA World Cup is an international association football competition \n",
"contested by the senior men's national teams of the Fédération Internationale de Football Association \u001b[1m(\u001b[0mFIFA\u001b[1m)\u001b[0m, the \n",
"sport's global governing body. The championship \u001b[33m...\u001b[0m\n",
"\n",
"|World Cup Football Winners List - Topend Sports\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://www.topendsports.com/events/worldcupsoccer/winners.htm\u001b[0m\u001b[4;94m)\u001b[0m\n",
"The first African country that is going to win the world cup trophy is Zimbabwe; Sergemweze \u001b[1m(\u001b[0m\u001b[1;36m2014\u001b[0m\u001b[1m)\u001b[0m African,Asian or\n",
"north American representatives are not yet at the level of winning FIFA World cup, It doesn't matter the last \n",
"result,Spain will win it. The Final game will be SPAIN V. NEDERLAND. Gerard sergemweze \u001b[1m(\u001b[0m\u001b[1;36m2014\u001b[0m\u001b[1m)\u001b[0m\n",
"\n",
"|World Cup » Champions - worldfootball.net\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://www.worldfootball.net/winner/wm/\u001b[0m\u001b[4;94m)\u001b[0m\n",
"List of World Cup champions.\n",
"\n",
"|FIFA World Cup - Wikipedia\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://en.wikipedia.org/wiki/FIFA_World_Cup\u001b[0m\u001b[4;94m)\u001b[0m\n",
"FIFA U-\u001b[1;36m20\u001b[0m World Cup FIFA U-\u001b[1;36m17\u001b[0m World Cup: Current champions \u001b[33m...\u001b[0m two layers of semi-precious malachite while the \n",
"bottom side of the trophy bears the engraved year and name of each FIFA World Cup winner since \u001b[1;36m1974\u001b[0m. |\u001b[1;36m62\u001b[0m\u001b[1m]\u001b[0m The \n",
"description of the trophy by Gazzaniga was: \"The lines spring out from the base, rising in spirals, stretching out \n",
"to receive \u001b[33m...\u001b[0m\n",
"\n",
"|World Cup winners from \u001b[1;36m1982\u001b[0m, \u001b[1;36m1986\u001b[0m, \u001b[1;36m1990\u001b[0m, \u001b[1;36m1994\u001b[0m, \u001b[1;36m1998\u001b[0m, \u001b[1;36m2002\u001b[0m, \u001b[1;36m2006\u001b[0m \u001b[33m...\u001b[0m - \n",
"FIFA\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://www.fifa.com/en/articles/world-cup-champions-1982-2022-italy-argentina-germany-brazil-france-spain\u001b[0m\u001b[4;94m)\u001b[0m\n",
"FIFA details the World Cup winners from the past \u001b[1;36m11\u001b[0m tournaments including Italy, Argentina, West Germany, Brazil, \n",
"France, Spain and Germany.\n",
"\n",
"|FIFA World Cup Winners List from \u001b[1;36m1930\u001b[0m-\u001b[1;36m2022\u001b[0m, Complete List and \n",
"Hosts\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://currentaffairs.adda247.com/fifa-world-cup-winners-list-from-1930-to-2022/\u001b[0m\u001b[4;94m)\u001b[0m\n",
"FIFA World Cup Winners Argentina. What a great match! Undoubtedly, it was one of the best finals ever. But in the \n",
"end Argentina defeated France by \u001b[1;36m4\u001b[0m-\u001b[1;36m2\u001b[0m in penalty shootout after the match drawn \u001b[1;36m3\u001b[0m-\u001b[1;36m3\u001b[0m in the normal time to win FIFA \n",
"World Cup \u001b[1;36m2022\u001b[0m title. Kylian Mbappe from France was the top goal scorer in FIFA World Cup \u001b[1;36m2022\u001b[0m, he scored \u001b[1;36m7\u001b[0m \n",
"goals.France forward Kylian Mbappe became the first \u001b[33m...\u001b[0m\n",
"\n",
"|Complete FIFA World Cup Winners List: Every Winner Since \n",
"\u001b[1;36m1930\u001b[0m\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://soccermavericks.com/fifa-world-cup-winners-list/\u001b[0m\u001b[4;94m)\u001b[0m\n",
"In this post, we'll go through every FIFA World Cup winner since \u001b[1;36m1930\u001b[0m. So let's get started! Read our article on \n",
"the countries with the most FIFA World Cup wins. List of All The FIFA World Cup Winners. Here is the list of all \n",
"the FIFA World Cup winners. It has winners from the start of the tournament in \u001b[1;36m1930\u001b[0m to the most recent one in \u001b[1;36m2022\u001b[0m.\n",
"\n",
"|History of WC - FIFA World Cup Results\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://www.fifaworldcupnews.com/world-cup-results/\u001b[0m\u001b[4;94m)\u001b[0m\n",
"The tournament has taken place organized every four years, except in \u001b[1;36m1942\u001b[0m and \u001b[1;36m1946\u001b[0m, when the competition was \n",
"canceled due to World War II. France is the current FIFA World Cup, champion team. The final of the 21st FIFA World\n",
"Cup was held in Russia. The match was contested by France and Croatia. Antoine Griezmann was Men of the match of \n",
"the \u001b[33m...\u001b[0m\n",
"\n",
"|FIFA World Cup records and statistics - \n",
"Wikipedia\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://en.wikipedia.org/wiki/FIFA_World_Cup_records_and_statistics\u001b[0m\u001b[4;94m)\u001b[0m\n",
"As of the \u001b[1;36m2022\u001b[0m FIFA World Cup, \u001b[1;36m80\u001b[0m national teams have competed at the finals of the FIFA World Cup. |\u001b[1;36m1\u001b[0m\u001b[1m]\u001b[0m Brazil is \n",
"the only team to have appeared in all \u001b[1;36m22\u001b[0m tournaments to date, with Germany having participated in \u001b[1;36m20\u001b[0m, Italy and \n",
"Argentina in \u001b[1;36m18\u001b[0m and Mexico in \u001b[1;36m17\u001b[0m. |\u001b[1;36m2\u001b[0m\u001b[1m]\u001b[0m Eight nations have won the tournament. The inaugural winners in \u001b[1;36m1930\u001b[0m were \n",
"Uruguay; the current champions are Argentina.\n",
"\n",
"|List of FIFA World Cup Winners from \u001b[1;36m1930\u001b[0m to \u001b[1;36m2022\u001b[0m, Champions List \n",
"Updated\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://www.studyiq.com/articles/fifa-world-cup-winners-list/\u001b[0m\u001b[4;94m)\u001b[0m\n",
"This event has \u001b[1;36m32\u001b[0m teams in it altogether. \u001b[1;36m64\u001b[0m matches were played as \u001b[1;36m32\u001b[0m teams competed for a place on the FIFA World\n",
"Cup winners list. On December \u001b[1;36m18\u001b[0m, \u001b[1;36m2022\u001b[0m, when the two greatest teams compete for the title, the FIFA World Cup \u001b[1;36m2022\u001b[0m \n",
"winner will be selected. Below is a detailed analysis of the FIFA World Cup winners by year from \u001b[1;36m1930\u001b[0m to \u001b[1;36m2022\u001b[0m.\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 0: Duration 3.60 seconds| Input tokens: 1,110 | Output tokens: 29]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 0: Duration 3.60 seconds| Input tokens: 1,110 | Output tokens: 29]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m2\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">Error in generating tool call with model:</span>\n",
"<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">'NoneType'</span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\"> object is not iterable</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;31mError in generating tool call with model:\u001b[0m\n",
"\u001b[1;31m'NoneType'\u001b[0m\u001b[1;31m object is not iterable\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 1: Duration 4.37 seconds| Input tokens: 2,136 | Output tokens: 420]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 1: Duration 4.37 seconds| Input tokens: 2,136 | Output tokens: 420]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m3\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">Error in generating tool call with model:</span>\n",
"<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">'NoneType'</span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\"> object is not iterable</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;31mError in generating tool call with model:\u001b[0m\n",
"\u001b[1;31m'NoneType'\u001b[0m\u001b[1;31m object is not iterable\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 2: Duration 1.12 seconds| Input tokens: 3,162 | Output tokens: 486]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 2: Duration 1.12 seconds| Input tokens: 3,162 | Output tokens: 486]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m4\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">Error in generating tool call with model:</span>\n",
"<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">'NoneType'</span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\"> object is not iterable</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;31mError in generating tool call with model:\u001b[0m\n",
"\u001b[1;31m'NoneType'\u001b[0m\u001b[1;31m object is not iterable\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 3: Duration 3.60 seconds| Input tokens: 4,188 | Output tokens: 705]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 3: Duration 3.60 seconds| Input tokens: 4,188 | Output tokens: 705]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m5\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">Error in generating tool call with model:</span>\n",
"<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">'NoneType'</span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\"> object is not iterable</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;31mError in generating tool call with model:\u001b[0m\n",
"\u001b[1;31m'NoneType'\u001b[0m\u001b[1;31m object is not iterable\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 4: Duration 2.76 seconds| Input tokens: 5,214 | Output tokens: 939]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 4: Duration 2.76 seconds| Input tokens: 5,214 | Output tokens: 939]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">6</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m6\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">Error in generating tool call with model:</span>\n",
"<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">'NoneType'</span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\"> object is not iterable</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;31mError in generating tool call with model:\u001b[0m\n",
"\u001b[1;31m'NoneType'\u001b[0m\u001b[1;31m object is not iterable\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 5: Duration 1.88 seconds| Input tokens: 6,240 | Output tokens: 1,084]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 5: Duration 1.88 seconds| Input tokens: 6,240 | Output tokens: 1,084]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">Reached max steps.</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;31mReached max steps.\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 6: Duration 1.88 seconds| Input tokens: 7,699 | Output tokens: 1,144]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 6: Duration 1.88 seconds| Input tokens: 7,699 | Output tokens: 1,144]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"demo.launch()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "smolagent",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
}