import{s as ea,o as ta,n as K}from"../chunks/scheduler.f6319a2a.js";import{S as oa,i as na,g as a,s as o,r as p,A as sa,h as l,f as s,c as n,j as M,u as g,x as $,k as w,y as t,a as m,v as u,d as h,t as f,w as b}from"../chunks/index.85aa684c.js";import{T as is}from"../chunks/Tip.3d397a88.js";import{D as j,E as ao}from"../chunks/ExampleCodeBlock.ac5a24b2.js";import{C as lo}from"../chunks/CodeBlock.3400fc53.js";import{H as S,E as aa}from"../chunks/getInferenceSnippets.743412b2.js";function la(J){let i,y=`Smolagents is an experimental API which is subject to change at any time. Results returned by the agents
can vary as the APIs or underlying models are prone to change.`;return{c(){i=a("p"),i.textContent=y},l(d){i=l(d,"P",{"data-svelte-h":!0}),$(i)!=="svelte-19v5hvw"&&(i.textContent=y)},m(d,v){m(d,i,v)},p:K,d(d){d&&s(i)}}}function ra(J){let i,y=`Loading a tool means that you’ll download the tool and execute it locally.
ALWAYS inspect the tool you’re downloading before loading it within your runtime, as you would do when
installing a package using pip/npm/apt.`;return{c(){i=a("p"),i.textContent=y},l(d){i=l(d,"P",{"data-svelte-h":!0}),$(i)!=="svelte-1kcherd"&&(i.textContent=y)},m(d,v){m(d,i,v)},p:K,d(d){d&&s(i)}}}function ia(J){let i,y=`Loading a tool from the Hub means that you’ll download the tool and execute it locally.
ALWAYS inspect the tool you’re downloading before loading it within your runtime, as you would do when
installing a package using pip/npm/apt.`;return{c(){i=a("p"),i.textContent=y},l(d){i=l(d,"P",{"data-svelte-h":!0}),$(i)!=="svelte-fpk7e5"&&(i.textContent=y)},m(d,v){m(d,i,v)},p:K,d(d){d&&s(i)}}}function ca(J){let i,y="Examples:",d,v,_;return v=new lo({props:{code:"aW1hZ2VfZ2VuZXJhdG9yJTIwJTNEJTIwVG9vbC5mcm9tX3NwYWNlKCUwQSUyMCUyMCUyMCUyMHNwYWNlX2lkJTNEJTIyYmxhY2stZm9yZXN0LWxhYnMlMkZGTFVYLjEtc2NobmVsbCUyMiUyQyUwQSUyMCUyMCUyMCUyMG5hbWUlM0QlMjJpbWFnZS1nZW5lcmF0b3IlMjIlMkMlMEElMjAlMjAlMjAlMjBkZXNjcmlwdGlvbiUzRCUyMkdlbmVyYXRlJTIwYW4lMjBpbWFnZSUyMGZyb20lMjBhJTIwcHJvbXB0JTIyJTBBKSUwQWltYWdlJTIwJTNEJTIwaW1hZ2VfZ2VuZXJhdG9yKCUyMkdlbmVyYXRlJTIwYW4lMjBpbWFnZSUyMG9mJTIwYSUyMGNvb2wlMjBzdXJmZXIlMjBpbiUyMFRhaGl0aSUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>image_generator = Tool.from_space(
<span class="hljs-meta">... </span>    space_id=<span class="hljs-string">&quot;black-forest-labs/FLUX.1-schnell&quot;</span>,
<span class="hljs-meta">... </span>    name=<span class="hljs-string">&quot;image-generator&quot;</span>,
<span class="hljs-meta">... </span>    description=<span class="hljs-string">&quot;Generate an image from a prompt&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = image_generator(<span class="hljs-string">&quot;Generate an image of a cool surfer in Tahiti&quot;</span>)`,wrap:!1}}),{c(){i=a("p"),i.textContent=y,d=o(),p(v.$$.fragment)},l(c){i=l(c,"P",{"data-svelte-h":!0}),$(i)!=="svelte-kvfsh7"&&(i.textContent=y),d=n(c),g(v.$$.fragment,c)},m(c,C){m(c,i,C),m(c,d,C),u(v,c,C),_=!0},p:K,i(c){_||(h(v.$$.fragment,c),_=!0)},o(c){f(v.$$.fragment,c),_=!1},d(c){c&&(s(i),s(d)),b(v,c)}}}function ma(J){let i,y;return i=new lo({props:{code:"ZmFjZV9zd2FwcGVyJTIwJTNEJTIwVG9vbC5mcm9tX3NwYWNlKCUwQSUyMCUyMCUyMCUyMCUyMnR1YW4yMzA4JTJGZmFjZS1zd2FwJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyZmFjZV9zd2FwcGVyJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyVG9vbCUyMHRoYXQlMjBwdXRzJTIwdGhlJTIwZmFjZSUyMHNob3duJTIwb24lMjB0aGUlMjBmaXJzdCUyMGltYWdlJTIwb24lMjB0aGUlMjBzZWNvbmQlMjBpbWFnZS4lMjBZb3UlMjBjYW4lMjBnaXZlJTIwaXQlMjBwYXRocyUyMHRvJTIwaW1hZ2VzLiUyMiUyQyUwQSklMEFpbWFnZSUyMCUzRCUyMGZhY2Vfc3dhcHBlcignLiUyRmF5bWVyaWMuanBlZyclMkMlMjAnLiUyRnJ1dGguanBnJyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>face_swapper = Tool.from_space(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;tuan2308/face-swap&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;face_swapper&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Tool that puts the face shown on the first image on the second image. You can give it paths to images.&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = face_swapper(<span class="hljs-string">&#x27;./aymeric.jpeg&#x27;</span>, <span class="hljs-string">&#x27;./ruth.jpg&#x27;</span>)`,wrap:!1}}),{c(){p(i.$$.fragment)},l(d){g(i.$$.fragment,d)},m(d,v){u(i,d,v),y=!0},p:K,i(d){y||(h(i.$$.fragment,d),y=!0)},o(d){f(i.$$.fragment,d),y=!1},d(d){b(i,d)}}}function da(J){let i,y="Example:",d,v,_;return v=new lo({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBUb29sQ29sbGVjdGlvbiUyQyUyMENvZGVBZ2VudCUwQSUwQWltYWdlX3Rvb2xfY29sbGVjdGlvbiUyMCUzRCUyMFRvb2xDb2xsZWN0aW9uLmZyb21faHViKCUyMmh1Z2dpbmdmYWNlLXRvb2xzJTJGZGlmZnVzaW9uLXRvb2xzLTY2MzBiYjE5YTk0MmMyMzA2YTJjZGI2ZiUyMiklMEFhZ2VudCUyMCUzRCUyMENvZGVBZ2VudCh0b29scyUzRCU1QippbWFnZV90b29sX2NvbGxlY3Rpb24udG9vbHMlNUQlMkMlMjBhZGRfYmFzZV90b29scyUzRFRydWUpJTBBJTBBYWdlbnQucnVuKCUyMlBsZWFzZSUyMGRyYXclMjBtZSUyMGElMjBwaWN0dXJlJTIwb2YlMjByaXZlcnMlMjBhbmQlMjBsYWtlcy4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> ToolCollection, CodeAgent

<span class="hljs-meta">&gt;&gt;&gt; </span>image_tool_collection = ToolCollection.from_hub(<span class="hljs-string">&quot;huggingface-tools/diffusion-tools-6630bb19a942c2306a2cdb6f&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>agent = CodeAgent(tools=[*image_tool_collection.tools], add_base_tools=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>agent.run(<span class="hljs-string">&quot;Please draw me a picture of rivers and lakes.&quot;</span>)`,wrap:!1}}),{c(){i=a("p"),i.textContent=y,d=o(),p(v.$$.fragment)},l(c){i=l(c,"P",{"data-svelte-h":!0}),$(i)!=="svelte-11lpom8"&&(i.textContent=y),d=n(c),g(v.$$.fragment,c)},m(c,C){m(c,i,C),m(c,d,C),u(v,c,C),_=!0},p:K,i(c){_||(h(v.$$.fragment,c),_=!0)},o(c){f(v.$$.fragment,c),_=!1},d(c){c&&(s(i),s(d)),b(v,c)}}}function pa(J){let i,y="Example with a Stdio MCP server:",d,v,_;return v=new lo({props:{code:"aW1wb3J0JTIwb3MlMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMFRvb2xDb2xsZWN0aW9uJTJDJTIwQ29kZUFnZW50JTJDJTIwSW5mZXJlbmNlQ2xpZW50TW9kZWwlMEFmcm9tJTIwbWNwJTIwaW1wb3J0JTIwU3RkaW9TZXJ2ZXJQYXJhbWV0ZXJzJTBBJTBBbW9kZWwlMjAlM0QlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCgpJTBBJTBBc2VydmVyX3BhcmFtZXRlcnMlMjAlM0QlMjBTdGRpb1NlcnZlclBhcmFtZXRlcnMoJTBBJTIwJTIwJTIwJTIwY29tbWFuZCUzRCUyMnV2eCUyMiUyQyUwQSUyMCUyMCUyMCUyMGFyZ3MlM0QlNUIlMjItLXF1aWV0JTIyJTJDJTIwJTIycHVibWVkbWNwJTQwMC4xLjMlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBlbnYlM0QlN0IlMjJVVl9QWVRIT04lMjIlM0ElMjAlMjIzLjEyJTIyJTJDJTIwKipvcy5lbnZpcm9uJTdEJTJDJTBBKSUwQSUwQXdpdGglMjBUb29sQ29sbGVjdGlvbi5mcm9tX21jcChzZXJ2ZXJfcGFyYW1ldGVycyUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMjBhcyUyMHRvb2xfY29sbGVjdGlvbiUzQSUwQSUyMCUyMCUyMCUyMGFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCKnRvb2xfY29sbGVjdGlvbi50b29scyU1RCUyQyUyMGFkZF9iYXNlX3Rvb2xzJTNEVHJ1ZSUyQyUyMG1vZGVsJTNEbW9kZWwpJTBBJTIwJTIwJTIwJTIwYWdlbnQucnVuKCUyMlBsZWFzZSUyMGZpbmQlMjBhJTIwcmVtZWR5JTIwZm9yJTIwaGFuZ292ZXIuJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> os
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> ToolCollection, CodeAgent, InferenceClientModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> mcp <span class="hljs-keyword">import</span> StdioServerParameters

<span class="hljs-meta">&gt;&gt;&gt; </span>model = InferenceClientModel()

<span class="hljs-meta">&gt;&gt;&gt; </span>server_parameters = StdioServerParameters(
<span class="hljs-meta">&gt;&gt;&gt; </span>    command=<span class="hljs-string">&quot;uvx&quot;</span>,
<span class="hljs-meta">&gt;&gt;&gt; </span>    args=[<span class="hljs-string">&quot;--quiet&quot;</span>, <span class="hljs-string">&quot;pubmedmcp@0.1.3&quot;</span>],
<span class="hljs-meta">&gt;&gt;&gt; </span>    env={<span class="hljs-string">&quot;UV_PYTHON&quot;</span>: <span class="hljs-string">&quot;3.12&quot;</span>, **os.environ},
<span class="hljs-meta">&gt;&gt;&gt; </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> ToolCollection.from_mcp(server_parameters, trust_remote_code=<span class="hljs-literal">True</span>) <span class="hljs-keyword">as</span> tool_collection:
<span class="hljs-meta">&gt;&gt;&gt; </span>    agent = CodeAgent(tools=[*tool_collection.tools], add_base_tools=<span class="hljs-literal">True</span>, model=model)
<span class="hljs-meta">&gt;&gt;&gt; </span>    agent.run(<span class="hljs-string">&quot;Please find a remedy for hangover.&quot;</span>)`,wrap:!1}}),{c(){i=a("p"),i.textContent=y,d=o(),p(v.$$.fragment)},l(c){i=l(c,"P",{"data-svelte-h":!0}),$(i)!=="svelte-49dhgx"&&(i.textContent=y),d=n(c),g(v.$$.fragment,c)},m(c,C){m(c,i,C),m(c,d,C),u(v,c,C),_=!0},p:K,i(c){_||(h(v.$$.fragment,c),_=!0)},o(c){f(v.$$.fragment,c),_=!1},d(c){c&&(s(i),s(d)),b(v,c)}}}function ga(J){let i,y="Example with a Streamable HTTP MCP server:",d,v,_;return v=new lo({props:{code:"d2l0aCUyMFRvb2xDb2xsZWN0aW9uLmZyb21fbWNwKCU3QiUyMnVybCUyMiUzQSUyMCUyMmh0dHAlM0ElMkYlMkYxMjcuMC4wLjElM0E4MDAwJTJGbWNwJTIyJTJDJTIwJTIydHJhbnNwb3J0JTIyJTNBJTIwJTIyc3RyZWFtYWJsZS1odHRwJTIyJTdEJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUyMGFzJTIwdG9vbF9jb2xsZWN0aW9uJTNBJTBBJTIwJTIwJTIwJTIwYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQodG9vbHMlM0QlNUIqdG9vbF9jb2xsZWN0aW9uLnRvb2xzJTVEJTJDJTIwYWRkX2Jhc2VfdG9vbHMlM0RUcnVlJTJDJTIwbW9kZWwlM0Rtb2RlbCklMEElMjAlMjAlMjAlMjBhZ2VudC5ydW4oJTIyUGxlYXNlJTIwZmluZCUyMGElMjByZW1lZHklMjBmb3IlMjBoYW5nb3Zlci4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> ToolCollection.from_mcp({<span class="hljs-string">&quot;url&quot;</span>: <span class="hljs-string">&quot;http://127.0.0.1:8000/mcp&quot;</span>, <span class="hljs-string">&quot;transport&quot;</span>: <span class="hljs-string">&quot;streamable-http&quot;</span>}, trust_remote_code=<span class="hljs-literal">True</span>) <span class="hljs-keyword">as</span> tool_collection:
<span class="hljs-meta">&gt;&gt;&gt; </span>    agent = CodeAgent(tools=[*tool_collection.tools], add_base_tools=<span class="hljs-literal">True</span>, model=model)
<span class="hljs-meta">&gt;&gt;&gt; </span>    agent.run(<span class="hljs-string">&quot;Please find a remedy for hangover.&quot;</span>)`,wrap:!1}}),{c(){i=a("p"),i.textContent=y,d=o(),p(v.$$.fragment)},l(c){i=l(c,"P",{"data-svelte-h":!0}),$(i)!=="svelte-178fndi"&&(i.textContent=y),d=n(c),g(v.$$.fragment,c)},m(c,C){m(c,i,C),m(c,d,C),u(v,c,C),_=!0},p:K,i(c){_||(h(v.$$.fragment,c),_=!0)},o(c){f(v.$$.fragment,c),_=!1},d(c){c&&(s(i),s(d)),b(v,c)}}}function ua(J){let i,y="Example:",d,v,_;return v=new lo({props:{code:"JTIzJTIwZnVsbHklMjBtYW5hZ2VkJTIwY29udGV4dCUyMG1hbmFnZXIlMjAlMkIlMjBzdGRpbyUwQXdpdGglMjBNQ1BDbGllbnQoLi4uKSUyMGFzJTIwdG9vbHMlM0ElMEElMjAlMjAlMjAlMjAlMjMlMjB0b29scyUyMGFyZSUyMG5vdyUyMGF2YWlsYWJsZSUwQSUwQSUyMyUyMGNvbnRleHQlMjBtYW5hZ2VyJTIwJTJCJTIwU3RyZWFtYWJsZSUyMEhUVFAlMjB0cmFuc3BvcnQlM0ElMEF3aXRoJTIwTUNQQ2xpZW50KCU3QiUyMnVybCUyMiUzQSUyMCUyMmh0dHAlM0ElMkYlMkZsb2NhbGhvc3QlM0E4MDAwJTJGbWNwJTIyJTJDJTIwJTIydHJhbnNwb3J0JTIyJTNBJTIwJTIyc3RyZWFtYWJsZS1odHRwJTIyJTdEKSUyMGFzJTIwdG9vbHMlM0ElMEElMjAlMjAlMjAlMjAlMjMlMjB0b29scyUyMGFyZSUyMG5vdyUyMGF2YWlsYWJsZSUwQSUwQSUyMyUyMG1hbnVhbGx5JTIwbWFuYWdlJTIwdGhlJTIwY29ubmVjdGlvbiUyMHZpYSUyMHRoZSUyMG1jcF9jbGllbnQlMjBvYmplY3QlM0ElMEF0cnklM0ElMEElMjAlMjAlMjAlMjBtY3BfY2xpZW50JTIwJTNEJTIwTUNQQ2xpZW50KC4uLiklMEElMjAlMjAlMjAlMjB0b29scyUyMCUzRCUyMG1jcF9jbGllbnQuZ2V0X3Rvb2xzKCklMEElMEElMjAlMjAlMjAlMjAlMjMlMjB1c2UlMjB5b3VyJTIwdG9vbHMlMjBoZXJlLiUwQWZpbmFsbHklM0ElMEElMjAlMjAlMjAlMjBtY3BfY2xpZW50LmRpc2Nvbm5lY3QoKQ==",highlighted:`<span class="hljs-comment"># fully managed context manager + stdio</span>
<span class="hljs-keyword">with</span> MCPClient(...) <span class="hljs-keyword">as</span> tools:
    <span class="hljs-comment"># tools are now available</span>

<span class="hljs-comment"># context manager + Streamable HTTP transport:</span>
<span class="hljs-keyword">with</span> MCPClient({<span class="hljs-string">&quot;url&quot;</span>: <span class="hljs-string">&quot;http://localhost:8000/mcp&quot;</span>, <span class="hljs-string">&quot;transport&quot;</span>: <span class="hljs-string">&quot;streamable-http&quot;</span>}) <span class="hljs-keyword">as</span> tools:
    <span class="hljs-comment"># tools are now available</span>

<span class="hljs-comment"># manually manage the connection via the mcp_client object:</span>
<span class="hljs-keyword">try</span>:
    mcp_client = MCPClient(...)
    tools = mcp_client.get_tools()

    <span class="hljs-comment"># use your tools here.</span>
<span class="hljs-keyword">finally</span>:
    mcp_client.disconnect()`,wrap:!1}}),{c(){i=a("p"),i.textContent=y,d=o(),p(v.$$.fragment)},l(c){i=l(c,"P",{"data-svelte-h":!0}),$(i)!=="svelte-11lpom8"&&(i.textContent=y),d=n(c),g(v.$$.fragment,c)},m(c,C){m(c,i,C),m(c,d,C),u(v,c,C),_=!0},p:K,i(c){_||(h(v.$$.fragment,c),_=!0)},o(c){f(v.$$.fragment,c),_=!1},d(c){c&&(s(i),s(d)),b(v,c)}}}function ha(J){let i,y,d,v,_,c,C,io,_e,cs=`To learn more about agents and tools make sure to read the <a href="../index">introductory guide</a>. This page
contains the API docs for the underlying classes.`,co,Te,mo,Me,po,V,we,Yo,bt,ms="Main function to quickly load a tool from the Hub.",qo,O,go,xe,uo,R,Ce,zo,$t,ds="Convert a function into an instance of a dynamically created Tool subclass.",ho,je,fo,T,Je,Xo,vt,ps=`A base class for the functions used by the agent. Subclass this and implement the <code>forward</code> method as well as the
following class attributes:`,Ko,yt,gs=`<li><strong>description</strong> (<code>str</code>) — A short description of what your tool does, the inputs it expects and the output(s) it
will return. For instance ‘This is a tool that downloads a file from a <code>url</code>. It takes the <code>url</code> as input, and
returns the text contained in the file’.</li> <li><strong>name</strong> (<code>str</code>) — A performative name that will be used for your tool in the prompt to the agent. For instance
<code>&quot;text-classifier&quot;</code> or <code>&quot;image_generator&quot;</code>.</li> <li><strong>inputs</strong> (<code>Dict[str, Dict[str, Union[str, type, bool]]]</code>) — The dict of modalities expected for the inputs.
It has one <code>type</code>key and a <code>description</code>key.
This is used by <code>launch_gradio_demo</code> or to make a nice space from your tool, and also can be used in the generated
description for your tool.</li> <li><strong>output_type</strong> (<code>type</code>) — The type of the tool output. This is used by <code>launch_gradio_demo</code>
or to make a nice space from your tool, and also can be used in the generated description for your tool.</li>`,Oo,_t,us=`You can also override the method <a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.Tool.setup">setup()</a> if your tool has an expensive operation to perform before being
usable (such as loading a model). <a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.Tool.setup">setup()</a> will be called the first time you use your tool, but not at
instantiation.`,en,ee,Ie,tn,Tt,hs="Create tool from a dictionary representation.",on,te,Ue,nn,Mt,fs='Creates a <a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.Tool">Tool</a> from a gradio tool.',sn,H,ke,an,wt,bs="Loads a tool defined on the Hub.",ln,oe,rn,ne,Ae,cn,xt,$s='Creates a <a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.Tool">Tool</a> from a langchain tool.',mn,L,Pe,dn,Ct,vs='Creates a <a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.Tool">Tool</a> from a Space given its id on the Hub.',pn,se,gn,ae,un,le,Ze,hn,jt,ys="Upload the tool to the Hub.",fn,N,Ee,bn,Jt,_s=`Saves the relevant code files for your tool so it can be pushed to the Hub. This will copy the code of your
tool in <code>output_dir</code> as well as autogenerate:`,$n,It,Ts=`<li>a <code>{tool_file_name}.py</code> file containing the logic for your tool.
If you pass <code>make_gradio_app=True</code>, this will also write:</li> <li>an <code>app.py</code> file providing a UI for your tool when it is exported to a Space with <code>tool.push_to_hub()</code></li> <li>a <code>requirements.txt</code> containing the names of the modules used by your tool (as detected when inspecting its
code)</li>`,vn,re,We,yn,Ut,Ms=`Overwrite this method here for any operation that is expensive and needs to be executed before you start using
your tool. Such as loading a big model.`,_n,ie,Le,Tn,kt,ws="Returns a dictionary representing the tool",bo,Be,$o,Y,Se,Mn,At,xs=`Launches a gradio demo for a tool. The corresponding tool class needs to properly implement the class attributes
<code>inputs</code> and <code>output_type</code>.`,vo,Ve,yo,I,Ge,wn,Pt,Cs="Tool collections enable loading a collection of tools in the agent’s toolbox.",xn,Zt,js="Collections can be loaded from a collection in the Hub or from an MCP server, see:",Cn,Et,Js='<li><a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.ToolCollection.from_hub">ToolCollection.from_hub()</a></li> <li><a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.ToolCollection.from_mcp">ToolCollection.from_mcp()</a></li>',jn,Wt,Is='For example and usage, see: <a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.ToolCollection.from_hub">ToolCollection.from_hub()</a> and <a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.ToolCollection.from_mcp">ToolCollection.from_mcp()</a>',Jn,P,He,In,Lt,Us="Loads a tool collection from the Hub.",Un,Bt,ks="it adds a collection of tools from all Spaces in the collection to the agent’s toolbox",kn,St,As=`<p>[!NOTE]
Only Spaces will be fetched, so you can feel free to add models and datasets to your collection if you’d
like for this collection to showcase them.</p>`,An,ce,Pn,k,Ne,Zn,Vt,Ps="Automatically load a tool collection from an MCP server.",En,Gt,Zs=`This method supports Stdio, Streamable HTTP, and legacy HTTP+SSE MCP servers. Look at the <code>server_parameters</code>
argument for more details on how to connect to each MCP server.`,Wn,Ht,Es=`Note: a separate thread will be spawned to run an asyncio event loop handling
the MCP server.`,Ln,me,Bn,de,_o,De,To,U,Fe,Sn,Nt,Ws="Manages the connection to an MCP server and make its tools available to SmolAgents.",Vn,Dt,Ls=`Note: tools can only be accessed after the connection has been started with the
<code>connect()</code> method, done during the init. If you don’t use the context manager
we strongly encourage to use “try … finally” to ensure the connection is cleaned up.`,Gn,pe,Hn,ge,Qe,Nn,Ft,Bs="Connect to the MCP server and initialize the tools.",Dn,ue,Re,Fn,Qt,Ss="Disconnect from the MCP server",Qn,D,Ye,Rn,Rt,Vs="The SmolAgents tools available from the MCP server.",Yn,Yt,Gs=`Note: for now, this always returns the tools available at the creation of the session,
but it will in a future release return also new tools available from the MCP server if
any at call time.`,Mo,qe,wo,ze,Hs=`Agents can handle any type of object in-between tools; tools, being completely multimodal, can accept and return
text, image, audio, video, among other types. In order to increase compatibility between tools, as well as to
correctly render these returns in ipython (jupyter, colab, ipython notebooks, …), we implement wrapper classes
around these types.`,xo,Xe,Ns=`The wrapped objects should continue behaving as initially; a text object should still behave as a string, an image
object should still behave as a <code>PIL.Image</code>.`,Co,Ke,Ds="These types have three specific purposes:",jo,Oe,Fs=`<li>Calling <code>to_raw</code> on the type should return the underlying object</li> <li>Calling <code>to_string</code> on the type should return the object as a string: that can be the string in case of an <code>AgentText</code>
but will be the path of the serialized version of the object in other instances</li> <li>Displaying it in an ipython kernel should display the object correctly</li>`,Jo,et,Io,q,tt,qn,qt,Qs="Text type returned by the agent. Behaves as a string.",Uo,ot,ko,A,nt,zn,zt,Rs="Image type returned by the agent. Behaves as a PIL.Image.Image.",Xn,he,st,Kn,Xt,Ys="Saves the image to a file.",On,fe,at,es,Kt,qs="Returns the “raw” version of that object. In the case of an AgentImage, it is a PIL.Image.Image.",ts,be,lt,os,Ot,zs=`Returns the stringified version of that object. In the case of an AgentImage, it is a path to the serialized
version of the image.`,Ao,rt,Po,W,it,ns,eo,Xs="Audio type returned by the agent.",ss,$e,ct,as,to,Ks="Returns the “raw” version of that object. It is a <code>torch.Tensor</code> object.",ls,ve,mt,rs,oo,Os=`Returns the stringified version of that object. In the case of an AgentAudio, it is a path to the serialized
version of the audio.`,Zo,dt,Eo,ro,Wo;return _=new S({props:{title:"Tools",local:"tools",headingTag:"h1"}}),C=new is({props:{warning:!0,$$slots:{default:[la]},$$scope:{ctx:J}}}),Te=new S({props:{title:"Tool Base Classes",local:"tool-base-classes",headingTag:"h2"}}),Me=new S({props:{title:"load_tool",local:"smolagents.load_tool",headingTag:"h3"}}),we=new j({props:{name:"smolagents.load_tool",anchor:"smolagents.load_tool",parameters:[{name:"repo_id",val:""},{name:"model_repo_id",val:": str | None = None"},{name:"token",val:": str | None = None"},{name:"trust_remote_code",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.load_tool.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
Space repo ID of a tool on the Hub.`,name:"repo_id"},{anchor:"smolagents.load_tool.model_repo_id",description:`<strong>model_repo_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Use this argument to use a different model than the default one for the tool you selected.`,name:"model_repo_id"},{anchor:"smolagents.load_tool.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to identify you on hf.co. If unset, will use the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"smolagents.load_tool.trust_remote_code",description:`<strong>trust_remote_code</strong> (<code>bool</code>, <em>optional</em>, defaults to False) &#x2014;
This needs to be accepted in order to load a tool from Hub.`,name:"trust_remote_code"},{anchor:"smolagents.load_tool.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Additional keyword arguments that will be split in two: all arguments relevant to the Hub (such as
<code>cache_dir</code>, <code>revision</code>, <code>subfolder</code>) will be used when downloading the files for your tool, and the others
will be passed along to its init.`,name:"kwargs"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L791"}}),O=new is({props:{warning:!0,$$slots:{default:[ra]},$$scope:{ctx:J}}}),xe=new S({props:{title:"tool",local:"smolagents.tool",headingTag:"h3"}}),Ce=new j({props:{name:"smolagents.tool",anchor:"smolagents.tool",parameters:[{name:"tool_function",val:": Callable"}],parametersDescription:[{anchor:"smolagents.tool.tool_function",description:`<strong>tool_function</strong> (<code>Callable</code>) &#x2014; Function to convert into a Tool subclass.
Should have type hints for each input and a type hint for the output.
Should also have a docstring including the description of the function
and an &#x2018;Args:&#x2019; part where each argument is described.`,name:"tool_function"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L985"}}),je=new S({props:{title:"Tool",local:"smolagents.Tool",headingTag:"h3"}}),Je=new j({props:{name:"class smolagents.Tool",anchor:"smolagents.Tool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L106"}}),Ie=new j({props:{name:"from_dict",anchor:"smolagents.Tool.from_dict",parameters:[{name:"tool_dict",val:": dict[str, Any]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.Tool.from_dict.tool_dict",description:"<strong>tool_dict</strong> (<code>dict[str, Any]</code>) &#x2014; Dictionary representation of the tool.",name:"tool_dict"},{anchor:"smolagents.Tool.from_dict.*kwargs",description:"*<strong>*kwargs</strong> &#x2014; Additional keyword arguments to pass to the tool&#x2019;s constructor.",name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L329",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Tool object.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Tool</code></p>
`}}),Ue=new j({props:{name:"from_gradio",anchor:"smolagents.Tool.from_gradio",parameters:[{name:"gradio_tool",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L692"}}),ke=new j({props:{name:"from_hub",anchor:"smolagents.Tool.from_hub",parameters:[{name:"repo_id",val:": str"},{name:"token",val:": str | None = None"},{name:"trust_remote_code",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.Tool.from_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the Space repo on the Hub where your tool is defined.`,name:"repo_id"},{anchor:"smolagents.Tool.from_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to identify you on hf.co. If unset, will use the token generated when running
<code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"smolagents.Tool.from_hub.trust_remote_code(str,",description:`<strong>trust_remote_code(<code>str</code>,</strong> <em>optional</em>, defaults to False) &#x2014;
This flags marks that you understand the risk of running remote code and that you trust this tool.
If not setting this to True, loading the tool from Hub will fail.`,name:"trust_remote_code(str,"},{anchor:"smolagents.Tool.from_hub.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Additional keyword arguments that will be split in two: all arguments relevant to the Hub (such as
<code>cache_dir</code>, <code>revision</code>, <code>subfolder</code>) will be used when downloading the files for your tool, and the
others will be passed along to its init.`,name:"kwargs"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L471"}}),oe=new is({props:{warning:!0,$$slots:{default:[ia]},$$scope:{ctx:J}}}),Ae=new j({props:{name:"from_langchain",anchor:"smolagents.Tool.from_langchain",parameters:[{name:"langchain_tool",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L713"}}),Pe=new j({props:{name:"from_space",anchor:"smolagents.Tool.from_space",parameters:[{name:"space_id",val:": str"},{name:"name",val:": str"},{name:"description",val:": str"},{name:"api_name",val:": str | None = None"},{name:"token",val:": str | None = None"}],parametersDescription:[{anchor:"smolagents.Tool.from_space.space_id",description:`<strong>space_id</strong> (<code>str</code>) &#x2014;
The id of the Space on the Hub.`,name:"space_id"},{anchor:"smolagents.Tool.from_space.name",description:`<strong>name</strong> (<code>str</code>) &#x2014;
The name of the tool.`,name:"name"},{anchor:"smolagents.Tool.from_space.description",description:`<strong>description</strong> (<code>str</code>) &#x2014;
The description of the tool.`,name:"description"},{anchor:"smolagents.Tool.from_space.api_name",description:`<strong>api_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The specific api_name to use, if the space has several tabs. If not precised, will default to the first available api.`,name:"api_name"},{anchor:"smolagents.Tool.from_space.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Add your token to access private spaces or increase your GPU quotas.`,name:"token"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L550",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The Space, as a tool.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a href="/docs/smolagents/v1.21.1/en/reference/tools#smolagents.Tool">Tool</a></p>
`}}),se=new ao({props:{anchor:"smolagents.Tool.from_space.example",$$slots:{default:[ca]},$$scope:{ctx:J}}}),ae=new ao({props:{anchor:"smolagents.Tool.from_space.example-2",$$slots:{default:[ma]},$$scope:{ctx:J}}}),Ze=new j({props:{name:"push_to_hub",anchor:"smolagents.Tool.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"commit_message",val:": str = 'Upload tool'"},{name:"private",val:": bool | None = None"},{name:"token",val:": bool | str | None = None"},{name:"create_pr",val:": bool = False"}],parametersDescription:[{anchor:"smolagents.Tool.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your tool to. It should contain your organization name when
pushing to a given organization.`,name:"repo_id"},{anchor:"smolagents.Tool.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;Upload tool&quot;</code>) &#x2014;
Message to commit while pushing.`,name:"commit_message"},{anchor:"smolagents.Tool.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,name:"private"},{anchor:"smolagents.Tool.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If unset, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"smolagents.Tool.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to create a PR with the uploaded files or directly commit.`,name:"create_pr"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L376"}}),Ee=new j({props:{name:"save",anchor:"smolagents.Tool.save",parameters:[{name:"output_dir",val:": str | Path"},{name:"tool_file_name",val:": str = 'tool'"},{name:"make_gradio_app",val:": bool = True"}],parametersDescription:[{anchor:"smolagents.Tool.save.output_dir",description:"<strong>output_dir</strong> (<code>str</code> or <code>Path</code>) &#x2014; The folder in which you want to save your tool.",name:"output_dir"},{anchor:"smolagents.Tool.save.tool_file_name",description:"<strong>tool_file_name</strong> (<code>str</code>, <em>optional</em>) &#x2014; The file name in which you want to save your tool.",name:"tool_file_name"},{anchor:"smolagents.Tool.save.make_gradio_app",description:"<strong>make_gradio_app</strong> (<code>bool</code>, <em>optional</em>, defaults to True) &#x2014; Whether to also export a <code>requirements.txt</code> file and Gradio UI.",name:"make_gradio_app"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L345"}}),We=new j({props:{name:"setup",anchor:"smolagents.Tool.setup",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L241"}}),Le=new j({props:{name:"to_dict",anchor:"smolagents.Tool.to_dict",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L264"}}),Be=new S({props:{title:"launch_gradio_demo",local:"smolagents.launch_gradio_demo",headingTag:"h3"}}),Se=new j({props:{name:"smolagents.launch_gradio_demo",anchor:"smolagents.launch_gradio_demo",parameters:[{name:"tool",val:": Tool"}],parametersDescription:[{anchor:"smolagents.launch_gradio_demo.tool",description:"<strong>tool</strong> (<code>Tool</code>) &#x2014; The tool for which to launch the demo.",name:"tool"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L745"}}),Ve=new S({props:{title:"ToolCollection",local:"smolagents.ToolCollection",headingTag:"h2"}}),Ge=new j({props:{name:"class smolagents.ToolCollection",anchor:"smolagents.ToolCollection",parameters:[{name:"tools",val:": list[Tool]"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L846"}}),He=new j({props:{name:"from_hub",anchor:"smolagents.ToolCollection.from_hub",parameters:[{name:"collection_slug",val:": str"},{name:"token",val:": str | None = None"},{name:"trust_remote_code",val:": bool = False"}],parametersDescription:[{anchor:"smolagents.ToolCollection.from_hub.collection_slug",description:"<strong>collection_slug</strong> (str) &#x2014; The collection slug referencing the collection.",name:"collection_slug"},{anchor:"smolagents.ToolCollection.from_hub.token",description:"<strong>token</strong> (str, <em>optional</em>) &#x2014; The authentication token if the collection is private.",name:"token"},{anchor:"smolagents.ToolCollection.from_hub.trust_remote_code",description:"<strong>trust_remote_code</strong> (bool, <em>optional</em>, defaults to False) &#x2014; Whether to trust the remote code.",name:"trust_remote_code"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L860",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A tool collection instance loaded with the tools.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>ToolCollection</p>
`}}),ce=new ao({props:{anchor:"smolagents.ToolCollection.from_hub.example",$$slots:{default:[da]},$$scope:{ctx:J}}}),Ne=new j({props:{name:"from_mcp",anchor:"smolagents.ToolCollection.from_mcp",parameters:[{name:"server_parameters",val:": 'mcp.StdioServerParameters' | dict"},{name:"trust_remote_code",val:": bool = False"}],parametersDescription:[{anchor:"smolagents.ToolCollection.from_mcp.server_parameters",description:`<strong>server_parameters</strong> (<code>mcp.StdioServerParameters</code> or <code>dict</code>) &#x2014;
Configuration parameters to connect to the MCP server. This can be:</p>
<ul>
<li>
<p>An instance of <code>mcp.StdioServerParameters</code> for connecting a Stdio MCP server via standard input/output using a subprocess.</p>
</li>
<li>
<p>A <code>dict</code> with at least:</p>
<ul>
<li>&#x201C;url&#x201D;: URL of the server.</li>
<li>&#x201C;transport&#x201D;: Transport protocol to use, one of:<ul>
<li>&#x201C;streamable-http&#x201D;: Streamable HTTP transport (default).</li>
<li>&#x201C;sse&#x201D;: Legacy HTTP+SSE transport (deprecated).</li>
</ul></li>
</ul>
</li>
</ul>`,name:"server_parameters"},{anchor:"smolagents.ToolCollection.from_mcp.trust_remote_code",description:`<strong>trust_remote_code</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to trust the execution of code from tools defined on the MCP server.
This option should only be set to <code>True</code> if you trust the MCP server,
and undertand the risks associated with running remote code on your local machine.
If set to <code>False</code>, loading tools from MCP will fail.`,name:"trust_remote_code"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/tools.py#L900",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A tool collection instance.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>ToolCollection</p>
`}}),me=new ao({props:{anchor:"smolagents.ToolCollection.from_mcp.example",$$slots:{default:[pa]},$$scope:{ctx:J}}}),de=new ao({props:{anchor:"smolagents.ToolCollection.from_mcp.example-2",$$slots:{default:[ga]},$$scope:{ctx:J}}}),De=new S({props:{title:"MCP Client",local:"smolagents.MCPClient",headingTag:"h2"}}),Fe=new j({props:{name:"class smolagents.MCPClient",anchor:"smolagents.MCPClient",parameters:[{name:"server_parameters",val:": 'StdioServerParameters' | dict[str, Any] | list['StdioServerParameters' | dict[str, Any]]"},{name:"adapter_kwargs",val:": dict[str, Any] | None = None"}],parametersDescription:[{anchor:"smolagents.MCPClient.server_parameters",description:`<strong>server_parameters</strong> (StdioServerParameters | dict[str, Any] | list[StdioServerParameters | dict[str, Any]]) &#x2014;
Configuration parameters to connect to the MCP server. Can be a list if you want to connect multiple MCPs at once.</p>
<ul>
<li>
<p>An instance of <code>mcp.StdioServerParameters</code> for connecting a Stdio MCP server via standard input/output using a subprocess.</p>
</li>
<li>
<p>A <code>dict</code> with at least:</p>
<ul>
<li>&#x201C;url&#x201D;: URL of the server.</li>
<li>&#x201C;transport&#x201D;: Transport protocol to use, one of:<ul>
<li>&#x201C;streamable-http&#x201D;: Streamable HTTP transport (default).</li>
<li>&#x201C;sse&#x201D;: Legacy HTTP+SSE transport (deprecated).</li>
</ul></li>
</ul>
</li>
</ul>`,name:"server_parameters"},{anchor:"smolagents.MCPClient.adapter_kwargs",description:`<strong>adapter_kwargs</strong> (dict[str, Any], optional) &#x2014;
Additional keyword arguments to be passed directly to <code>MCPAdapt</code>.`,name:"adapter_kwargs"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/mcp_client.py#L32"}}),pe=new ao({props:{anchor:"smolagents.MCPClient.example",$$slots:{default:[ua]},$$scope:{ctx:J}}}),Qe=new j({props:{name:"connect",anchor:"smolagents.MCPClient.connect",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/mcp_client.py#L98"}}),Re=new j({props:{name:"disconnect",anchor:"smolagents.MCPClient.disconnect",parameters:[{name:"exc_type",val:": type[BaseException] | None = None"},{name:"exc_value",val:": BaseException | None = None"},{name:"exc_traceback",val:": TracebackType | None = None"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/mcp_client.py#L102"}}),Ye=new j({props:{name:"get_tools",anchor:"smolagents.MCPClient.get_tools",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/mcp_client.py#L111",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The SmolAgents tools available from the MCP server.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>list[Tool]</p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><code>ValueError</code> — If the MCP server tools is None (usually assuming the server is not started).</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code></p>
`}}),qe=new S({props:{title:"Agent Types",local:"agent-types",headingTag:"h2"}}),et=new S({props:{title:"AgentText",local:"smolagents.AgentText",headingTag:"h3"}}),tt=new j({props:{name:"class smolagents.AgentText",anchor:"smolagents.AgentText",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/agent_types.py#L62"}}),ot=new S({props:{title:"AgentImage",local:"smolagents.AgentImage",headingTag:"h3"}}),nt=new j({props:{name:"class smolagents.AgentImage",anchor:"smolagents.AgentImage",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/agent_types.py#L74"}}),st=new j({props:{name:"save",anchor:"smolagents.AgentImage.save",parameters:[{name:"output_bytes",val:""},{name:"format",val:": str = None"},{name:"**params",val:""}],parametersDescription:[{anchor:"smolagents.AgentImage.save.output_bytes",description:"<strong>output_bytes</strong> (bytes) &#x2014; The output bytes to save the image to.",name:"output_bytes"},{anchor:"smolagents.AgentImage.save.format",description:"<strong>format</strong> (str) &#x2014; The format to use for the output image. The format is the same as in PIL.Image.save.",name:"format"},{anchor:"smolagents.AgentImage.save.*params",description:"*<strong>*params</strong> &#x2014; Additional parameters to pass to PIL.Image.save.",name:"*params"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/agent_types.py#L164"}}),at=new j({props:{name:"to_raw",anchor:"smolagents.AgentImage.to_raw",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/agent_types.py#L119"}}),lt=new j({props:{name:"to_string",anchor:"smolagents.AgentImage.to_string",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/agent_types.py#L136"}}),rt=new S({props:{title:"AgentAudio",local:"smolagents.AgentAudio",headingTag:"h3"}}),it=new j({props:{name:"class smolagents.AgentAudio",anchor:"smolagents.AgentAudio",parameters:[{name:"value",val:""},{name:"samplerate",val:" = 16000"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/agent_types.py#L176"}}),ct=new j({props:{name:"to_raw",anchor:"smolagents.AgentAudio.to_raw",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/agent_types.py#L216"}}),mt=new j({props:{name:"to_string",anchor:"smolagents.AgentAudio.to_string",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.1/src/smolagents/agent_types.py#L237"}}),dt=new aa({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/en/reference/tools.md"}}),{c(){i=a("meta"),y=o(),d=a("p"),v=o(),p(_.$$.fragment),c=o(),p(C.$$.fragment),io=o(),_e=a("p"),_e.innerHTML=cs,co=o(),p(Te.$$.fragment),mo=o(),p(Me.$$.fragment),po=o(),V=a("div"),p(we.$$.fragment),Yo=o(),bt=a("p"),bt.textContent=ms,qo=o(),p(O.$$.fragment),go=o(),p(xe.$$.fragment),uo=o(),R=a("div"),p(Ce.$$.fragment),zo=o(),$t=a("p"),$t.textContent=ds,ho=o(),p(je.$$.fragment),fo=o(),T=a("div"),p(Je.$$.fragment),Xo=o(),vt=a("p"),vt.innerHTML=ps,Ko=o(),yt=a("ul"),yt.innerHTML=gs,Oo=o(),_t=a("p"),_t.innerHTML=us,en=o(),ee=a("div"),p(Ie.$$.fragment),tn=o(),Tt=a("p"),Tt.textContent=hs,on=o(),te=a("div"),p(Ue.$$.fragment),nn=o(),Mt=a("p"),Mt.innerHTML=fs,sn=o(),H=a("div"),p(ke.$$.fragment),an=o(),wt=a("p"),wt.textContent=bs,ln=o(),p(oe.$$.fragment),rn=o(),ne=a("div"),p(Ae.$$.fragment),cn=o(),xt=a("p"),xt.innerHTML=$s,mn=o(),L=a("div"),p(Pe.$$.fragment),dn=o(),Ct=a("p"),Ct.innerHTML=vs,pn=o(),p(se.$$.fragment),gn=o(),p(ae.$$.fragment),un=o(),le=a("div"),p(Ze.$$.fragment),hn=o(),jt=a("p"),jt.textContent=ys,fn=o(),N=a("div"),p(Ee.$$.fragment),bn=o(),Jt=a("p"),Jt.innerHTML=_s,$n=o(),It=a("ul"),It.innerHTML=Ts,vn=o(),re=a("div"),p(We.$$.fragment),yn=o(),Ut=a("p"),Ut.textContent=Ms,_n=o(),ie=a("div"),p(Le.$$.fragment),Tn=o(),kt=a("p"),kt.textContent=ws,bo=o(),p(Be.$$.fragment),$o=o(),Y=a("div"),p(Se.$$.fragment),Mn=o(),At=a("p"),At.innerHTML=xs,vo=o(),p(Ve.$$.fragment),yo=o(),I=a("div"),p(Ge.$$.fragment),wn=o(),Pt=a("p"),Pt.textContent=Cs,xn=o(),Zt=a("p"),Zt.textContent=js,Cn=o(),Et=a("ul"),Et.innerHTML=Js,jn=o(),Wt=a("p"),Wt.innerHTML=Is,Jn=o(),P=a("div"),p(He.$$.fragment),In=o(),Lt=a("p"),Lt.textContent=Us,Un=o(),Bt=a("p"),Bt.textContent=ks,kn=o(),St=a("blockquote"),St.innerHTML=As,An=o(),p(ce.$$.fragment),Pn=o(),k=a("div"),p(Ne.$$.fragment),Zn=o(),Vt=a("p"),Vt.textContent=Ps,En=o(),Gt=a("p"),Gt.innerHTML=Zs,Wn=o(),Ht=a("p"),Ht.textContent=Es,Ln=o(),p(me.$$.fragment),Bn=o(),p(de.$$.fragment),_o=o(),p(De.$$.fragment),To=o(),U=a("div"),p(Fe.$$.fragment),Sn=o(),Nt=a("p"),Nt.textContent=Ws,Vn=o(),Dt=a("p"),Dt.innerHTML=Ls,Gn=o(),p(pe.$$.fragment),Hn=o(),ge=a("div"),p(Qe.$$.fragment),Nn=o(),Ft=a("p"),Ft.textContent=Bs,Dn=o(),ue=a("div"),p(Re.$$.fragment),Fn=o(),Qt=a("p"),Qt.textContent=Ss,Qn=o(),D=a("div"),p(Ye.$$.fragment),Rn=o(),Rt=a("p"),Rt.textContent=Vs,Yn=o(),Yt=a("p"),Yt.textContent=Gs,Mo=o(),p(qe.$$.fragment),wo=o(),ze=a("p"),ze.textContent=Hs,xo=o(),Xe=a("p"),Xe.innerHTML=Ns,Co=o(),Ke=a("p"),Ke.textContent=Ds,jo=o(),Oe=a("ul"),Oe.innerHTML=Fs,Jo=o(),p(et.$$.fragment),Io=o(),q=a("div"),p(tt.$$.fragment),qn=o(),qt=a("p"),qt.textContent=Qs,Uo=o(),p(ot.$$.fragment),ko=o(),A=a("div"),p(nt.$$.fragment),zn=o(),zt=a("p"),zt.textContent=Rs,Xn=o(),he=a("div"),p(st.$$.fragment),Kn=o(),Xt=a("p"),Xt.textContent=Ys,On=o(),fe=a("div"),p(at.$$.fragment),es=o(),Kt=a("p"),Kt.textContent=qs,ts=o(),be=a("div"),p(lt.$$.fragment),os=o(),Ot=a("p"),Ot.textContent=zs,Ao=o(),p(rt.$$.fragment),Po=o(),W=a("div"),p(it.$$.fragment),ns=o(),eo=a("p"),eo.textContent=Xs,ss=o(),$e=a("div"),p(ct.$$.fragment),as=o(),to=a("p"),to.innerHTML=Ks,ls=o(),ve=a("div"),p(mt.$$.fragment),rs=o(),oo=a("p"),oo.textContent=Os,Zo=o(),p(dt.$$.fragment),Eo=o(),ro=a("p"),this.h()},l(e){const r=sa("svelte-u9bgzb",document.head);i=l(r,"META",{name:!0,content:!0}),r.forEach(s),y=n(e),d=l(e,"P",{}),M(d).forEach(s),v=n(e),g(_.$$.fragment,e),c=n(e),g(C.$$.fragment,e),io=n(e),_e=l(e,"P",{"data-svelte-h":!0}),$(_e)!=="svelte-17nnzxz"&&(_e.innerHTML=cs),co=n(e),g(Te.$$.fragment,e),mo=n(e),g(Me.$$.fragment,e),po=n(e),V=l(e,"DIV",{class:!0});var z=M(V);g(we.$$.fragment,z),Yo=n(z),bt=l(z,"P",{"data-svelte-h":!0}),$(bt)!=="svelte-fgf0mn"&&(bt.textContent=ms),qo=n(z),g(O.$$.fragment,z),z.forEach(s),go=n(e),g(xe.$$.fragment,e),uo=n(e),R=l(e,"DIV",{class:!0});var pt=M(R);g(Ce.$$.fragment,pt),zo=n(pt),$t=l(pt,"P",{"data-svelte-h":!0}),$($t)!=="svelte-1yvj8b1"&&($t.textContent=ds),pt.forEach(s),ho=n(e),g(je.$$.fragment,e),fo=n(e),T=l(e,"DIV",{class:!0});var x=M(T);g(Je.$$.fragment,x),Xo=n(x),vt=l(x,"P",{"data-svelte-h":!0}),$(vt)!=="svelte-1poxk5s"&&(vt.innerHTML=ps),Ko=n(x),yt=l(x,"UL",{"data-svelte-h":!0}),$(yt)!=="svelte-19a37je"&&(yt.innerHTML=gs),Oo=n(x),_t=l(x,"P",{"data-svelte-h":!0}),$(_t)!=="svelte-o8rmni"&&(_t.innerHTML=us),en=n(x),ee=l(x,"DIV",{class:!0});var gt=M(ee);g(Ie.$$.fragment,gt),tn=n(gt),Tt=l(gt,"P",{"data-svelte-h":!0}),$(Tt)!=="svelte-2agex6"&&(Tt.textContent=hs),gt.forEach(s),on=n(x),te=l(x,"DIV",{class:!0});var ut=M(te);g(Ue.$$.fragment,ut),nn=n(ut),Mt=l(ut,"P",{"data-svelte-h":!0}),$(Mt)!=="svelte-1lc9uyg"&&(Mt.innerHTML=fs),ut.forEach(s),sn=n(x),H=l(x,"DIV",{class:!0});var X=M(H);g(ke.$$.fragment,X),an=n(X),wt=l(X,"P",{"data-svelte-h":!0}),$(wt)!=="svelte-yy7b2c"&&(wt.textContent=bs),ln=n(X),g(oe.$$.fragment,X),X.forEach(s),rn=n(x),ne=l(x,"DIV",{class:!0});var ht=M(ne);g(Ae.$$.fragment,ht),cn=n(ht),xt=l(ht,"P",{"data-svelte-h":!0}),$(xt)!=="svelte-hbg1av"&&(xt.innerHTML=$s),ht.forEach(s),mn=n(x),L=l(x,"DIV",{class:!0});var G=M(L);g(Pe.$$.fragment,G),dn=n(G),Ct=l(G,"P",{"data-svelte-h":!0}),$(Ct)!=="svelte-11hau57"&&(Ct.innerHTML=vs),pn=n(G),g(se.$$.fragment,G),gn=n(G),g(ae.$$.fragment,G),G.forEach(s),un=n(x),le=l(x,"DIV",{class:!0});var ft=M(le);g(Ze.$$.fragment,ft),hn=n(ft),jt=l(ft,"P",{"data-svelte-h":!0}),$(jt)!=="svelte-1u3gku9"&&(jt.textContent=ys),ft.forEach(s),fn=n(x),N=l(x,"DIV",{class:!0});var no=M(N);g(Ee.$$.fragment,no),bn=n(no),Jt=l(no,"P",{"data-svelte-h":!0}),$(Jt)!=="svelte-19evuwa"&&(Jt.innerHTML=_s),$n=n(no),It=l(no,"UL",{"data-svelte-h":!0}),$(It)!=="svelte-1s62xm4"&&(It.innerHTML=Ts),no.forEach(s),vn=n(x),re=l(x,"DIV",{class:!0});var Lo=M(re);g(We.$$.fragment,Lo),yn=n(Lo),Ut=l(Lo,"P",{"data-svelte-h":!0}),$(Ut)!=="svelte-63kthh"&&(Ut.textContent=Ms),Lo.forEach(s),_n=n(x),ie=l(x,"DIV",{class:!0});var Bo=M(ie);g(Le.$$.fragment,Bo),Tn=n(Bo),kt=l(Bo,"P",{"data-svelte-h":!0}),$(kt)!=="svelte-1l397l"&&(kt.textContent=ws),Bo.forEach(s),x.forEach(s),bo=n(e),g(Be.$$.fragment,e),$o=n(e),Y=l(e,"DIV",{class:!0});var So=M(Y);g(Se.$$.fragment,So),Mn=n(So),At=l(So,"P",{"data-svelte-h":!0}),$(At)!=="svelte-j4u4it"&&(At.innerHTML=xs),So.forEach(s),vo=n(e),g(Ve.$$.fragment,e),yo=n(e),I=l(e,"DIV",{class:!0});var Z=M(I);g(Ge.$$.fragment,Z),wn=n(Z),Pt=l(Z,"P",{"data-svelte-h":!0}),$(Pt)!=="svelte-g073wf"&&(Pt.textContent=Cs),xn=n(Z),Zt=l(Z,"P",{"data-svelte-h":!0}),$(Zt)!=="svelte-wb0eyv"&&(Zt.textContent=js),Cn=n(Z),Et=l(Z,"UL",{"data-svelte-h":!0}),$(Et)!=="svelte-1ebyz6"&&(Et.innerHTML=Js),jn=n(Z),Wt=l(Z,"P",{"data-svelte-h":!0}),$(Wt)!=="svelte-1yf1ni9"&&(Wt.innerHTML=Is),Jn=n(Z),P=l(Z,"DIV",{class:!0});var F=M(P);g(He.$$.fragment,F),In=n(F),Lt=l(F,"P",{"data-svelte-h":!0}),$(Lt)!=="svelte-pdgtcq"&&(Lt.textContent=Us),Un=n(F),Bt=l(F,"P",{"data-svelte-h":!0}),$(Bt)!=="svelte-b4jhp8"&&(Bt.textContent=ks),kn=n(F),St=l(F,"BLOCKQUOTE",{"data-svelte-h":!0}),$(St)!=="svelte-1ezz2hf"&&(St.innerHTML=As),An=n(F),g(ce.$$.fragment,F),F.forEach(s),Pn=n(Z),k=l(Z,"DIV",{class:!0});var B=M(k);g(Ne.$$.fragment,B),Zn=n(B),Vt=l(B,"P",{"data-svelte-h":!0}),$(Vt)!=="svelte-tdu9dm"&&(Vt.textContent=Ps),En=n(B),Gt=l(B,"P",{"data-svelte-h":!0}),$(Gt)!=="svelte-ovzouy"&&(Gt.innerHTML=Zs),Wn=n(B),Ht=l(B,"P",{"data-svelte-h":!0}),$(Ht)!=="svelte-17y4fsr"&&(Ht.textContent=Es),Ln=n(B),g(me.$$.fragment,B),Bn=n(B),g(de.$$.fragment,B),B.forEach(s),Z.forEach(s),_o=n(e),g(De.$$.fragment,e),To=n(e),U=l(e,"DIV",{class:!0});var E=M(U);g(Fe.$$.fragment,E),Sn=n(E),Nt=l(E,"P",{"data-svelte-h":!0}),$(Nt)!=="svelte-1li5bg5"&&(Nt.textContent=Ws),Vn=n(E),Dt=l(E,"P",{"data-svelte-h":!0}),$(Dt)!=="svelte-17v54jk"&&(Dt.innerHTML=Ls),Gn=n(E),g(pe.$$.fragment,E),Hn=n(E),ge=l(E,"DIV",{class:!0});var Vo=M(ge);g(Qe.$$.fragment,Vo),Nn=n(Vo),Ft=l(Vo,"P",{"data-svelte-h":!0}),$(Ft)!=="svelte-9sr97u"&&(Ft.textContent=Bs),Vo.forEach(s),Dn=n(E),ue=l(E,"DIV",{class:!0});var Go=M(ue);g(Re.$$.fragment,Go),Fn=n(Go),Qt=l(Go,"P",{"data-svelte-h":!0}),$(Qt)!=="svelte-aq9jm8"&&(Qt.textContent=Ss),Go.forEach(s),Qn=n(E),D=l(E,"DIV",{class:!0});var so=M(D);g(Ye.$$.fragment,so),Rn=n(so),Rt=l(so,"P",{"data-svelte-h":!0}),$(Rt)!=="svelte-1jb0ikk"&&(Rt.textContent=Vs),Yn=n(so),Yt=l(so,"P",{"data-svelte-h":!0}),$(Yt)!=="svelte-1smt0wn"&&(Yt.textContent=Gs),so.forEach(s),E.forEach(s),Mo=n(e),g(qe.$$.fragment,e),wo=n(e),ze=l(e,"P",{"data-svelte-h":!0}),$(ze)!=="svelte-jsq4jz"&&(ze.textContent=Hs),xo=n(e),Xe=l(e,"P",{"data-svelte-h":!0}),$(Xe)!=="svelte-1ixcu88"&&(Xe.innerHTML=Ns),Co=n(e),Ke=l(e,"P",{"data-svelte-h":!0}),$(Ke)!=="svelte-1nfvcwf"&&(Ke.textContent=Ds),jo=n(e),Oe=l(e,"UL",{"data-svelte-h":!0}),$(Oe)!=="svelte-ysem30"&&(Oe.innerHTML=Fs),Jo=n(e),g(et.$$.fragment,e),Io=n(e),q=l(e,"DIV",{class:!0});var Ho=M(q);g(tt.$$.fragment,Ho),qn=n(Ho),qt=l(Ho,"P",{"data-svelte-h":!0}),$(qt)!=="svelte-57fhj7"&&(qt.textContent=Qs),Ho.forEach(s),Uo=n(e),g(ot.$$.fragment,e),ko=n(e),A=l(e,"DIV",{class:!0});var Q=M(A);g(nt.$$.fragment,Q),zn=n(Q),zt=l(Q,"P",{"data-svelte-h":!0}),$(zt)!=="svelte-1qa18j9"&&(zt.textContent=Rs),Xn=n(Q),he=l(Q,"DIV",{class:!0});var No=M(he);g(st.$$.fragment,No),Kn=n(No),Xt=l(No,"P",{"data-svelte-h":!0}),$(Xt)!=="svelte-qix5eq"&&(Xt.textContent=Ys),No.forEach(s),On=n(Q),fe=l(Q,"DIV",{class:!0});var Do=M(fe);g(at.$$.fragment,Do),es=n(Do),Kt=l(Do,"P",{"data-svelte-h":!0}),$(Kt)!=="svelte-xppdw9"&&(Kt.textContent=qs),Do.forEach(s),ts=n(Q),be=l(Q,"DIV",{class:!0});var Fo=M(be);g(lt.$$.fragment,Fo),os=n(Fo),Ot=l(Fo,"P",{"data-svelte-h":!0}),$(Ot)!=="svelte-chc6sp"&&(Ot.textContent=zs),Fo.forEach(s),Q.forEach(s),Ao=n(e),g(rt.$$.fragment,e),Po=n(e),W=l(e,"DIV",{class:!0});var ye=M(W);g(it.$$.fragment,ye),ns=n(ye),eo=l(ye,"P",{"data-svelte-h":!0}),$(eo)!=="svelte-ckiqb6"&&(eo.textContent=Xs),ss=n(ye),$e=l(ye,"DIV",{class:!0});var Qo=M($e);g(ct.$$.fragment,Qo),as=n(Qo),to=l(Qo,"P",{"data-svelte-h":!0}),$(to)!=="svelte-10rnn1x"&&(to.innerHTML=Ks),Qo.forEach(s),ls=n(ye),ve=l(ye,"DIV",{class:!0});var Ro=M(ve);g(mt.$$.fragment,Ro),rs=n(Ro),oo=l(Ro,"P",{"data-svelte-h":!0}),$(oo)!=="svelte-1xu9o93"&&(oo.textContent=Os),Ro.forEach(s),ye.forEach(s),Zo=n(e),g(dt.$$.fragment,e),Eo=n(e),ro=l(e,"P",{}),M(ro).forEach(s),this.h()},h(){w(i,"name","hf:doc:metadata"),w(i,"content",fa),w(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,r){t(document.head,i),m(e,y,r),m(e,d,r),m(e,v,r),u(_,e,r),m(e,c,r),u(C,e,r),m(e,io,r),m(e,_e,r),m(e,co,r),u(Te,e,r),m(e,mo,r),u(Me,e,r),m(e,po,r),m(e,V,r),u(we,V,null),t(V,Yo),t(V,bt),t(V,qo),u(O,V,null),m(e,go,r),u(xe,e,r),m(e,uo,r),m(e,R,r),u(Ce,R,null),t(R,zo),t(R,$t),m(e,ho,r),u(je,e,r),m(e,fo,r),m(e,T,r),u(Je,T,null),t(T,Xo),t(T,vt),t(T,Ko),t(T,yt),t(T,Oo),t(T,_t),t(T,en),t(T,ee),u(Ie,ee,null),t(ee,tn),t(ee,Tt),t(T,on),t(T,te),u(Ue,te,null),t(te,nn),t(te,Mt),t(T,sn),t(T,H),u(ke,H,null),t(H,an),t(H,wt),t(H,ln),u(oe,H,null),t(T,rn),t(T,ne),u(Ae,ne,null),t(ne,cn),t(ne,xt),t(T,mn),t(T,L),u(Pe,L,null),t(L,dn),t(L,Ct),t(L,pn),u(se,L,null),t(L,gn),u(ae,L,null),t(T,un),t(T,le),u(Ze,le,null),t(le,hn),t(le,jt),t(T,fn),t(T,N),u(Ee,N,null),t(N,bn),t(N,Jt),t(N,$n),t(N,It),t(T,vn),t(T,re),u(We,re,null),t(re,yn),t(re,Ut),t(T,_n),t(T,ie),u(Le,ie,null),t(ie,Tn),t(ie,kt),m(e,bo,r),u(Be,e,r),m(e,$o,r),m(e,Y,r),u(Se,Y,null),t(Y,Mn),t(Y,At),m(e,vo,r),u(Ve,e,r),m(e,yo,r),m(e,I,r),u(Ge,I,null),t(I,wn),t(I,Pt),t(I,xn),t(I,Zt),t(I,Cn),t(I,Et),t(I,jn),t(I,Wt),t(I,Jn),t(I,P),u(He,P,null),t(P,In),t(P,Lt),t(P,Un),t(P,Bt),t(P,kn),t(P,St),t(P,An),u(ce,P,null),t(I,Pn),t(I,k),u(Ne,k,null),t(k,Zn),t(k,Vt),t(k,En),t(k,Gt),t(k,Wn),t(k,Ht),t(k,Ln),u(me,k,null),t(k,Bn),u(de,k,null),m(e,_o,r),u(De,e,r),m(e,To,r),m(e,U,r),u(Fe,U,null),t(U,Sn),t(U,Nt),t(U,Vn),t(U,Dt),t(U,Gn),u(pe,U,null),t(U,Hn),t(U,ge),u(Qe,ge,null),t(ge,Nn),t(ge,Ft),t(U,Dn),t(U,ue),u(Re,ue,null),t(ue,Fn),t(ue,Qt),t(U,Qn),t(U,D),u(Ye,D,null),t(D,Rn),t(D,Rt),t(D,Yn),t(D,Yt),m(e,Mo,r),u(qe,e,r),m(e,wo,r),m(e,ze,r),m(e,xo,r),m(e,Xe,r),m(e,Co,r),m(e,Ke,r),m(e,jo,r),m(e,Oe,r),m(e,Jo,r),u(et,e,r),m(e,Io,r),m(e,q,r),u(tt,q,null),t(q,qn),t(q,qt),m(e,Uo,r),u(ot,e,r),m(e,ko,r),m(e,A,r),u(nt,A,null),t(A,zn),t(A,zt),t(A,Xn),t(A,he),u(st,he,null),t(he,Kn),t(he,Xt),t(A,On),t(A,fe),u(at,fe,null),t(fe,es),t(fe,Kt),t(A,ts),t(A,be),u(lt,be,null),t(be,os),t(be,Ot),m(e,Ao,r),u(rt,e,r),m(e,Po,r),m(e,W,r),u(it,W,null),t(W,ns),t(W,eo),t(W,ss),t(W,$e),u(ct,$e,null),t($e,as),t($e,to),t(W,ls),t(W,ve),u(mt,ve,null),t(ve,rs),t(ve,oo),m(e,Zo,r),u(dt,e,r),m(e,Eo,r),m(e,ro,r),Wo=!0},p(e,[r]){const z={};r&2&&(z.$$scope={dirty:r,ctx:e}),C.$set(z);const pt={};r&2&&(pt.$$scope={dirty:r,ctx:e}),O.$set(pt);const x={};r&2&&(x.$$scope={dirty:r,ctx:e}),oe.$set(x);const gt={};r&2&&(gt.$$scope={dirty:r,ctx:e}),se.$set(gt);const ut={};r&2&&(ut.$$scope={dirty:r,ctx:e}),ae.$set(ut);const X={};r&2&&(X.$$scope={dirty:r,ctx:e}),ce.$set(X);const ht={};r&2&&(ht.$$scope={dirty:r,ctx:e}),me.$set(ht);const G={};r&2&&(G.$$scope={dirty:r,ctx:e}),de.$set(G);const ft={};r&2&&(ft.$$scope={dirty:r,ctx:e}),pe.$set(ft)},i(e){Wo||(h(_.$$.fragment,e),h(C.$$.fragment,e),h(Te.$$.fragment,e),h(Me.$$.fragment,e),h(we.$$.fragment,e),h(O.$$.fragment,e),h(xe.$$.fragment,e),h(Ce.$$.fragment,e),h(je.$$.fragment,e),h(Je.$$.fragment,e),h(Ie.$$.fragment,e),h(Ue.$$.fragment,e),h(ke.$$.fragment,e),h(oe.$$.fragment,e),h(Ae.$$.fragment,e),h(Pe.$$.fragment,e),h(se.$$.fragment,e),h(ae.$$.fragment,e),h(Ze.$$.fragment,e),h(Ee.$$.fragment,e),h(We.$$.fragment,e),h(Le.$$.fragment,e),h(Be.$$.fragment,e),h(Se.$$.fragment,e),h(Ve.$$.fragment,e),h(Ge.$$.fragment,e),h(He.$$.fragment,e),h(ce.$$.fragment,e),h(Ne.$$.fragment,e),h(me.$$.fragment,e),h(de.$$.fragment,e),h(De.$$.fragment,e),h(Fe.$$.fragment,e),h(pe.$$.fragment,e),h(Qe.$$.fragment,e),h(Re.$$.fragment,e),h(Ye.$$.fragment,e),h(qe.$$.fragment,e),h(et.$$.fragment,e),h(tt.$$.fragment,e),h(ot.$$.fragment,e),h(nt.$$.fragment,e),h(st.$$.fragment,e),h(at.$$.fragment,e),h(lt.$$.fragment,e),h(rt.$$.fragment,e),h(it.$$.fragment,e),h(ct.$$.fragment,e),h(mt.$$.fragment,e),h(dt.$$.fragment,e),Wo=!0)},o(e){f(_.$$.fragment,e),f(C.$$.fragment,e),f(Te.$$.fragment,e),f(Me.$$.fragment,e),f(we.$$.fragment,e),f(O.$$.fragment,e),f(xe.$$.fragment,e),f(Ce.$$.fragment,e),f(je.$$.fragment,e),f(Je.$$.fragment,e),f(Ie.$$.fragment,e),f(Ue.$$.fragment,e),f(ke.$$.fragment,e),f(oe.$$.fragment,e),f(Ae.$$.fragment,e),f(Pe.$$.fragment,e),f(se.$$.fragment,e),f(ae.$$.fragment,e),f(Ze.$$.fragment,e),f(Ee.$$.fragment,e),f(We.$$.fragment,e),f(Le.$$.fragment,e),f(Be.$$.fragment,e),f(Se.$$.fragment,e),f(Ve.$$.fragment,e),f(Ge.$$.fragment,e),f(He.$$.fragment,e),f(ce.$$.fragment,e),f(Ne.$$.fragment,e),f(me.$$.fragment,e),f(de.$$.fragment,e),f(De.$$.fragment,e),f(Fe.$$.fragment,e),f(pe.$$.fragment,e),f(Qe.$$.fragment,e),f(Re.$$.fragment,e),f(Ye.$$.fragment,e),f(qe.$$.fragment,e),f(et.$$.fragment,e),f(tt.$$.fragment,e),f(ot.$$.fragment,e),f(nt.$$.fragment,e),f(st.$$.fragment,e),f(at.$$.fragment,e),f(lt.$$.fragment,e),f(rt.$$.fragment,e),f(it.$$.fragment,e),f(ct.$$.fragment,e),f(mt.$$.fragment,e),f(dt.$$.fragment,e),Wo=!1},d(e){e&&(s(y),s(d),s(v),s(c),s(io),s(_e),s(co),s(mo),s(po),s(V),s(go),s(uo),s(R),s(ho),s(fo),s(T),s(bo),s($o),s(Y),s(vo),s(yo),s(I),s(_o),s(To),s(U),s(Mo),s(wo),s(ze),s(xo),s(Xe),s(Co),s(Ke),s(jo),s(Oe),s(Jo),s(Io),s(q),s(Uo),s(ko),s(A),s(Ao),s(Po),s(W),s(Zo),s(Eo),s(ro)),s(i),b(_,e),b(C,e),b(Te,e),b(Me,e),b(we),b(O),b(xe,e),b(Ce),b(je,e),b(Je),b(Ie),b(Ue),b(ke),b(oe),b(Ae),b(Pe),b(se),b(ae),b(Ze),b(Ee),b(We),b(Le),b(Be,e),b(Se),b(Ve,e),b(Ge),b(He),b(ce),b(Ne),b(me),b(de),b(De,e),b(Fe),b(pe),b(Qe),b(Re),b(Ye),b(qe,e),b(et,e),b(tt),b(ot,e),b(nt),b(st),b(at),b(lt),b(rt,e),b(it),b(ct),b(mt),b(dt,e)}}}const fa='{"title":"Tools","local":"tools","sections":[{"title":"Tool Base Classes","local":"tool-base-classes","sections":[{"title":"load_tool","local":"smolagents.load_tool","sections":[],"depth":3},{"title":"tool","local":"smolagents.tool","sections":[],"depth":3},{"title":"Tool","local":"smolagents.Tool","sections":[],"depth":3},{"title":"launch_gradio_demo","local":"smolagents.launch_gradio_demo","sections":[],"depth":3}],"depth":2},{"title":"ToolCollection","local":"smolagents.ToolCollection","sections":[],"depth":2},{"title":"MCP Client","local":"smolagents.MCPClient","sections":[],"depth":2},{"title":"Agent Types","local":"agent-types","sections":[{"title":"AgentText","local":"smolagents.AgentText","sections":[],"depth":3},{"title":"AgentImage","local":"smolagents.AgentImage","sections":[],"depth":3},{"title":"AgentAudio","local":"smolagents.AgentAudio","sections":[],"depth":3}],"depth":2}],"depth":1}';function ba(J){return ta(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wa extends oa{constructor(i){super(),na(this,i,ba,ha,ea,{})}}export{wa as component};
