import{s as ga,o as pa,n as Q}from"../chunks/scheduler.f6319a2a.js";import{S as da,i as ua,g as l,s,r as g,A as fa,h as r,f as t,c as a,j as T,u as p,x as v,k as y,y as o,a as c,v as d,d as u,t as f,w as h}from"../chunks/index.85aa684c.js";import{T as bs}from"../chunks/Tip.3d397a88.js";import{D as M,E as po}from"../chunks/ExampleCodeBlock.ac5a24b2.js";import{C as uo}from"../chunks/CodeBlock.3400fc53.js";import{H as J,E as ha}from"../chunks/getInferenceSnippets.743412b2.js";function $a(j){let i,_="Smolagents 是一个实验性 API，可能会随时更改。由于 API 或底层模型可能发生变化，代理返回的结果可能会有所不同。";return{c(){i=l("p"),i.textContent=_},l($){i=r($,"P",{"data-svelte-h":!0}),v(i)!=="svelte-1vupjwt"&&(i.textContent=_)},m($,b){c($,i,b)},p:Q,d($){$&&t(i)}}}function ba(j){let i,_=`Loading a tool means that you’ll download the tool and execute it locally.
ALWAYS inspect the tool you’re downloading before loading it within your runtime, as you would do when
installing a package using pip/npm/apt.`;return{c(){i=l("p"),i.textContent=_},l($){i=r($,"P",{"data-svelte-h":!0}),v(i)!=="svelte-1kcherd"&&(i.textContent=_)},m($,b){c($,i,b)},p:Q,d($){$&&t(i)}}}function va(j){let i,_=`Loading a tool from the Hub means that you’ll download the tool and execute it locally.
ALWAYS inspect the tool you’re downloading before loading it within your runtime, as you would do when
installing a package using pip/npm/apt.`;return{c(){i=l("p"),i.textContent=_},l($){i=r($,"P",{"data-svelte-h":!0}),v(i)!=="svelte-fpk7e5"&&(i.textContent=_)},m($,b){c($,i,b)},p:Q,d($){$&&t(i)}}}function _a(j){let i,_="Examples:",$,b,w;return b=new uo({props:{code:"aW1hZ2VfZ2VuZXJhdG9yJTIwJTNEJTIwVG9vbC5mcm9tX3NwYWNlKCUwQSUyMCUyMCUyMCUyMHNwYWNlX2lkJTNEJTIyYmxhY2stZm9yZXN0LWxhYnMlMkZGTFVYLjEtc2NobmVsbCUyMiUyQyUwQSUyMCUyMCUyMCUyMG5hbWUlM0QlMjJpbWFnZS1nZW5lcmF0b3IlMjIlMkMlMEElMjAlMjAlMjAlMjBkZXNjcmlwdGlvbiUzRCUyMkdlbmVyYXRlJTIwYW4lMjBpbWFnZSUyMGZyb20lMjBhJTIwcHJvbXB0JTIyJTBBKSUwQWltYWdlJTIwJTNEJTIwaW1hZ2VfZ2VuZXJhdG9yKCUyMkdlbmVyYXRlJTIwYW4lMjBpbWFnZSUyMG9mJTIwYSUyMGNvb2wlMjBzdXJmZXIlMjBpbiUyMFRhaGl0aSUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>image_generator = Tool.from_space(
<span class="hljs-meta">... </span>    space_id=<span class="hljs-string">&quot;black-forest-labs/FLUX.1-schnell&quot;</span>,
<span class="hljs-meta">... </span>    name=<span class="hljs-string">&quot;image-generator&quot;</span>,
<span class="hljs-meta">... </span>    description=<span class="hljs-string">&quot;Generate an image from a prompt&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = image_generator(<span class="hljs-string">&quot;Generate an image of a cool surfer in Tahiti&quot;</span>)`,wrap:!1}}),{c(){i=l("p"),i.textContent=_,$=s(),g(b.$$.fragment)},l(m){i=r(m,"P",{"data-svelte-h":!0}),v(i)!=="svelte-kvfsh7"&&(i.textContent=_),$=a(m),p(b.$$.fragment,m)},m(m,I){c(m,i,I),c(m,$,I),d(b,m,I),w=!0},p:Q,i(m){w||(u(b.$$.fragment,m),w=!0)},o(m){f(b.$$.fragment,m),w=!1},d(m){m&&(t(i),t($)),h(b,m)}}}function Ta(j){let i,_;return i=new uo({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(){g(i.$$.fragment)},l($){p(i.$$.fragment,$)},m($,b){d(i,$,b),_=!0},p:Q,i($){_||(u(i.$$.fragment,$),_=!0)},o($){f(i.$$.fragment,$),_=!1},d($){h(i,$)}}}function ya(j){let i,_="Examples:",$,b,w;return b=new uo({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(){i=l("p"),i.textContent=_,$=s(),g(b.$$.fragment)},l(m){i=r(m,"P",{"data-svelte-h":!0}),v(i)!=="svelte-kvfsh7"&&(i.textContent=_),$=a(m),p(b.$$.fragment,m)},m(m,I){c(m,i,I),c(m,$,I),d(b,m,I),w=!0},p:Q,i(m){w||(u(b.$$.fragment,m),w=!0)},o(m){f(b.$$.fragment,m),w=!1},d(m){m&&(t(i),t($)),h(b,m)}}}function wa(j){let i,_="Example:",$,b,w;return b=new uo({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBUb29sQ29sbGVjdGlvbiUyQyUyMENvZGVBZ2VudCUwQSUwQWltYWdlX3Rvb2xfY29sbGVjdGlvbiUyMCUzRCUyMFRvb2xDb2xsZWN0aW9uLmZyb21faHViKCUyMmh1Z2dpbmdmYWNlLXRvb2xzJTJGZGlmZnVzaW9uLXRvb2xzLTY2MzBiYjE5YTk0MmMyMzA2YTJjZGI2ZiUyMiklMEFhZ2VudCUyMCUzRCUyMENvZGVBZ2VudCh0b29scyUzRCU1QippbWFnZV90b29sX2NvbGxlY3Rpb24udG9vbHMlNUQlMkMlMjBhZGRfYmFzZV90b29scyUzRFRydWUpJTBBJTBBYWdlbnQucnVuKCUyMlBsZWFzZSUyMGRyYXclMjBtZSUyMGElMjBwaWN0dXJlJTIwb2YlMjByaXZlcnMlMjBhbmQlMjBsYWtlcy4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> ToolCollection, CodeAgent

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> ToolCollection.from_mcp(server_parameters, trust_remote_code=<span class="hljs-literal">True</span>) <span class="hljs-keyword">as</span> tool_collection:
<span class="hljs-meta">&gt;&gt;&gt; </span>    agent = CodeAgent(tools=[*tool_collection.tools], add_base_tools=<span class="hljs-literal">True</span>, model=model)
<span class="hljs-meta">&gt;&gt;&gt; </span>    agent.run(<span class="hljs-string">&quot;Please find a remedy for hangover.&quot;</span>)`,wrap:!1}}),{c(){i=l("p"),i.textContent=_,$=s(),g(b.$$.fragment)},l(m){i=r(m,"P",{"data-svelte-h":!0}),v(i)!=="svelte-49dhgx"&&(i.textContent=_),$=a(m),p(b.$$.fragment,m)},m(m,I){c(m,i,I),c(m,$,I),d(b,m,I),w=!0},p:Q,i(m){w||(u(b.$$.fragment,m),w=!0)},o(m){f(b.$$.fragment,m),w=!1},d(m){m&&(t(i),t($)),h(b,m)}}}function Ma(j){let i,_="Example with a Streamable HTTP MCP server:",$,b,w;return b=new uo({props:{code:"d2l0aCUyMFRvb2xDb2xsZWN0aW9uLmZyb21fbWNwKCU3QiUyMnVybCUyMiUzQSUyMCUyMmh0dHAlM0ElMkYlMkYxMjcuMC4wLjElM0E4MDAwJTJGbWNwJTIyJTJDJTIwJTIydHJhbnNwb3J0JTIyJTNBJTIwJTIyc3RyZWFtYWJsZS1odHRwJTIyJTdEJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUyMGFzJTIwdG9vbF9jb2xsZWN0aW9uJTNBJTBBJTIwJTIwJTIwJTIwYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQodG9vbHMlM0QlNUIqdG9vbF9jb2xsZWN0aW9uLnRvb2xzJTVEJTJDJTIwYWRkX2Jhc2VfdG9vbHMlM0RUcnVlJTJDJTIwbW9kZWwlM0Rtb2RlbCklMEElMjAlMjAlMjAlMjBhZ2VudC5ydW4oJTIyUGxlYXNlJTIwZmluZCUyMGElMjByZW1lZHklMjBmb3IlMjBoYW5nb3Zlci4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> ToolCollection.from_mcp({<span class="hljs-string">&quot;url&quot;</span>: <span class="hljs-string">&quot;http://127.0.0.1:8000/mcp&quot;</span>, <span class="hljs-string">&quot;transport&quot;</span>: <span class="hljs-string">&quot;streamable-http&quot;</span>}, trust_remote_code=<span class="hljs-literal">True</span>) <span class="hljs-keyword">as</span> tool_collection:
<span class="hljs-meta">&gt;&gt;&gt; </span>    agent = CodeAgent(tools=[*tool_collection.tools], add_base_tools=<span class="hljs-literal">True</span>, model=model)
<span class="hljs-meta">&gt;&gt;&gt; </span>    agent.run(<span class="hljs-string">&quot;Please find a remedy for hangover.&quot;</span>)`,wrap:!1}}),{c(){i=l("p"),i.textContent=_,$=s(),g(b.$$.fragment)},l(m){i=r(m,"P",{"data-svelte-h":!0}),v(i)!=="svelte-178fndi"&&(i.textContent=_),$=a(m),p(b.$$.fragment,m)},m(m,I){c(m,i,I),c(m,$,I),d(b,m,I),w=!0},p:Q,i(m){w||(u(b.$$.fragment,m),w=!0)},o(m){f(b.$$.fragment,m),w=!1},d(m){m&&(t(i),t($)),h(b,m)}}}function Ca(j){let i,_,$,b,w,m,I,ho,$e,vs='要了解更多关于智能体和工具的信息，请务必阅读<a href="../index">入门指南</a>。本页面包含底层类的 API 文档。',$o,be,bo,ve,vo,A,_e,dn,kt,_s="Main function to quickly load a tool from the Hub.",un,X,_o,Te,To,F,ye,fn,Jt,Ts="Convert a function into an instance of a dynamically created Tool subclass.",yo,we,wo,x,xe,hn,Ut,ys=`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:`,$n,Zt,ws=`<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>`,bn,Vt,xs=`You can also override the method <a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.Tool.setup">setup()</a> if your tool has an expensive operation to perform before being
usable (such as loading a model). <a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.Tool.setup">setup()</a> will be called the first time you use your tool, but not at
instantiation.`,vn,K,Me,_n,Wt,Ms="Create tool from a dictionary representation.",Tn,O,Ce,yn,Lt,Cs='Creates a <a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.Tool">Tool</a> from a gradio tool.',wn,H,Ie,xn,Dt,Is="Loads a tool defined on the Hub.",Mn,ee,Cn,te,je,In,St,js='Creates a <a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.Tool">Tool</a> from a langchain tool.',jn,D,ke,kn,At,ks='Creates a <a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.Tool">Tool</a> from a Space given its id on the Hub.',Jn,oe,Un,ne,Zn,se,Je,Vn,Gt,Js="Upload the tool to the Hub.",Wn,E,Ue,Ln,Pt,Us=`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:`,Dn,Ht,Zs=`<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>`,Sn,ae,Ze,An,Et,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.`,Gn,le,Ve,Pn,Bt,Ws="Returns a dictionary representing the tool",xo,We,Mo,R,Le,Hn,Nt,Ls=`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>.`,Co,De,Io,Se,jo,Ae,Ge,ko,Pe,Jo,He,Ee,Uo,Be,Zo,Ne,Fe,Vo,Re,Wo,G,qe,En,Ft,Ds="Web search tool that performs searches using the DuckDuckGo search engine.",Bn,re,Lo,ze,Do,Ye,Qe,So,Xe,Ao,Ke,Oe,Go,et,Po,tt,ot,Ho,nt,Eo,k,st,Nn,Rt,Ss="Tool collections enable loading a collection of tools in the agent’s toolbox.",Fn,qt,As="Collections can be loaded from a collection in the Hub or from an MCP server, see:",Rn,zt,Gs='<li><a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.ToolCollection.from_hub">ToolCollection.from_hub()</a></li> <li><a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.ToolCollection.from_mcp">ToolCollection.from_mcp()</a></li>',qn,Yt,Ps='For example and usage, see: <a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.ToolCollection.from_hub">ToolCollection.from_hub()</a> and <a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.ToolCollection.from_mcp">ToolCollection.from_mcp()</a>',zn,V,at,Yn,Qt,Hs="Loads a tool collection from the Hub.",Qn,Xt,Es="it adds a collection of tools from all Spaces in the collection to the agent’s toolbox",Xn,Kt,Bs=`<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>`,Kn,ie,On,U,lt,es,Ot,Ns="Automatically load a tool collection from an MCP server.",ts,eo,Fs=`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.`,os,to,Rs=`Note: a separate thread will be spawned to run an asyncio event loop handling
the MCP server.`,ns,me,ss,ce,Bo,rt,No,it,qs="智能体可以处理工具之间的任何类型的对象；工具是完全多模态的，可以接受和返回文本、图像、音频、视频以及其他类型的对象。为了增加工具之间的兼容性，以及正确呈现在 ipython（jupyter、colab、ipython notebooks 等）中的返回结果，我们为这些类型实现了包装类。",Fo,mt,zs="被包装的对象应该继续保持其初始行为；例如，一个文本对象应继续表现为字符串，一个图像对象应继续表现为 <code>PIL.Image</code>。",Ro,ct,Ys="这些类型有三个特定的用途：",qo,gt,Qs="<li>调用 <code>to_raw</code> 方法时，应返回底层对象</li> <li>调用 <code>to_string</code> 方法时，应将对象转换为字符串：对于 <code>AgentText</code> 类型，可以直接返回字符串；对于其他实例，则返回对象序列化版本的路径</li> <li>在 ipython 内核中显示时，应正确显示对象</li>",zo,pt,Yo,q,dt,as,oo,Xs="Text type returned by the agent. Behaves as a string.",Qo,ut,Xo,Z,ft,ls,no,Ks="Image type returned by the agent. Behaves as a PIL.Image.Image.",rs,ge,ht,is,so,Os="Saves the image to a file.",ms,pe,$t,cs,ao,ea="Returns the “raw” version of that object. In the case of an AgentImage, it is a PIL.Image.Image.",gs,de,bt,ps,lo,ta=`Returns the stringified version of that object. In the case of an AgentImage, it is a path to the serialized
version of the image.`,Ko,vt,Oo,L,_t,ds,ro,oa="Audio type returned by the agent.",us,ue,Tt,fs,io,na="Returns the “raw” version of that object. It is a <code>torch.Tensor</code> object.",hs,fe,yt,$s,mo,sa=`Returns the stringified version of that object. In the case of an AgentAudio, it is a path to the serialized
version of the audio.`,en,wt,tn,fo,on;return w=new J({props:{title:"工具",local:"工具",headingTag:"h1"}}),I=new bs({props:{warning:!0,$$slots:{default:[$a]},$$scope:{ctx:j}}}),be=new J({props:{title:"工具",local:"工具",headingTag:"h2"}}),ve=new J({props:{title:"load_tool",local:"smolagents.load_tool",headingTag:"h3"}}),_e=new M({props:{name:"smolagents.load_tool",anchor:"smolagents.load_tool",parameters:[{name:"repo_id",val:""},{name:"model_repo_id",val:": str | None = None"},{name:"token",val:": str | None = None"},{name:"trust_remote_code",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.load_tool.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
Space repo ID of a tool on the Hub.`,name:"repo_id"},{anchor:"smolagents.load_tool.model_repo_id",description:`<strong>model_repo_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Use this argument to use a different model than the default one for the tool you selected.`,name:"model_repo_id"},{anchor:"smolagents.load_tool.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to identify you on hf.co. If unset, will use the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"smolagents.load_tool.trust_remote_code",description:`<strong>trust_remote_code</strong> (<code>bool</code>, <em>optional</em>, defaults to False) &#x2014;
This needs to be accepted in order to load a tool from Hub.`,name:"trust_remote_code"},{anchor:"smolagents.load_tool.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Additional keyword arguments that will be split in two: all arguments relevant to the Hub (such as
<code>cache_dir</code>, <code>revision</code>, <code>subfolder</code>) will be used when downloading the files for your tool, and the others
will be passed along to its init.`,name:"kwargs"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L791"}}),X=new bs({props:{warning:!0,$$slots:{default:[ba]},$$scope:{ctx:j}}}),Te=new J({props:{title:"tool",local:"smolagents.tool",headingTag:"h3"}}),ye=new M({props:{name:"smolagents.tool",anchor:"smolagents.tool",parameters:[{name:"tool_function",val:": Callable"}],parametersDescription:[{anchor:"smolagents.tool.tool_function",description:`<strong>tool_function</strong> (<code>Callable</code>) &#x2014; Function to convert into a Tool subclass.
Should have type hints for each input and a type hint for the output.
Should also have a docstring including the description of the function
and an &#x2018;Args:&#x2019; part where each argument is described.`,name:"tool_function"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L985"}}),we=new J({props:{title:"Tool",local:"smolagents.Tool",headingTag:"h3"}}),xe=new M({props:{name:"class smolagents.Tool",anchor:"smolagents.Tool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L106"}}),Me=new M({props:{name:"from_dict",anchor:"smolagents.Tool.from_dict",parameters:[{name:"tool_dict",val:": dict[str, Any]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.Tool.from_dict.tool_dict",description:"<strong>tool_dict</strong> (<code>dict[str, Any]</code>) &#x2014; Dictionary representation of the tool.",name:"tool_dict"},{anchor:"smolagents.Tool.from_dict.*kwargs",description:"*<strong>*kwargs</strong> &#x2014; Additional keyword arguments to pass to the tool&#x2019;s constructor.",name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L329",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


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


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


<p><a href="/docs/smolagents/v1.21.0/zh/reference/tools#smolagents.Tool">Tool</a></p>
`}}),oe=new po({props:{anchor:"smolagents.Tool.from_space.example",$$slots:{default:[_a]},$$scope:{ctx:j}}}),ne=new po({props:{anchor:"smolagents.Tool.from_space.example-2",$$slots:{default:[Ta]},$$scope:{ctx:j}}}),Je=new M({props:{name:"push_to_hub",anchor:"smolagents.Tool.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"commit_message",val:": str = 'Upload tool'"},{name:"private",val:": bool | None = None"},{name:"token",val:": bool | str | None = None"},{name:"create_pr",val:": bool = False"}],parametersDescription:[{anchor:"smolagents.Tool.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your tool to. It should contain your organization name when
pushing to a given organization.`,name:"repo_id"},{anchor:"smolagents.Tool.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;Upload tool&quot;</code>) &#x2014;
Message to commit while pushing.`,name:"commit_message"},{anchor:"smolagents.Tool.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,name:"private"},{anchor:"smolagents.Tool.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If unset, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"smolagents.Tool.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to create a PR with the uploaded files or directly commit.`,name:"create_pr"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L376"}}),Ue=new M({props:{name:"save",anchor:"smolagents.Tool.save",parameters:[{name:"output_dir",val:": str | Path"},{name:"tool_file_name",val:": str = 'tool'"},{name:"make_gradio_app",val:": bool = True"}],parametersDescription:[{anchor:"smolagents.Tool.save.output_dir",description:"<strong>output_dir</strong> (<code>str</code> or <code>Path</code>) &#x2014; The folder in which you want to save your tool.",name:"output_dir"},{anchor:"smolagents.Tool.save.tool_file_name",description:"<strong>tool_file_name</strong> (<code>str</code>, <em>optional</em>) &#x2014; The file name in which you want to save your tool.",name:"tool_file_name"},{anchor:"smolagents.Tool.save.make_gradio_app",description:"<strong>make_gradio_app</strong> (<code>bool</code>, <em>optional</em>, defaults to True) &#x2014; Whether to also export a <code>requirements.txt</code> file and Gradio UI.",name:"make_gradio_app"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L345"}}),Ze=new M({props:{name:"setup",anchor:"smolagents.Tool.setup",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L241"}}),Ve=new M({props:{name:"to_dict",anchor:"smolagents.Tool.to_dict",parameters:[],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L264"}}),We=new J({props:{title:"launch_gradio_demo",local:"smolagents.launch_gradio_demo",headingTag:"h3"}}),Le=new M({props:{name:"smolagents.launch_gradio_demo",anchor:"smolagents.launch_gradio_demo",parameters:[{name:"tool",val:": Tool"}],parametersDescription:[{anchor:"smolagents.launch_gradio_demo.tool",description:"<strong>tool</strong> (<code>Tool</code>) &#x2014; The tool for which to launch the demo.",name:"tool"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L745"}}),De=new J({props:{title:"默认工具",local:"默认工具",headingTag:"h2"}}),Se=new J({props:{title:"PythonInterpreterTool",local:"smolagents.PythonInterpreterTool",headingTag:"h3"}}),Ge=new M({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.21.0/src/smolagents/default_tools.py#L38"}}),Pe=new J({props:{title:"FinalAnswerTool",local:"smolagents.FinalAnswerTool",headingTag:"h3"}}),Ee=new M({props:{name:"class smolagents.FinalAnswerTool",anchor:"smolagents.FinalAnswerTool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/default_tools.py#L80"}}),Be=new J({props:{title:"UserInputTool",local:"smolagents.UserInputTool",headingTag:"h3"}}),Fe=new M({props:{name:"class smolagents.UserInputTool",anchor:"smolagents.UserInputTool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/default_tools.py#L90"}}),Re=new J({props:{title:"DuckDuckGoSearchTool",local:"smolagents.DuckDuckGoSearchTool",headingTag:"h3"}}),qe=new M({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.21.0/src/smolagents/default_tools.py#L101"}}),re=new po({props:{anchor:"smolagents.DuckDuckGoSearchTool.example",$$slots:{default:[ya]},$$scope:{ctx:j}}}),ze=new J({props:{title:"GoogleSearchTool",local:"smolagents.GoogleSearchTool",headingTag:"h3"}}),Qe=new M({props:{name:"class smolagents.GoogleSearchTool",anchor:"smolagents.GoogleSearchTool",parameters:[{name:"provider",val:": str = 'serpapi'"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/default_tools.py#L159"}}),Xe=new J({props:{title:"VisitWebpageTool",local:"smolagents.VisitWebpageTool",headingTag:"h3"}}),Oe=new M({props:{name:"class smolagents.VisitWebpageTool",anchor:"smolagents.VisitWebpageTool",parameters:[{name:"max_output_length",val:": int = 40000"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/default_tools.py#L451"}}),et=new J({props:{title:"SpeechToTextTool",local:"smolagents.SpeechToTextTool",headingTag:"h3"}}),ot=new M({props:{name:"class smolagents.SpeechToTextTool",anchor:"smolagents.SpeechToTextTool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/default_tools.py#L608"}}),nt=new J({props:{title:"工具集合",local:"smolagents.ToolCollection",headingTag:"h2"}}),st=new M({props:{name:"class smolagents.ToolCollection",anchor:"smolagents.ToolCollection",parameters:[{name:"tools",val:": list[Tool]"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L846"}}),at=new M({props:{name:"from_hub",anchor:"smolagents.ToolCollection.from_hub",parameters:[{name:"collection_slug",val:": str"},{name:"token",val:": str | None = None"},{name:"trust_remote_code",val:": bool = False"}],parametersDescription:[{anchor:"smolagents.ToolCollection.from_hub.collection_slug",description:"<strong>collection_slug</strong> (str) &#x2014; The collection slug referencing the collection.",name:"collection_slug"},{anchor:"smolagents.ToolCollection.from_hub.token",description:"<strong>token</strong> (str, <em>optional</em>) &#x2014; The authentication token if the collection is private.",name:"token"},{anchor:"smolagents.ToolCollection.from_hub.trust_remote_code",description:"<strong>trust_remote_code</strong> (bool, <em>optional</em>, defaults to False) &#x2014; Whether to trust the remote code.",name:"trust_remote_code"}],source:"https://github.com/huggingface/smolagents/blob/v1.21.0/src/smolagents/tools.py#L860",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


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


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


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