import{s as Ys,o as Xs,n as R}from"../chunks/scheduler.f6319a2a.js";import{S as zs,i as Ks,g as i,s as o,r as p,A as Os,h as m,f as s,c as n,j as x,u as g,x as _,k as M,y as t,a as c,v as u,d as f,t as h,w as $}from"../chunks/index.85aa684c.js";import{T as as}from"../chunks/Tip.3d397a88.js";import{D as j,E as yt}from"../chunks/ExampleCodeBlock.3d8cc3b7.js";import{C as wt}from"../chunks/CodeBlock.3400fc53.js";import{H as U,E as ea}from"../chunks/getInferenceSnippets.55a93fbe.js";function ta(I){let r,T="Smolagents एक experimental API है जो किसी भी समय बदल सकता है। एजेंट्स द्वारा लौटाए गए परिणाम भिन्न हो सकते हैं क्योंकि APIs या underlying मॉडल बदलने की संभावना रखते हैं।";return{c(){r=i("p"),r.textContent=T},l(d){r=m(d,"P",{"data-svelte-h":!0}),_(r)!=="svelte-1f42n0i"&&(r.textContent=T)},m(d,b){c(d,r,b)},p:R,d(d){d&&s(r)}}}function oa(I){let r,T=`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(){r=i("p"),r.textContent=T},l(d){r=m(d,"P",{"data-svelte-h":!0}),_(r)!=="svelte-1kcherd"&&(r.textContent=T)},m(d,b){c(d,r,b)},p:R,d(d){d&&s(r)}}}function na(I){let r,T=`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(){r=i("p"),r.textContent=T},l(d){r=m(d,"P",{"data-svelte-h":!0}),_(r)!=="svelte-fpk7e5"&&(r.textContent=T)},m(d,b){c(d,r,b)},p:R,d(d){d&&s(r)}}}function sa(I){let r,T="Examples:",d,b,v;return b=new wt({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(){r=i("p"),r.textContent=T,d=o(),p(b.$$.fragment)},l(l){r=m(l,"P",{"data-svelte-h":!0}),_(r)!=="svelte-kvfsh7"&&(r.textContent=T),d=n(l),g(b.$$.fragment,l)},m(l,y){c(l,r,y),c(l,d,y),u(b,l,y),v=!0},p:R,i(l){v||(f(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(s(r),s(d)),$(b,l)}}}function aa(I){let r,T;return r=new wt({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(r.$$.fragment)},l(d){g(r.$$.fragment,d)},m(d,b){u(r,d,b),T=!0},p:R,i(d){T||(f(r.$$.fragment,d),T=!0)},o(d){h(r.$$.fragment,d),T=!1},d(d){$(r,d)}}}function la(I){let r,T="Examples:",d,b,v;return b=new wt({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBEdWNrRHVja0dvU2VhcmNoVG9vbCUwQXdlYl9zZWFyY2hfdG9vbCUyMCUzRCUyMER1Y2tEdWNrR29TZWFyY2hUb29sKG1heF9yZXN1bHRzJTNENSUyQyUyMHJhdGVfbGltaXQlM0QyLjApJTBBcmVzdWx0cyUyMCUzRCUyMHdlYl9zZWFyY2hfdG9vbCglMjJIdWdnaW5nJTIwRmFjZSUyMiklMEFwcmludChyZXN1bHRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> DuckDuckGoSearchTool
<span class="hljs-meta">&gt;&gt;&gt; </span>web_search_tool = DuckDuckGoSearchTool(max_results=<span class="hljs-number">5</span>, rate_limit=<span class="hljs-number">2.0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>results = web_search_tool(<span class="hljs-string">&quot;Hugging Face&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(results)`,wrap:!1}}),{c(){r=i("p"),r.textContent=T,d=o(),p(b.$$.fragment)},l(l){r=m(l,"P",{"data-svelte-h":!0}),_(r)!=="svelte-kvfsh7"&&(r.textContent=T),d=n(l),g(b.$$.fragment,l)},m(l,y){c(l,r,y),c(l,d,y),u(b,l,y),v=!0},p:R,i(l){v||(f(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(s(r),s(d)),$(b,l)}}}function ra(I){let r,T="Example:",d,b,v;return b=new wt({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(){r=i("p"),r.textContent=T,d=o(),p(b.$$.fragment)},l(l){r=m(l,"P",{"data-svelte-h":!0}),_(r)!=="svelte-11lpom8"&&(r.textContent=T),d=n(l),g(b.$$.fragment,l)},m(l,y){c(l,r,y),c(l,d,y),u(b,l,y),v=!0},p:R,i(l){v||(f(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(s(r),s(d)),$(b,l)}}}function ia(I){let r,T="Example with a Stdio MCP server:",d,b,v;return b=new wt({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(){r=i("p"),r.textContent=T,d=o(),p(b.$$.fragment)},l(l){r=m(l,"P",{"data-svelte-h":!0}),_(r)!=="svelte-49dhgx"&&(r.textContent=T),d=n(l),g(b.$$.fragment,l)},m(l,y){c(l,r,y),c(l,d,y),u(b,l,y),v=!0},p:R,i(l){v||(f(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(s(r),s(d)),$(b,l)}}}function ma(I){let r,T="Example with structured output enabled:",d,b,v;return b=new wt({props:{code:"d2l0aCUyMFRvb2xDb2xsZWN0aW9uLmZyb21fbWNwKHNlcnZlcl9wYXJhbWV0ZXJzJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlJTJDJTIwc3RydWN0dXJlZF9vdXRwdXQlM0RUcnVlKSUyMGFzJTIwdG9vbF9jb2xsZWN0aW9uJTNBJTBBJTIwJTIwJTIwJTIwYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQodG9vbHMlM0QlNUIqdG9vbF9jb2xsZWN0aW9uLnRvb2xzJTVEJTJDJTIwYWRkX2Jhc2VfdG9vbHMlM0RUcnVlJTJDJTIwbW9kZWwlM0Rtb2RlbCklMEElMjAlMjAlMjAlMjBhZ2VudC5ydW4oJTIyUGxlYXNlJTIwZmluZCUyMGElMjByZW1lZHklMjBmb3IlMjBoYW5nb3Zlci4lMjIp",highlighted:`<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>, structured_output=<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(){r=i("p"),r.textContent=T,d=o(),p(b.$$.fragment)},l(l){r=m(l,"P",{"data-svelte-h":!0}),_(r)!=="svelte-ghl0yb"&&(r.textContent=T),d=n(l),g(b.$$.fragment,l)},m(l,y){c(l,r,y),c(l,d,y),u(b,l,y),v=!0},p:R,i(l){v||(f(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(s(r),s(d)),$(b,l)}}}function ca(I){let r,T="Example with a Streamable HTTP MCP server:",d,b,v;return b=new wt({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(){r=i("p"),r.textContent=T,d=o(),p(b.$$.fragment)},l(l){r=m(l,"P",{"data-svelte-h":!0}),_(r)!=="svelte-178fndi"&&(r.textContent=T),d=n(l),g(b.$$.fragment,l)},m(l,y){c(l,r,y),c(l,d,y),u(b,l,y),v=!0},p:R,i(l){v||(f(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(s(r),s(d)),$(b,l)}}}function da(I){let r,T,d,b,v,l,y,ro,_e,ls=`एजेंट्स और टूल्स के बारे में अधिक जानने के लिए <a href="../index">introductory guide</a> पढ़ना सुनिश्चित करें।
यह पेज underlying क्लासेज के लिए API docs को शामिल करता है।`,io,ve,mo,Te,co,A,ye,Ko,xt,rs="Main function to quickly load a tool from the Hub.",Oo,K,po,we,go,F,xe,en,Mt,is="Convert a function into an instance of a dynamically created Tool subclass.",uo,Me,fo,w,Ce,tn,Ct,ms=`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:`,on,jt,cs=`<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> <li><strong>output_schema</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) — The JSON schema defining the expected structure of the tool output.
This can be included in system prompts to help agents understand the expected output format. Note: This is currently
used for informational purposes only and does not perform actual output validation.</li>`,nn,It,ds=`You can also override the method <a href="/docs/smolagents/main/hi/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/main/hi/reference/tools#smolagents.Tool.setup">setup()</a> will be called the first time you use your tool, but not at
instantiation.`,sn,O,je,an,Jt,ps="Create tool from a dictionary representation.",ln,ee,Ie,rn,kt,gs='Creates a <a href="/docs/smolagents/main/hi/reference/tools#smolagents.Tool">Tool</a> from a gradio tool.',mn,H,Je,cn,Ut,us="Loads a tool defined on the Hub.",dn,te,pn,oe,ke,gn,Zt,fs='Creates a <a href="/docs/smolagents/main/hi/reference/tools#smolagents.Tool">Tool</a> from a langchain tool.',un,P,Ue,fn,Wt,hs='Creates a <a href="/docs/smolagents/main/hi/reference/tools#smolagents.Tool">Tool</a> from a Space given its id on the Hub.',hn,ne,$n,se,bn,ae,Ze,_n,Vt,$s="Upload the tool to the Hub.",vn,B,We,Tn,Dt,bs=`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:`,yn,Lt,_s=`<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>`,wn,le,Ve,xn,Pt,vs=`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.`,Mn,re,De,Cn,At,Ts="Returns a dictionary representing the tool",ho,Le,$o,q,Pe,jn,Gt,ys=`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>.`,bo,Ae,_o,Ge,vo,Ne,He,To,Be,yo,G,Se,In,Nt,ws="Web search tool that performs searches using the DuckDuckGo search engine.",Jn,ie,wo,Ee,xo,Re,Fe,Mo,qe,Co,Qe,Ye,jo,Xe,Io,J,ze,kn,Ht,xs="Tool collections enable loading a collection of tools in the agent’s toolbox.",Un,Bt,Ms="Collections can be loaded from a collection in the Hub or from an MCP server, see:",Zn,St,Cs='<li><a href="/docs/smolagents/main/hi/reference/tools#smolagents.ToolCollection.from_hub">ToolCollection.from_hub()</a></li> <li><a href="/docs/smolagents/main/hi/reference/tools#smolagents.ToolCollection.from_mcp">ToolCollection.from_mcp()</a></li>',Wn,Et,js='For example and usage, see: <a href="/docs/smolagents/main/hi/reference/tools#smolagents.ToolCollection.from_hub">ToolCollection.from_hub()</a> and <a href="/docs/smolagents/main/hi/reference/tools#smolagents.ToolCollection.from_mcp">ToolCollection.from_mcp()</a>',Vn,W,Ke,Dn,Rt,Is="Loads a tool collection from the Hub.",Ln,Ft,Js="it adds a collection of tools from all Spaces in the collection to the agent’s toolbox",Pn,qt,ks=`<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,me,Gn,k,Oe,Nn,Qt,Us="Automatically load a tool collection from an MCP server.",Hn,Yt,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.`,Bn,Xt,Ws=`Note: a separate thread will be spawned to run an asyncio event loop handling
the MCP server.`,Sn,ce,En,de,Rn,pe,Jo,et,ko,tt,Vs=`एजेंट्स टूल्स के बीच किसी भी प्रकार की ऑब्जेक्ट को संभाल सकते हैं; टूल्स, पूरी तरह से मल्टीमोडल होने के कारण, टेक्स्ट, इमेज, ऑडियो, वीडियो सहित अन्य प्रकारों को स्वीकार और रिटर्न कर सकते हैं।
टूल्स के बीच अनुकूलता बढ़ाने के साथ-साथ इन रिटर्न्स को ipython (jupyter, colab, ipython notebooks, …) में सही ढंग से रेंडर करने के लिए, हम इन टाइप्स के आसपास रैपर क्लासेज को लागू करते हैं।`,Uo,ot,Ds=`रैप किए गए ऑब्जेक्ट्स को प्रारंभ में जैसा व्यवहार करना चाहिए वैसा ही करना जारी रखना चाहिए; एक टेक्स्ट ऑब्जेक्ट को अभी भी स्ट्रिंग की तरह व्यवहार करना चाहिए|
एक इमेज ऑब्जेक्ट को अभी भी <code>PIL.Image</code> की तरह व्यवहार करना चाहिए।`,Zo,nt,Ls="इन टाइप्स के तीन विशिष्ट उद्देश्य हैं:",Wo,st,Ps="<li>टाइप पर <code>to_raw</code> को कॉल करने से अंतर्निहित ऑब्जेक्ट रिटर्न होना चाहिए</li> <li>टाइप पर <code>to_string</code> को कॉल करने से ऑब्जेक्ट को स्ट्रिंग के रूप में रिटर्न होना चाहिए: वह <code>AgentText</code> के मामले में स्ट्रिंग हो सकती है लेकिन अन्य उदाहरणों में ऑब्जेक्ट के सीरियलाइज्ड वर्जन का पाथ होगा</li> <li>इसे एक ipython kernel में प्रदर्शित करने पर ऑब्जेक्ट को सही ढंग से प्रदर्शित करना चाहिए</li>",Vo,at,Do,Q,lt,Fn,zt,As="Text type returned by the agent. Behaves as a string.",Lo,rt,Po,Z,it,qn,Kt,Gs="Image type returned by the agent. Behaves as a PIL.Image.Image.",Qn,ge,mt,Yn,Ot,Ns="Saves the image to a file.",Xn,ue,ct,zn,eo,Hs="Returns the “raw” version of that object. In the case of an AgentImage, it is a PIL.Image.Image.",Kn,fe,dt,On,to,Bs=`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,pt,Go,L,gt,es,oo,Ss="Audio type returned by the agent.",ts,he,ut,os,no,Es="Returns the “raw” version of that object. It is a <code>torch.Tensor</code> object.",ns,$e,ft,ss,so,Rs=`Returns the stringified version of that object. In the case of an AgentAudio, it is a path to the serialized
version of the audio.`,No,ht,Ho,lo,Bo;return v=new U({props:{title:"Tools",local:"tools",headingTag:"h1"}}),y=new as({props:{warning:!0,$$slots:{default:[ta]},$$scope:{ctx:I}}}),ve=new U({props:{title:"Tools",local:"tools",headingTag:"h2"}}),Te=new U({props:{title:"load_tool",local:"smolagents.load_tool",headingTag:"h3"}}),ye=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/main/src/smolagents/tools.py#L840"}}),K=new as({props:{warning:!0,$$slots:{default:[oa]},$$scope:{ctx:I}}}),we=new U({props:{title:"tool",local:"smolagents.tool",headingTag:"h3"}}),xe=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/main/src/smolagents/tools.py#L1061"}}),Me=new U({props:{title:"Tool",local:"smolagents.Tool",headingTag:"h3"}}),Ce=new j({props:{name:"class smolagents.Tool",anchor:"smolagents.Tool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/tools.py#L106"}}),je=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/main/src/smolagents/tools.py#L367",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>
`}}),Ie=new j({props:{name:"from_gradio",anchor:"smolagents.Tool.from_gradio",parameters:[{name:"gradio_tool",val:""}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/tools.py#L741"}}),Je=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/main/src/smolagents/tools.py#L516"}}),te=new as({props:{warning:!0,$$slots:{default:[na]},$$scope:{ctx:I}}}),ke=new j({props:{name:"from_langchain",anchor:"smolagents.Tool.from_langchain",parameters:[{name:"langchain_tool",val:""}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/tools.py#L762"}}),Ue=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/main/src/smolagents/tools.py#L599",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/main/hi/reference/tools#smolagents.Tool">Tool</a></p>
`}}),ne=new yt({props:{anchor:"smolagents.Tool.from_space.example",$$slots:{default:[sa]},$$scope:{ctx:I}}}),se=new yt({props:{anchor:"smolagents.Tool.from_space.example-2",$$slots:{default:[aa]},$$scope:{ctx:I}}}),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/main/src/smolagents/tools.py#L421"}}),We=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/main/src/smolagents/tools.py#L390"}}),Ve=new j({props:{name:"setup",anchor:"smolagents.Tool.setup",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/tools.py#L251"}}),De=new j({props:{name:"to_dict",anchor:"smolagents.Tool.to_dict",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/tools.py#L292"}}),Le=new U({props:{title:"launch_gradio_demo",local:"smolagents.launch_gradio_demo",headingTag:"h3"}}),Pe=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/main/src/smolagents/tools.py#L794"}}),Ae=new U({props:{title:"Default Tools",local:"default-tools",headingTag:"h2"}}),Ge=new U({props:{title:"PythonInterpreterTool",local:"smolagents.PythonInterpreterTool",headingTag:"h3"}}),He=new j({props:{name:"class smolagents.PythonInterpreterTool",anchor:"smolagents.PythonInterpreterTool",parameters:[{name:"*args",val:""},{name:"authorized_imports",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/default_tools.py#L38"}}),Be=new U({props:{title:"DuckDuckGoSearchTool",local:"smolagents.DuckDuckGoSearchTool",headingTag:"h3"}}),Se=new j({props:{name:"class smolagents.DuckDuckGoSearchTool",anchor:"smolagents.DuckDuckGoSearchTool",parameters:[{name:"max_results",val:": int = 10"},{name:"rate_limit",val:": float | None = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.DuckDuckGoSearchTool.max_results",description:"<strong>max_results</strong> (<code>int</code>, default <code>10</code>) &#x2014; Maximum number of search results to return.",name:"max_results"},{anchor:"smolagents.DuckDuckGoSearchTool.rate_limit",description:"<strong>rate_limit</strong> (<code>float</code>, default <code>1.0</code>) &#x2014; Maximum queries per second. Set to <code>None</code> to disable rate limiting.",name:"rate_limit"},{anchor:"smolagents.DuckDuckGoSearchTool.*kwargs",description:"*<strong>*kwargs</strong> &#x2014; Additional keyword arguments for the <code>DDGS</code> client.",name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/default_tools.py#L101"}}),ie=new yt({props:{anchor:"smolagents.DuckDuckGoSearchTool.example",$$slots:{default:[la]},$$scope:{ctx:I}}}),Ee=new U({props:{title:"VisitWebpageTool",local:"smolagents.VisitWebpageTool",headingTag:"h3"}}),Fe=new j({props:{name:"class smolagents.VisitWebpageTool",anchor:"smolagents.VisitWebpageTool",parameters:[{name:"max_output_length",val:": int = 40000"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/default_tools.py#L451"}}),qe=new U({props:{title:"UserInputTool",local:"smolagents.UserInputTool",headingTag:"h3"}}),Ye=new j({props:{name:"class smolagents.UserInputTool",anchor:"smolagents.UserInputTool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/default_tools.py#L90"}}),Xe=new U({props:{title:"ToolCollection",local:"smolagents.ToolCollection",headingTag:"h2"}}),ze=new j({props:{name:"class smolagents.ToolCollection",anchor:"smolagents.ToolCollection",parameters:[{name:"tools",val:": list[Tool]"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/tools.py#L895"}}),Ke=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/main/src/smolagents/tools.py#L909",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>
`}}),me=new yt({props:{anchor:"smolagents.ToolCollection.from_hub.example",$$slots:{default:[ra]},$$scope:{ctx:I}}}),Oe=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"},{name:"structured_output",val:": bool | None = None"}],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"},{anchor:"smolagents.ToolCollection.from_mcp.structured_output",description:`<strong>structured_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to enable structured output features for MCP tools. If True, enables:</p>
<ul>
<li>Support for outputSchema in MCP tools</li>
<li>Structured content handling (structuredContent from MCP responses)</li>
<li>JSON parsing fallback for structured data
If False, uses the original simple text-only behavior for backwards compatibility.</li>
</ul>`,name:"structured_output"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/tools.py#L949",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>
`}}),ce=new yt({props:{anchor:"smolagents.ToolCollection.from_mcp.example",$$slots:{default:[ia]},$$scope:{ctx:I}}}),de=new yt({props:{anchor:"smolagents.ToolCollection.from_mcp.example-2",$$slots:{default:[ma]},$$scope:{ctx:I}}}),pe=new yt({props:{anchor:"smolagents.ToolCollection.from_mcp.example-3",$$slots:{default:[ca]},$$scope:{ctx:I}}}),et=new U({props:{title:"Agent टाइप्स",local:"agent-टइपस",headingTag:"h2"}}),at=new U({props:{title:"AgentText",local:"smolagents.AgentText",headingTag:"h3"}}),lt=new j({props:{name:"class smolagents.AgentText",anchor:"smolagents.AgentText",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/agent_types.py#L62"}}),rt=new U({props:{title:"AgentImage",local:"smolagents.AgentImage",headingTag:"h3"}}),it=new j({props:{name:"class smolagents.AgentImage",anchor:"smolagents.AgentImage",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/agent_types.py#L74"}}),mt=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/main/src/smolagents/agent_types.py#L164"}}),ct=new j({props:{name:"to_raw",anchor:"smolagents.AgentImage.to_raw",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/agent_types.py#L119"}}),dt=new j({props:{name:"to_string",anchor:"smolagents.AgentImage.to_string",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/agent_types.py#L136"}}),pt=new U({props:{title:"AgentAudio",local:"smolagents.AgentAudio",headingTag:"h3"}}),gt=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/main/src/smolagents/agent_types.py#L176"}}),ut=new j({props:{name:"to_raw",anchor:"smolagents.AgentAudio.to_raw",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/agent_types.py#L216"}}),ft=new j({props:{name:"to_string",anchor:"smolagents.AgentAudio.to_string",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/agent_types.py#L237"}}),ht=new ea({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/hi/reference/tools.md"}}),{c(){r=i("meta"),T=o(),d=i("p"),b=o(),p(v.$$.fragment),l=o(),p(y.$$.fragment),ro=o(),_e=i("p"),_e.innerHTML=ls,io=o(),p(ve.$$.fragment),mo=o(),p(Te.$$.fragment),co=o(),A=i("div"),p(ye.$$.fragment),Ko=o(),xt=i("p"),xt.textContent=rs,Oo=o(),p(K.$$.fragment),po=o(),p(we.$$.fragment),go=o(),F=i("div"),p(xe.$$.fragment),en=o(),Mt=i("p"),Mt.textContent=is,uo=o(),p(Me.$$.fragment),fo=o(),w=i("div"),p(Ce.$$.fragment),tn=o(),Ct=i("p"),Ct.innerHTML=ms,on=o(),jt=i("ul"),jt.innerHTML=cs,nn=o(),It=i("p"),It.innerHTML=ds,sn=o(),O=i("div"),p(je.$$.fragment),an=o(),Jt=i("p"),Jt.textContent=ps,ln=o(),ee=i("div"),p(Ie.$$.fragment),rn=o(),kt=i("p"),kt.innerHTML=gs,mn=o(),H=i("div"),p(Je.$$.fragment),cn=o(),Ut=i("p"),Ut.textContent=us,dn=o(),p(te.$$.fragment),pn=o(),oe=i("div"),p(ke.$$.fragment),gn=o(),Zt=i("p"),Zt.innerHTML=fs,un=o(),P=i("div"),p(Ue.$$.fragment),fn=o(),Wt=i("p"),Wt.innerHTML=hs,hn=o(),p(ne.$$.fragment),$n=o(),p(se.$$.fragment),bn=o(),ae=i("div"),p(Ze.$$.fragment),_n=o(),Vt=i("p"),Vt.textContent=$s,vn=o(),B=i("div"),p(We.$$.fragment),Tn=o(),Dt=i("p"),Dt.innerHTML=bs,yn=o(),Lt=i("ul"),Lt.innerHTML=_s,wn=o(),le=i("div"),p(Ve.$$.fragment),xn=o(),Pt=i("p"),Pt.textContent=vs,Mn=o(),re=i("div"),p(De.$$.fragment),Cn=o(),At=i("p"),At.textContent=Ts,ho=o(),p(Le.$$.fragment),$o=o(),q=i("div"),p(Pe.$$.fragment),jn=o(),Gt=i("p"),Gt.innerHTML=ys,bo=o(),p(Ae.$$.fragment),_o=o(),p(Ge.$$.fragment),vo=o(),Ne=i("div"),p(He.$$.fragment),To=o(),p(Be.$$.fragment),yo=o(),G=i("div"),p(Se.$$.fragment),In=o(),Nt=i("p"),Nt.textContent=ws,Jn=o(),p(ie.$$.fragment),wo=o(),p(Ee.$$.fragment),xo=o(),Re=i("div"),p(Fe.$$.fragment),Mo=o(),p(qe.$$.fragment),Co=o(),Qe=i("div"),p(Ye.$$.fragment),jo=o(),p(Xe.$$.fragment),Io=o(),J=i("div"),p(ze.$$.fragment),kn=o(),Ht=i("p"),Ht.textContent=xs,Un=o(),Bt=i("p"),Bt.textContent=Ms,Zn=o(),St=i("ul"),St.innerHTML=Cs,Wn=o(),Et=i("p"),Et.innerHTML=js,Vn=o(),W=i("div"),p(Ke.$$.fragment),Dn=o(),Rt=i("p"),Rt.textContent=Is,Ln=o(),Ft=i("p"),Ft.textContent=Js,Pn=o(),qt=i("blockquote"),qt.innerHTML=ks,An=o(),p(me.$$.fragment),Gn=o(),k=i("div"),p(Oe.$$.fragment),Nn=o(),Qt=i("p"),Qt.textContent=Us,Hn=o(),Yt=i("p"),Yt.innerHTML=Zs,Bn=o(),Xt=i("p"),Xt.textContent=Ws,Sn=o(),p(ce.$$.fragment),En=o(),p(de.$$.fragment),Rn=o(),p(pe.$$.fragment),Jo=o(),p(et.$$.fragment),ko=o(),tt=i("p"),tt.textContent=Vs,Uo=o(),ot=i("p"),ot.innerHTML=Ds,Zo=o(),nt=i("p"),nt.textContent=Ls,Wo=o(),st=i("ul"),st.innerHTML=Ps,Vo=o(),p(at.$$.fragment),Do=o(),Q=i("div"),p(lt.$$.fragment),Fn=o(),zt=i("p"),zt.textContent=As,Lo=o(),p(rt.$$.fragment),Po=o(),Z=i("div"),p(it.$$.fragment),qn=o(),Kt=i("p"),Kt.textContent=Gs,Qn=o(),ge=i("div"),p(mt.$$.fragment),Yn=o(),Ot=i("p"),Ot.textContent=Ns,Xn=o(),ue=i("div"),p(ct.$$.fragment),zn=o(),eo=i("p"),eo.textContent=Hs,Kn=o(),fe=i("div"),p(dt.$$.fragment),On=o(),to=i("p"),to.textContent=Bs,Ao=o(),p(pt.$$.fragment),Go=o(),L=i("div"),p(gt.$$.fragment),es=o(),oo=i("p"),oo.textContent=Ss,ts=o(),he=i("div"),p(ut.$$.fragment),os=o(),no=i("p"),no.innerHTML=Es,ns=o(),$e=i("div"),p(ft.$$.fragment),ss=o(),so=i("p"),so.textContent=Rs,No=o(),p(ht.$$.fragment),Ho=o(),lo=i("p"),this.h()},l(e){const a=Os("svelte-u9bgzb",document.head);r=m(a,"META",{name:!0,content:!0}),a.forEach(s),T=n(e),d=m(e,"P",{}),x(d).forEach(s),b=n(e),g(v.$$.fragment,e),l=n(e),g(y.$$.fragment,e),ro=n(e),_e=m(e,"P",{"data-svelte-h":!0}),_(_e)!=="svelte-1y9anji"&&(_e.innerHTML=ls),io=n(e),g(ve.$$.fragment,e),mo=n(e),g(Te.$$.fragment,e),co=n(e),A=m(e,"DIV",{class:!0});var Y=x(A);g(ye.$$.fragment,Y),Ko=n(Y),xt=m(Y,"P",{"data-svelte-h":!0}),_(xt)!=="svelte-fgf0mn"&&(xt.textContent=rs),Oo=n(Y),g(K.$$.fragment,Y),Y.forEach(s),po=n(e),g(we.$$.fragment,e),go=n(e),F=m(e,"DIV",{class:!0});var $t=x(F);g(xe.$$.fragment,$t),en=n($t),Mt=m($t,"P",{"data-svelte-h":!0}),_(Mt)!=="svelte-1yvj8b1"&&(Mt.textContent=is),$t.forEach(s),uo=n(e),g(Me.$$.fragment,e),fo=n(e),w=m(e,"DIV",{class:!0});var C=x(w);g(Ce.$$.fragment,C),tn=n(C),Ct=m(C,"P",{"data-svelte-h":!0}),_(Ct)!=="svelte-1poxk5s"&&(Ct.innerHTML=ms),on=n(C),jt=m(C,"UL",{"data-svelte-h":!0}),_(jt)!=="svelte-wwkyr"&&(jt.innerHTML=cs),nn=n(C),It=m(C,"P",{"data-svelte-h":!0}),_(It)!=="svelte-hcgrxg"&&(It.innerHTML=ds),sn=n(C),O=m(C,"DIV",{class:!0});var bt=x(O);g(je.$$.fragment,bt),an=n(bt),Jt=m(bt,"P",{"data-svelte-h":!0}),_(Jt)!=="svelte-2agex6"&&(Jt.textContent=ps),bt.forEach(s),ln=n(C),ee=m(C,"DIV",{class:!0});var _t=x(ee);g(Ie.$$.fragment,_t),rn=n(_t),kt=m(_t,"P",{"data-svelte-h":!0}),_(kt)!=="svelte-qf76h8"&&(kt.innerHTML=gs),_t.forEach(s),mn=n(C),H=m(C,"DIV",{class:!0});var X=x(H);g(Je.$$.fragment,X),cn=n(X),Ut=m(X,"P",{"data-svelte-h":!0}),_(Ut)!=="svelte-yy7b2c"&&(Ut.textContent=us),dn=n(X),g(te.$$.fragment,X),X.forEach(s),pn=n(C),oe=m(C,"DIV",{class:!0});var vt=x(oe);g(ke.$$.fragment,vt),gn=n(vt),Zt=m(vt,"P",{"data-svelte-h":!0}),_(Zt)!=="svelte-1eanwf1"&&(Zt.innerHTML=fs),vt.forEach(s),un=n(C),P=m(C,"DIV",{class:!0});var N=x(P);g(Ue.$$.fragment,N),fn=n(N),Wt=m(N,"P",{"data-svelte-h":!0}),_(Wt)!=="svelte-oddkc1"&&(Wt.innerHTML=hs),hn=n(N),g(ne.$$.fragment,N),$n=n(N),g(se.$$.fragment,N),N.forEach(s),bn=n(C),ae=m(C,"DIV",{class:!0});var Tt=x(ae);g(Ze.$$.fragment,Tt),_n=n(Tt),Vt=m(Tt,"P",{"data-svelte-h":!0}),_(Vt)!=="svelte-1u3gku9"&&(Vt.textContent=$s),Tt.forEach(s),vn=n(C),B=m(C,"DIV",{class:!0});var z=x(B);g(We.$$.fragment,z),Tn=n(z),Dt=m(z,"P",{"data-svelte-h":!0}),_(Dt)!=="svelte-19evuwa"&&(Dt.innerHTML=bs),yn=n(z),Lt=m(z,"UL",{"data-svelte-h":!0}),_(Lt)!=="svelte-1s62xm4"&&(Lt.innerHTML=_s),z.forEach(s),wn=n(C),le=m(C,"DIV",{class:!0});var So=x(le);g(Ve.$$.fragment,So),xn=n(So),Pt=m(So,"P",{"data-svelte-h":!0}),_(Pt)!=="svelte-63kthh"&&(Pt.textContent=vs),So.forEach(s),Mn=n(C),re=m(C,"DIV",{class:!0});var Eo=x(re);g(De.$$.fragment,Eo),Cn=n(Eo),At=m(Eo,"P",{"data-svelte-h":!0}),_(At)!=="svelte-1l397l"&&(At.textContent=Ts),Eo.forEach(s),C.forEach(s),ho=n(e),g(Le.$$.fragment,e),$o=n(e),q=m(e,"DIV",{class:!0});var Ro=x(q);g(Pe.$$.fragment,Ro),jn=n(Ro),Gt=m(Ro,"P",{"data-svelte-h":!0}),_(Gt)!=="svelte-j4u4it"&&(Gt.innerHTML=ys),Ro.forEach(s),bo=n(e),g(Ae.$$.fragment,e),_o=n(e),g(Ge.$$.fragment,e),vo=n(e),Ne=m(e,"DIV",{class:!0});var Fs=x(Ne);g(He.$$.fragment,Fs),Fs.forEach(s),To=n(e),g(Be.$$.fragment,e),yo=n(e),G=m(e,"DIV",{class:!0});var ao=x(G);g(Se.$$.fragment,ao),In=n(ao),Nt=m(ao,"P",{"data-svelte-h":!0}),_(Nt)!=="svelte-2spxi2"&&(Nt.textContent=ws),Jn=n(ao),g(ie.$$.fragment,ao),ao.forEach(s),wo=n(e),g(Ee.$$.fragment,e),xo=n(e),Re=m(e,"DIV",{class:!0});var qs=x(Re);g(Fe.$$.fragment,qs),qs.forEach(s),Mo=n(e),g(qe.$$.fragment,e),Co=n(e),Qe=m(e,"DIV",{class:!0});var Qs=x(Qe);g(Ye.$$.fragment,Qs),Qs.forEach(s),jo=n(e),g(Xe.$$.fragment,e),Io=n(e),J=m(e,"DIV",{class:!0});var V=x(J);g(ze.$$.fragment,V),kn=n(V),Ht=m(V,"P",{"data-svelte-h":!0}),_(Ht)!=="svelte-g073wf"&&(Ht.textContent=xs),Un=n(V),Bt=m(V,"P",{"data-svelte-h":!0}),_(Bt)!=="svelte-wb0eyv"&&(Bt.textContent=Ms),Zn=n(V),St=m(V,"UL",{"data-svelte-h":!0}),_(St)!=="svelte-1ci4p3w"&&(St.innerHTML=Cs),Wn=n(V),Et=m(V,"P",{"data-svelte-h":!0}),_(Et)!=="svelte-5infnv"&&(Et.innerHTML=js),Vn=n(V),W=m(V,"DIV",{class:!0});var S=x(W);g(Ke.$$.fragment,S),Dn=n(S),Rt=m(S,"P",{"data-svelte-h":!0}),_(Rt)!=="svelte-pdgtcq"&&(Rt.textContent=Is),Ln=n(S),Ft=m(S,"P",{"data-svelte-h":!0}),_(Ft)!=="svelte-b4jhp8"&&(Ft.textContent=Js),Pn=n(S),qt=m(S,"BLOCKQUOTE",{"data-svelte-h":!0}),_(qt)!=="svelte-1ezz2hf"&&(qt.innerHTML=ks),An=n(S),g(me.$$.fragment,S),S.forEach(s),Gn=n(V),k=m(V,"DIV",{class:!0});var D=x(k);g(Oe.$$.fragment,D),Nn=n(D),Qt=m(D,"P",{"data-svelte-h":!0}),_(Qt)!=="svelte-tdu9dm"&&(Qt.textContent=Us),Hn=n(D),Yt=m(D,"P",{"data-svelte-h":!0}),_(Yt)!=="svelte-ovzouy"&&(Yt.innerHTML=Zs),Bn=n(D),Xt=m(D,"P",{"data-svelte-h":!0}),_(Xt)!=="svelte-17y4fsr"&&(Xt.textContent=Ws),Sn=n(D),g(ce.$$.fragment,D),En=n(D),g(de.$$.fragment,D),Rn=n(D),g(pe.$$.fragment,D),D.forEach(s),V.forEach(s),Jo=n(e),g(et.$$.fragment,e),ko=n(e),tt=m(e,"P",{"data-svelte-h":!0}),_(tt)!=="svelte-nmlvuv"&&(tt.textContent=Vs),Uo=n(e),ot=m(e,"P",{"data-svelte-h":!0}),_(ot)!=="svelte-1bhk4eb"&&(ot.innerHTML=Ds),Zo=n(e),nt=m(e,"P",{"data-svelte-h":!0}),_(nt)!=="svelte-1hwudnq"&&(nt.textContent=Ls),Wo=n(e),st=m(e,"UL",{"data-svelte-h":!0}),_(st)!=="svelte-zdfeom"&&(st.innerHTML=Ps),Vo=n(e),g(at.$$.fragment,e),Do=n(e),Q=m(e,"DIV",{class:!0});var Fo=x(Q);g(lt.$$.fragment,Fo),Fn=n(Fo),zt=m(Fo,"P",{"data-svelte-h":!0}),_(zt)!=="svelte-57fhj7"&&(zt.textContent=As),Fo.forEach(s),Lo=n(e),g(rt.$$.fragment,e),Po=n(e),Z=m(e,"DIV",{class:!0});var E=x(Z);g(it.$$.fragment,E),qn=n(E),Kt=m(E,"P",{"data-svelte-h":!0}),_(Kt)!=="svelte-1qa18j9"&&(Kt.textContent=Gs),Qn=n(E),ge=m(E,"DIV",{class:!0});var qo=x(ge);g(mt.$$.fragment,qo),Yn=n(qo),Ot=m(qo,"P",{"data-svelte-h":!0}),_(Ot)!=="svelte-qix5eq"&&(Ot.textContent=Ns),qo.forEach(s),Xn=n(E),ue=m(E,"DIV",{class:!0});var Qo=x(ue);g(ct.$$.fragment,Qo),zn=n(Qo),eo=m(Qo,"P",{"data-svelte-h":!0}),_(eo)!=="svelte-xppdw9"&&(eo.textContent=Hs),Qo.forEach(s),Kn=n(E),fe=m(E,"DIV",{class:!0});var Yo=x(fe);g(dt.$$.fragment,Yo),On=n(Yo),to=m(Yo,"P",{"data-svelte-h":!0}),_(to)!=="svelte-chc6sp"&&(to.textContent=Bs),Yo.forEach(s),E.forEach(s),Ao=n(e),g(pt.$$.fragment,e),Go=n(e),L=m(e,"DIV",{class:!0});var be=x(L);g(gt.$$.fragment,be),es=n(be),oo=m(be,"P",{"data-svelte-h":!0}),_(oo)!=="svelte-ckiqb6"&&(oo.textContent=Ss),ts=n(be),he=m(be,"DIV",{class:!0});var Xo=x(he);g(ut.$$.fragment,Xo),os=n(Xo),no=m(Xo,"P",{"data-svelte-h":!0}),_(no)!=="svelte-10rnn1x"&&(no.innerHTML=Es),Xo.forEach(s),ns=n(be),$e=m(be,"DIV",{class:!0});var zo=x($e);g(ft.$$.fragment,zo),ss=n(zo),so=m(zo,"P",{"data-svelte-h":!0}),_(so)!=="svelte-1xu9o93"&&(so.textContent=Rs),zo.forEach(s),be.forEach(s),No=n(e),g(ht.$$.fragment,e),Ho=n(e),lo=m(e,"P",{}),x(lo).forEach(s),this.h()},h(){M(r,"name","hf:doc:metadata"),M(r,"content",pa),M(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(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(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(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(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(he,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(L,"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,a){t(document.head,r),c(e,T,a),c(e,d,a),c(e,b,a),u(v,e,a),c(e,l,a),u(y,e,a),c(e,ro,a),c(e,_e,a),c(e,io,a),u(ve,e,a),c(e,mo,a),u(Te,e,a),c(e,co,a),c(e,A,a),u(ye,A,null),t(A,Ko),t(A,xt),t(A,Oo),u(K,A,null),c(e,po,a),u(we,e,a),c(e,go,a),c(e,F,a),u(xe,F,null),t(F,en),t(F,Mt),c(e,uo,a),u(Me,e,a),c(e,fo,a),c(e,w,a),u(Ce,w,null),t(w,tn),t(w,Ct),t(w,on),t(w,jt),t(w,nn),t(w,It),t(w,sn),t(w,O),u(je,O,null),t(O,an),t(O,Jt),t(w,ln),t(w,ee),u(Ie,ee,null),t(ee,rn),t(ee,kt),t(w,mn),t(w,H),u(Je,H,null),t(H,cn),t(H,Ut),t(H,dn),u(te,H,null),t(w,pn),t(w,oe),u(ke,oe,null),t(oe,gn),t(oe,Zt),t(w,un),t(w,P),u(Ue,P,null),t(P,fn),t(P,Wt),t(P,hn),u(ne,P,null),t(P,$n),u(se,P,null),t(w,bn),t(w,ae),u(Ze,ae,null),t(ae,_n),t(ae,Vt),t(w,vn),t(w,B),u(We,B,null),t(B,Tn),t(B,Dt),t(B,yn),t(B,Lt),t(w,wn),t(w,le),u(Ve,le,null),t(le,xn),t(le,Pt),t(w,Mn),t(w,re),u(De,re,null),t(re,Cn),t(re,At),c(e,ho,a),u(Le,e,a),c(e,$o,a),c(e,q,a),u(Pe,q,null),t(q,jn),t(q,Gt),c(e,bo,a),u(Ae,e,a),c(e,_o,a),u(Ge,e,a),c(e,vo,a),c(e,Ne,a),u(He,Ne,null),c(e,To,a),u(Be,e,a),c(e,yo,a),c(e,G,a),u(Se,G,null),t(G,In),t(G,Nt),t(G,Jn),u(ie,G,null),c(e,wo,a),u(Ee,e,a),c(e,xo,a),c(e,Re,a),u(Fe,Re,null),c(e,Mo,a),u(qe,e,a),c(e,Co,a),c(e,Qe,a),u(Ye,Qe,null),c(e,jo,a),u(Xe,e,a),c(e,Io,a),c(e,J,a),u(ze,J,null),t(J,kn),t(J,Ht),t(J,Un),t(J,Bt),t(J,Zn),t(J,St),t(J,Wn),t(J,Et),t(J,Vn),t(J,W),u(Ke,W,null),t(W,Dn),t(W,Rt),t(W,Ln),t(W,Ft),t(W,Pn),t(W,qt),t(W,An),u(me,W,null),t(J,Gn),t(J,k),u(Oe,k,null),t(k,Nn),t(k,Qt),t(k,Hn),t(k,Yt),t(k,Bn),t(k,Xt),t(k,Sn),u(ce,k,null),t(k,En),u(de,k,null),t(k,Rn),u(pe,k,null),c(e,Jo,a),u(et,e,a),c(e,ko,a),c(e,tt,a),c(e,Uo,a),c(e,ot,a),c(e,Zo,a),c(e,nt,a),c(e,Wo,a),c(e,st,a),c(e,Vo,a),u(at,e,a),c(e,Do,a),c(e,Q,a),u(lt,Q,null),t(Q,Fn),t(Q,zt),c(e,Lo,a),u(rt,e,a),c(e,Po,a),c(e,Z,a),u(it,Z,null),t(Z,qn),t(Z,Kt),t(Z,Qn),t(Z,ge),u(mt,ge,null),t(ge,Yn),t(ge,Ot),t(Z,Xn),t(Z,ue),u(ct,ue,null),t(ue,zn),t(ue,eo),t(Z,Kn),t(Z,fe),u(dt,fe,null),t(fe,On),t(fe,to),c(e,Ao,a),u(pt,e,a),c(e,Go,a),c(e,L,a),u(gt,L,null),t(L,es),t(L,oo),t(L,ts),t(L,he),u(ut,he,null),t(he,os),t(he,no),t(L,ns),t(L,$e),u(ft,$e,null),t($e,ss),t($e,so),c(e,No,a),u(ht,e,a),c(e,Ho,a),c(e,lo,a),Bo=!0},p(e,[a]){const Y={};a&2&&(Y.$$scope={dirty:a,ctx:e}),y.$set(Y);const $t={};a&2&&($t.$$scope={dirty:a,ctx:e}),K.$set($t);const C={};a&2&&(C.$$scope={dirty:a,ctx:e}),te.$set(C);const bt={};a&2&&(bt.$$scope={dirty:a,ctx:e}),ne.$set(bt);const _t={};a&2&&(_t.$$scope={dirty:a,ctx:e}),se.$set(_t);const X={};a&2&&(X.$$scope={dirty:a,ctx:e}),ie.$set(X);const vt={};a&2&&(vt.$$scope={dirty:a,ctx:e}),me.$set(vt);const N={};a&2&&(N.$$scope={dirty:a,ctx:e}),ce.$set(N);const Tt={};a&2&&(Tt.$$scope={dirty:a,ctx:e}),de.$set(Tt);const z={};a&2&&(z.$$scope={dirty:a,ctx:e}),pe.$set(z)},i(e){Bo||(f(v.$$.fragment,e),f(y.$$.fragment,e),f(ve.$$.fragment,e),f(Te.$$.fragment,e),f(ye.$$.fragment,e),f(K.$$.fragment,e),f(we.$$.fragment,e),f(xe.$$.fragment,e),f(Me.$$.fragment,e),f(Ce.$$.fragment,e),f(je.$$.fragment,e),f(Ie.$$.fragment,e),f(Je.$$.fragment,e),f(te.$$.fragment,e),f(ke.$$.fragment,e),f(Ue.$$.fragment,e),f(ne.$$.fragment,e),f(se.$$.fragment,e),f(Ze.$$.fragment,e),f(We.$$.fragment,e),f(Ve.$$.fragment,e),f(De.$$.fragment,e),f(Le.$$.fragment,e),f(Pe.$$.fragment,e),f(Ae.$$.fragment,e),f(Ge.$$.fragment,e),f(He.$$.fragment,e),f(Be.$$.fragment,e),f(Se.$$.fragment,e),f(ie.$$.fragment,e),f(Ee.$$.fragment,e),f(Fe.$$.fragment,e),f(qe.$$.fragment,e),f(Ye.$$.fragment,e),f(Xe.$$.fragment,e),f(ze.$$.fragment,e),f(Ke.$$.fragment,e),f(me.$$.fragment,e),f(Oe.$$.fragment,e),f(ce.$$.fragment,e),f(de.$$.fragment,e),f(pe.$$.fragment,e),f(et.$$.fragment,e),f(at.$$.fragment,e),f(lt.$$.fragment,e),f(rt.$$.fragment,e),f(it.$$.fragment,e),f(mt.$$.fragment,e),f(ct.$$.fragment,e),f(dt.$$.fragment,e),f(pt.$$.fragment,e),f(gt.$$.fragment,e),f(ut.$$.fragment,e),f(ft.$$.fragment,e),f(ht.$$.fragment,e),Bo=!0)},o(e){h(v.$$.fragment,e),h(y.$$.fragment,e),h(ve.$$.fragment,e),h(Te.$$.fragment,e),h(ye.$$.fragment,e),h(K.$$.fragment,e),h(we.$$.fragment,e),h(xe.$$.fragment,e),h(Me.$$.fragment,e),h(Ce.$$.fragment,e),h(je.$$.fragment,e),h(Ie.$$.fragment,e),h(Je.$$.fragment,e),h(te.$$.fragment,e),h(ke.$$.fragment,e),h(Ue.$$.fragment,e),h(ne.$$.fragment,e),h(se.$$.fragment,e),h(Ze.$$.fragment,e),h(We.$$.fragment,e),h(Ve.$$.fragment,e),h(De.$$.fragment,e),h(Le.$$.fragment,e),h(Pe.$$.fragment,e),h(Ae.$$.fragment,e),h(Ge.$$.fragment,e),h(He.$$.fragment,e),h(Be.$$.fragment,e),h(Se.$$.fragment,e),h(ie.$$.fragment,e),h(Ee.$$.fragment,e),h(Fe.$$.fragment,e),h(qe.$$.fragment,e),h(Ye.$$.fragment,e),h(Xe.$$.fragment,e),h(ze.$$.fragment,e),h(Ke.$$.fragment,e),h(me.$$.fragment,e),h(Oe.$$.fragment,e),h(ce.$$.fragment,e),h(de.$$.fragment,e),h(pe.$$.fragment,e),h(et.$$.fragment,e),h(at.$$.fragment,e),h(lt.$$.fragment,e),h(rt.$$.fragment,e),h(it.$$.fragment,e),h(mt.$$.fragment,e),h(ct.$$.fragment,e),h(dt.$$.fragment,e),h(pt.$$.fragment,e),h(gt.$$.fragment,e),h(ut.$$.fragment,e),h(ft.$$.fragment,e),h(ht.$$.fragment,e),Bo=!1},d(e){e&&(s(T),s(d),s(b),s(l),s(ro),s(_e),s(io),s(mo),s(co),s(A),s(po),s(go),s(F),s(uo),s(fo),s(w),s(ho),s($o),s(q),s(bo),s(_o),s(vo),s(Ne),s(To),s(yo),s(G),s(wo),s(xo),s(Re),s(Mo),s(Co),s(Qe),s(jo),s(Io),s(J),s(Jo),s(ko),s(tt),s(Uo),s(ot),s(Zo),s(nt),s(Wo),s(st),s(Vo),s(Do),s(Q),s(Lo),s(Po),s(Z),s(Ao),s(Go),s(L),s(No),s(Ho),s(lo)),s(r),$(v,e),$(y,e),$(ve,e),$(Te,e),$(ye),$(K),$(we,e),$(xe),$(Me,e),$(Ce),$(je),$(Ie),$(Je),$(te),$(ke),$(Ue),$(ne),$(se),$(Ze),$(We),$(Ve),$(De),$(Le,e),$(Pe),$(Ae,e),$(Ge,e),$(He),$(Be,e),$(Se),$(ie),$(Ee,e),$(Fe),$(qe,e),$(Ye),$(Xe,e),$(ze),$(Ke),$(me),$(Oe),$(ce),$(de),$(pe),$(et,e),$(at,e),$(lt),$(rt,e),$(it),$(mt),$(ct),$(dt),$(pt,e),$(gt),$(ut),$(ft),$(ht,e)}}}const pa='{"title":"Tools","local":"tools","sections":[{"title":"Tools","local":"tools","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":"Default Tools","local":"default-tools","sections":[{"title":"PythonInterpreterTool","local":"smolagents.PythonInterpreterTool","sections":[],"depth":3},{"title":"DuckDuckGoSearchTool","local":"smolagents.DuckDuckGoSearchTool","sections":[],"depth":3},{"title":"VisitWebpageTool","local":"smolagents.VisitWebpageTool","sections":[],"depth":3},{"title":"UserInputTool","local":"smolagents.UserInputTool","sections":[],"depth":3}],"depth":2},{"title":"ToolCollection","local":"smolagents.ToolCollection","sections":[],"depth":2},{"title":"Agent टाइप्स","local":"agent-टइपस","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 ga(I){return Xs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class va extends zs{constructor(r){super(),Ks(this,r,ga,da,Ys,{})}}export{va as component};
