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