import{s as Ti,o as xi,n as In}from"../chunks/scheduler.25b97de1.js";import{S as ki,i as Ci,g as s,s as n,r as d,A as Mi,h as l,f as a,c as o,j as b,u as m,x as u,k as _,y as t,a as i,v as p,d as c,t as g,w as h}from"../chunks/index.d9030fc9.js";import{T as ll}from"../chunks/Tip.baa67368.js";import{D as $}from"../chunks/Docstring.ffac8efa.js";import{C as Ho}from"../chunks/CodeBlock.e6cd0d95.js";import{E as br}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as M,E as Ii}from"../chunks/EditOnGithub.91d95064.js";function Ai(q){let f,x=`Transformers Agents is an experimental API which is subject to change at any time. Results returned by the agents
can vary as the APIs or underlying models are prone to change.`;return{c(){f=s("p"),f.textContent=x},l(y){f=l(y,"P",{"data-svelte-h":!0}),u(f)!=="svelte-1fgfei3"&&(f.textContent=x)},m(y,w){i(y,f,w)},p:In,d(y){y&&a(f)}}}function ji(q){let f,x="Example:",y,w,T;return w=new Ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5hZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMEElMEFhZ2VudCUyMCUzRCUyMENvZGVBZ2VudCh0b29scyUzRCU1QiU1RCklMEFhZ2VudC5ydW4oJTIyV2hhdCUyMGlzJTIwdGhlJTIwcmVzdWx0JTIwb2YlMjAyJTIwcG93ZXIlMjAzLjczODQlM0YlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers.agents <span class="hljs-keyword">import</span> CodeAgent

agent = CodeAgent(tools=[])
agent.run(<span class="hljs-string">&quot;What is the result of 2 power 3.7384?&quot;</span>)`,wrap:!1}}),{c(){f=s("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(v){f=l(v,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(v),m(w.$$.fragment,v)},m(v,C){i(v,f,C),i(v,y,C),p(w,v,C),T=!0},p:In,i(v){T||(c(w.$$.fragment,v),T=!0)},o(v){g(w.$$.fragment,v),T=!1},d(v){v&&(a(f),a(y)),h(w,v)}}}function Li(q){let f,x="Example:",y,w,T;return w=new Ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5hZ2VudHMlMjBpbXBvcnQlMjBSZWFjdENvZGVBZ2VudCUwQWFnZW50JTIwJTNEJTIwUmVhY3RDb2RlQWdlbnQodG9vbHMlM0QlNUIlNUQpJTBBYWdlbnQucnVuKCUyMldoYXQlMjBpcyUyMHRoZSUyMHJlc3VsdCUyMG9mJTIwMiUyMHBvd2VyJTIwMy43Mzg0JTNGJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers.agents <span class="hljs-keyword">import</span> ReactCodeAgent
agent = ReactCodeAgent(tools=[])
agent.run(<span class="hljs-string">&quot;What is the result of 2 power 3.7384?&quot;</span>)`,wrap:!1}}),{c(){f=s("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(v){f=l(v,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(v),m(w.$$.fragment,v)},m(v,C){i(v,f,C),i(v,y,C),p(w,v,C),T=!0},p:In,i(v){T||(c(w.$$.fragment,v),T=!0)},o(v){g(w.$$.fragment,v),T=!1},d(v){v&&(a(f),a(y)),h(w,v)}}}function qi(q){let f,x=`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(){f=s("p"),f.textContent=x},l(y){f=l(y,"P",{"data-svelte-h":!0}),u(f)!=="svelte-1kcherd"&&(f.textContent=x)},m(y,w){i(y,f,w)},p:In,d(y){y&&a(f)}}}function Pi(q){let f,x=`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(){f=s("p"),f.textContent=x},l(y){f=l(y,"P",{"data-svelte-h":!0}),u(f)!=="svelte-fpk7e5"&&(f.textContent=x)},m(y,w){i(y,f,w)},p:In,d(y){y&&a(f)}}}function Ji(q){let f,x="For instance:",y,w,T;return w=new Ho({props:{code:"ZnJvbSUyMG15X3Rvb2xfbW9kdWxlJTIwaW1wb3J0JTIwTXlUb29sJTBBbXlfdG9vbCUyMCUzRCUyME15VG9vbCgpJTBBbXlfdG9vbC5wdXNoX3RvX2h1YiglMjJteS11c2VybmFtZSUyRm15LXNwYWNlJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> my_tool_module <span class="hljs-keyword">import</span> MyTool
my_tool = MyTool()
my_tool.push_to_hub(<span class="hljs-string">&quot;my-username/my-space&quot;</span>)`,wrap:!1}}),{c(){f=s("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(v){f=l(v,"P",{"data-svelte-h":!0}),u(f)!=="svelte-4vay6o"&&(f.textContent=x),y=o(v),m(w.$$.fragment,v)},m(v,C){i(v,f,C),i(v,y,C),p(w,v,C),T=!0},p:In,i(v){T||(c(w.$$.fragment,v),T=!0)},o(v){g(w.$$.fragment,v),T=!1},d(v){v&&(a(f),a(y)),h(w,v)}}}function Ei(q){let f,x="Example:",y,w,T;return w=new Ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRvb2xDb2xsZWN0aW9uJTJDJTIwUmVhY3RDb2RlQWdlbnQlMEElMEFpbWFnZV90b29sX2NvbGxlY3Rpb24lMjAlM0QlMjBUb29sQ29sbGVjdGlvbihjb2xsZWN0aW9uX3NsdWclM0QlMjJodWdnaW5nZmFjZS10b29scyUyRmRpZmZ1c2lvbi10b29scy02NjMwYmIxOWE5NDJjMjMwNmEyY2RiNmYlMjIpJTBBYWdlbnQlMjAlM0QlMjBSZWFjdENvZGVBZ2VudCh0b29scyUzRCU1QippbWFnZV90b29sX2NvbGxlY3Rpb24udG9vbHMlNUQlMkMlMjBhZGRfYmFzZV90b29scyUzRFRydWUpJTBBJTBBYWdlbnQucnVuKCUyMlBsZWFzZSUyMGRyYXclMjBtZSUyMGElMjBwaWN0dXJlJTIwb2YlMjByaXZlcnMlMjBhbmQlMjBsYWtlcy4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ToolCollection, ReactCodeAgent

<span class="hljs-meta">&gt;&gt;&gt; </span>image_tool_collection = ToolCollection(collection_slug=<span class="hljs-string">&quot;huggingface-tools/diffusion-tools-6630bb19a942c2306a2cdb6f&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>agent = ReactCodeAgent(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(){f=s("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(v){f=l(v,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(v),m(w.$$.fragment,v)},m(v,C){i(v,f,C),i(v,y,C),p(w,v,C),T=!0},p:In,i(v){T||(c(w.$$.fragment,v),T=!0)},o(v){g(w.$$.fragment,v),T=!1},d(v){v&&(a(f),a(y)),h(w,v)}}}function Ui(q){let f,x,y,w,T,v,C,Ro,Ve,il=`To learn more about agents and tools make sure to read the <a href="../transformers_agents">introductory guide</a>. This page
contains the API docs for the underlying classes.`,Vo,ze,zo,Be,dl='We provide two types of agents, based on the main <a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.Agent">Agent</a> class:',Bo,Se,ml='<li><a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.CodeAgent">CodeAgent</a> acts in one shot, generating code to solve the task, then executes it at once.</li> <li><a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.ReactAgent">ReactAgent</a> acts step by step, each step consisting of one thought, then one tool call and execution. It has two classes:<ul><li><a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.ReactJsonAgent">ReactJsonAgent</a> writes its tool calls in JSON.</li> <li><a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.ReactCodeAgent">ReactCodeAgent</a> writes its tool calls in Python code.</li></ul></li>',So,Ze,Zo,P,Ge,_r,ae,Oe,$r,An,pl=`Execute tool with the provided input and returns the result.
This method replaces arguments with the actual values from the state if they refer to state variables.`,yr,re,Fe,wr,jn,cl="Parse action from the LLM output",Tr,se,Ye,xr,Ln,gl="To be implemented in the child class",kr,le,Qe,Cr,qn,hl=`Reads past llm_outputs, actions, and observations or errors from the logs into a series of messages
that can be used as input to the LLM.`,Go,Xe,Oo,N,Ke,Mr,Pn,ul="A class for an agent that solves the given task using a single block of code. It plans all its actions, then executes all in one shot.",Ir,ie,et,Ar,Jn,fl=`Override this method if you want to change the way the code is
cleaned in the <code>run</code> method.`,jr,O,tt,Lr,En,vl="Runs the agent for the given task.",qr,de,Fo,nt,Yo,A,ot,Pr,Un,bl=`This agent that solves the given task step by step, using the ReAct framework:
While the objective is not reached, the agent will perform a cycle of thinking and acting.
The action will be parsed from the LLM output: it consists in calls to tools from the toolbox, with arguments chosen by the LLM engine.`,Jr,me,at,Er,Dn,_l="Runs the agent in direct mode, returning outputs only at the end: should be launched only in the <code>run</code> method.",Ur,pe,rt,Dr,Nn,$l="Used periodically by the agent to plan the next steps to reach the objective.",Nr,ce,st,Hr,Hn,yl="This method provides a final answer to the task, based on the logs of the agent’s interactions.",Wr,F,lt,Rr,Wn,wl="Runs the agent for the given task.",Vr,ge,zr,he,it,Br,Rn,Tl="Runs the agent in streaming mode, yielding steps as they are executed: should be launched only in the <code>run</code> method.",Qo,B,dt,Sr,Vn,xl=`This agent that solves the given task step by step, using the ReAct framework:
While the objective is not reached, the agent will perform a cycle of thinking and acting.
The tool calls will be formulated by the LLM in JSON format, then parsed and executed.`,Zr,ue,mt,Gr,zn,kl=`Perform one step in the ReAct framework: the agent thinks, acts, and observes the result.
The errors are raised here, they are caught and logged in the run() method.`,Xo,S,pt,Or,Bn,Cl=`This agent that solves the given task step by step, using the ReAct framework:
While the objective is not reached, the agent will perform a cycle of thinking and acting.
The tool calls will be formulated by the LLM in code format, then parsed and executed.`,Fr,fe,ct,Yr,Sn,Ml=`Perform one step in the ReAct framework: the agent thinks, acts, and observes the result.
The errors are raised here, they are caught and logged in the run() method.`,Ko,gt,ea,ht,ut,ta,ft,na,vt,oa,Z,bt,Qr,Zn,Il="Main function to quickly load a tool, be it on the Hub or in the Transformers library.",Xr,ve,aa,_t,ra,X,$t,Kr,Gn,Al="Converts a function into an instance of a Tool subclass.",sa,yt,la,k,wt,es,On,jl=`A base class for the functions used by the agent. Subclass this and implement the <code>__call__</code> method as well as the
following class attributes:`,ts,Fn,Ll=`<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]]]</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>`,ns,Yn,ql=`You can also override the method <a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.Tool.setup">setup()</a> if your tool as an expensive operation to perform before being
usable (such as loading a model). <a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.Tool.setup">setup()</a> will be called the first time you use your tool, but not at
instantiation.`,os,be,Tt,as,Qn,Pl='Creates a <a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.Tool">Tool</a> from a gradio tool.',rs,Y,xt,ss,Xn,Jl="Loads a tool defined on the Hub.",ls,_e,is,$e,kt,ds,Kn,El='Creates a <a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.Tool">Tool</a> from a langchain tool.',ms,V,Ct,ps,eo,Ul="Upload the tool to the Hub.",cs,to,Dl="For this method to work properly, your tool must have been defined in a separate module (not <code>__main__</code>).",gs,ye,hs,z,Mt,us,no,Nl=`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:`,fs,oo,Hl=`<li>a config file named <code>tool_config.json</code></li> <li>an <code>app.py</code> file so that your tool can be converted to a space</li> <li>a <code>requirements.txt</code> containing the names of the module used by your tool (as detected when inspecting its
code)</li>`,vs,ao,Wl="You should only use this method to save tools that are defined in a separate module (not <code>__main__</code>).",bs,we,It,_s,ro,Rl=`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.`,ia,At,da,j,jt,$s,so,Vl=`The toolbox contains all tools that the agent can perform operations with, as well as a few methods to
manage them.`,ys,Te,Lt,ws,lo,zl="Adds a tool to the toolbox",Ts,xe,qt,xs,io,Bl="Clears the toolbox",ks,ke,Pt,Cs,mo,Sl="Removes a tool from the toolbox",Ms,Ce,Jt,Is,po,Zl="Returns the description of all tools in the toolbox",As,Me,Et,js,co,Gl="Updates a tool in the toolbox according to its name.",ma,Ut,pa,L,Dt,Ls,go,Ol=`A <a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.Tool">Tool</a> tailored towards Transformer models. On top of the class attributes of the base class <a href="/docs/transformers/pr_29969/en/main_classes/agent#transformers.Tool">Tool</a>, you will
need to specify:`,qs,ho,Fl=`<li><strong>model_class</strong> (<code>type</code>) — The class to use to load the model in this tool.</li> <li><strong>default_checkpoint</strong> (<code>str</code>) — The default checkpoint that should be used when the user doesn’t specify one.</li> <li><strong>pre_processor_class</strong> (<code>type</code>, <em>optional</em>, defaults to <a href="/docs/transformers/pr_29969/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>) — The class to use to load the
pre-processor</li> <li><strong>post_processor_class</strong> (<code>type</code>, <em>optional</em>, defaults to <a href="/docs/transformers/pr_29969/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>) — The class to use to load the
post-processor (when different from the pre-processor).</li>`,Ps,Ie,Nt,Js,uo,Yl="Uses the <code>post_processor</code> to decode the model output.",Es,Ae,Ht,Us,fo,Ql="Uses the <code>pre_processor</code> to prepare the inputs for the <code>model</code>.",Ds,je,Wt,Ns,vo,Xl="Sends the inputs through the <code>model</code>.",Hs,Le,Rt,Ws,bo,Kl="Instantiates the <code>pre_processor</code>, <code>model</code> and <code>post_processor</code> if necessary.",ca,Vt,ga,K,zt,Rs,_o,ei=`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>.`,ha,Bt,ua,ee,St,Vs,$o,ti="Runs an agent with the given task and streams the messages from the agent as gradio ChatMessages.",fa,Zt,va,H,Gt,zs,yo,ni="Tool collections enable loading all Spaces from a collection in order to be added to the agent’s toolbox.",Bs,wo,oi=`<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>`,Ss,qe,ba,Ot,_a,Ft,ai=`You’re free to create and use your own engines to be usable by the Agents framework.
These engines have the following specification:`,$a,Yt,ri='<li>Follow the <a href="../chat_templating.md">messages format</a> for its input (<code>List[Dict[str, str]]</code>) and return a string.</li> <li>Stop generating outputs <em>before</em> the sequences passed in the argument <code>stop_sequences</code></li>',ya,Qt,wa,Xt,si="For convenience, we have added a <code>TransformersEngine</code> that implements the points above, taking a pre-initialized <code>Pipeline</code> as input.",Ta,Kt,xa,te,en,Zs,To,li="This engine uses a pre-initialized local text-generation pipeline.",ka,tn,Ca,nn,ii='The <code>HfApiEngine</code> is an engine that wraps an <a href="https://huggingface.co/docs/api-inference/index" rel="nofollow">HF Inference API</a> client for the execution of the LLM.',Ma,on,Ia,ne,an,Gs,xo,di="This engine leverages Hugging Face’s Inference API service, either serverless or with a dedicated endpoint.",Aa,rn,ja,sn,mi=`Agents can handle any type of object in-between tools; tools, being completely multimodal, can accept and return
text, image, audio, video, among other types. In order to increase compatibility between tools, as well as to
correctly render these returns in ipython (jupyter, colab, ipython notebooks, …), we implement wrapper classes
around these types.`,La,ln,pi=`The wrapped objects should continue behaving as initially; a text object should still behave as a string, an image
object should still behave as a <code>PIL.Image</code>.`,qa,dn,ci="These types have three specific purposes:",Pa,mn,gi=`<li>Calling <code>to_raw</code> on the type should return the underlying object</li> <li>Calling <code>to_string</code> on the type should return the object as a string: that can be the string in case of an <code>AgentText</code>
but will be the path of the serialized version of the object in other instances</li> <li>Displaying it in an ipython kernel should display the object correctly</li>`,Ja,pn,Ea,oe,cn,Os,ko,hi="Text type returned by the agent. Behaves as a string.",Ua,gn,Da,J,hn,Fs,Co,ui="Image type returned by the agent. Behaves as a PIL.Image.",Ys,Pe,un,Qs,Mo,fi="Saves the image to a file.",Xs,Je,fn,Ks,Io,vi="Returns the “raw” version of that object. In the case of an AgentImage, it is a PIL.Image.",el,Ee,vn,tl,Ao,bi=`Returns the stringified version of that object. In the case of an AgentImage, it is a path to the serialized
version of the image.`,Na,bn,Ha,W,_n,nl,jo,_i="Audio type returned by the agent.",ol,Ue,$n,al,Lo,$i="Returns the “raw” version of that object. It is a <code>torch.Tensor</code> object.",rl,De,yn,sl,qo,yi=`Returns the stringified version of that object. In the case of an AgentAudio, it is a path to the serialized
version of the audio.`,Wa,wn,Ra,Wo,Va;return T=new M({props:{title:"Agents & Tools",local:"agents--tools",headingTag:"h1"}}),C=new ll({props:{warning:!0,$$slots:{default:[Ai]},$$scope:{ctx:q}}}),ze=new M({props:{title:"Agents",local:"agents",headingTag:"h2"}}),Ze=new M({props:{title:"Agent",local:"transformers.Agent",headingTag:"h3"}}),Ge=new $({props:{name:"class transformers.Agent",anchor:"transformers.Agent",parameters:[{name:"tools",val:": Union"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfApiEngine object at 0x7f3bd2e00310>"},{name:"system_prompt",val:" = 'You are an expert assistant who can solve any task using code blobs. You will be given a task to solve as best you can.\\nTo do so, you have been given access to a list of tools: these tools are basically Python functions which you can call with code.\\nTo solve the task, you must plan forward to proceed in a series of steps, in a cycle of \\'Thought:\\', \\'Code:\\', and \\'Observation:\\' sequences.\\n\\nAt each step, in the \\'Thought:\\' sequence, you should first explain your reasoning towards solving the task and the tools that you want to use.\\nThen in the \\'Code:\\' sequence, you should write the code in simple Python. The code sequence must end with \\'<end_action>\\' sequence.\\nDuring each intermediate step, you can use \\'print()\\' to save whatever important information you will then need.\\nThese print outputs will then appear in the \\'Observation:\\' field, which will be available as input for the next step.\\nIn the end you have to return a final answer using the `final_answer` tool.\\n\\nHere are a few examples using notional tools:\\n---\\nTask: \"Generate an image of the oldest person in this document.\"\\n\\nThought: I will proceed step by step and use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = document_qa(document=document, question=\"Who is the oldest person mentioned?\")\\nprint(answer)\\n```<end_action>\\nObservation: \"The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland.\"\\n\\nThought: I will now generate an image showcasing the oldest person.\\nCode:\\n```py\\nimage = image_generator(\"A portrait of John Doe, a 55-year-old man living in Canada.\")\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: \"What is the result of the following operation: 5 + 3 + 1294.678?\"\\n\\nThought: I will use python code to compute the result of the operation and then return the final answer using the `final_answer` tool\\nCode:\\n```py\\nresult = 5 + 3 + 1294.678\\nfinal_answer(result)\\n```<end_action>\\n\\n---\\nTask: \"Which city has the highest population: Guangzhou or Shanghai?\"\\n\\nThought: I need to get the populations for both cities and compare them: I will use the tool `search` to get the population of both cities.\\nCode:\\n```py\\npopulation_guangzhou = search(\"Guangzhou population\")\\nprint(\"Population Guangzhou:\", population_guangzhou)\\npopulation_shanghai = search(\"Shanghai population\")\\nprint(\"Population Shanghai:\", population_shanghai)\\n```<end_action>\\nObservation:\\nPopulation Guangzhou: [\\'Guangzhou has a population of 15 million inhabitants as of 2021.\\']\\nPopulation Shanghai: \\'26 million (2019)\\'\\n\\nThought: Now I know that Shanghai has the highest population.\\nCode:\\n```py\\nfinal_answer(\"Shanghai\")\\n```<end_action>\\n\\n---\\nTask: \"What is the current age of the pope, raised to the power 0.36?\"\\n\\nThought: I will use the tool `wiki` to get the age of the pope, then raise it to the power 0.36.\\nCode:\\n```py\\npope_age = wiki(query=\"current pope age\")\\nprint(\"Pope age:\", pope_age)\\n```<end_action>\\nObservation:\\nPope age: \"The pope Francis is currently 85 years old.\"\\n\\nThought: I know that the pope is 85 years old. Let\\'s compute the result using python code.\\nCode:\\n```py\\npope_current_age = 85 ** 0.36\\nfinal_answer(pope_current_age)\\n```<end_action>\\n\\nAbove example were using notional tools that might not exist for you. On top of performing computations in the Python code snippets that you create, you have acces to those tools (and no other tool):\\n\\n<<tool_descriptions>>\\n\\n<<managed_agents_descriptions>>\\n\\nHere are the rules you should always follow to solve your task:\\n1. Always provide a \\'Thought:\\' sequence, and a \\'Code:\\n```py\\' sequence ending with \\'```<end_action>\\' sequence, else you will fail.\\n2. Use only variables that you have defined!\\n3. Always use the right arguments for the tools. DO NOT pass the arguments as a dict as in \\'answer = wiki({\\'query\\': \"What is the place where James Bond lives?\"})\\', but use the arguments directly as in \\'answer = wiki(query=\"What is the place where James Bond lives?\")\\'.\\n4. Take care to not chain too many sequential tool calls in the same code block, especially when the output format is unpredictable. For instance, a call to search has an unpredictable return format, so do not have another tool call that depends on its output in the same block: rather output results with print() to use them in the next block.\\n5. Call a tool only when needed, and never re-do a tool call that you previously did with the exact same parameters.\\n6. Don\\'t name any new variable with the same name as a tool: for instance don\\'t name a variable \\'final_answer\\'.\\n7. Never create any notional variables in our code, as having these in your logs might derail you from the true variables.\\n8. You can use imports in your code, but only from the following list of modules: <<authorized_imports>>\\n9. The state persists between code executions: so if in one step you\\'ve created variables or imported modules, these will all persist.\\n10. Don\\'t give up! You\\'re in charge of solving the task, not providing directions to solve it.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n'"},{name:"tool_description_template",val:" = None"},{name:"additional_args",val:" = {}"},{name:"max_iterations",val:": int = 6"},{name:"tool_parser",val:" = <function parse_json_tool_call at 0x7f3bd2dc7010>"},{name:"add_base_tools",val:": bool = False"},{name:"verbose",val:": int = 0"},{name:"grammar",val:": Dict = None"},{name:"managed_agents",val:": List = None"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L352"}}),Oe=new $({props:{name:"execute_tool_call",anchor:"transformers.Agent.execute_tool_call",parameters:[{name:"tool_name",val:": str"},{name:"arguments",val:": Dict"}],parametersDescription:[{anchor:"transformers.Agent.execute_tool_call.tool_name",description:"<strong>tool_name</strong> (<code>str</code>) &#x2014; Name of the Tool to execute (should be one from self.toolbox).",name:"tool_name"},{anchor:"transformers.Agent.execute_tool_call.arguments",description:"<strong>arguments</strong> (Dict[str, str]) &#x2014; Arguments passed to the Tool.",name:"arguments"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L513"}}),Fe=new $({props:{name:"extract_action",anchor:"transformers.Agent.extract_action",parameters:[{name:"llm_output",val:": str"},{name:"split_token",val:": str"}],parametersDescription:[{anchor:"transformers.Agent.extract_action.llm_output",description:"<strong>llm_output</strong> (<code>str</code>) &#x2014; Output of the LLM",name:"llm_output"},{anchor:"transformers.Agent.extract_action.split_token",description:"<strong>split_token</strong> (<code>str</code>) &#x2014; Separator for the action. Should match the example in the system prompt.",name:"split_token"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L492"}}),Ye=new $({props:{name:"run",anchor:"transformers.Agent.run",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L568"}}),Qe=new $({props:{name:"write_inner_memory_from_logs",anchor:"transformers.Agent.write_inner_memory_from_logs",parameters:[{name:"summary_mode",val:": Optional = False"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L432"}}),Xe=new M({props:{title:"CodeAgent",local:"transformers.CodeAgent",headingTag:"h3"}}),Ke=new $({props:{name:"class transformers.CodeAgent",anchor:"transformers.CodeAgent",parameters:[{name:"tools",val:": List"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfApiEngine object at 0x7f3bd2e000d0>"},{name:"system_prompt",val:': str = \'You will be given a task to solve, your job is to come up with a series of simple commands in Python that will perform the task.\\nTo help you, I will give you access to a set of tools that you can use. Each tool is a Python function and has a description explaining the task it performs, the inputs it expects and the outputs it returns.\\nYou should first explain which tool you will use to perform the task and for what reason, then write the code in Python.\\nEach instruction in Python should be a simple assignment. You can print intermediate results if it makes sense to do so.\\nIn the end, use tool \\\'final_answer\\\' to return your answer, its argument will be what gets returned.\\nYou can use imports in your code, but only from the following list of modules: <<authorized_imports>>\\nBe sure to provide a \\\'Code:\\\' token, else the run will fail.\\n\\nTools:\\n<<tool_descriptions>>\\n\\nExamples:\\n---\\nTask: "Answer the question in the variable `question` about the image stored in the variable `image`. The question is in French."\\n\\nThought: I will use the following tools: `translator` to translate the question into English and then `image_qa` to answer the question on the input image.\\nCode:\\n```py\\ntranslated_question = translator(question=question, src_lang="French", tgt_lang="English")\\nprint(f"The translated question is {translated_question}.")\\nanswer = image_qa(image=image, question=translated_question)\\nfinal_answer(f"The answer is {answer}")\\n```<end_action>\\n\\n---\\nTask: "Identify the oldest person in the `document` and create an image showcasing the result."\\n\\nThought: I will use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = document_qa(document, question="What is the oldest person?")\\nprint(f"The answer is {answer}.")\\nimage = image_generator(answer)\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: "Generate an image using the text given in the variable `caption`."\\n\\nThought: I will use the following tool: `image_generator` to generate an image.\\nCode:\\n```py\\nimage = image_generator(prompt=caption)\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: "Summarize the text given in the variable `text` and read it out loud."\\n\\nThought: I will use the following tools: `summarizer` to create a summary of the input text, then `text_reader` to read it out loud.\\nCode:\\n```py\\nsummarized_text = summarizer(text)\\nprint(f"Summary: {summarized_text}")\\naudio_summary = text_reader(summarized_text)\\nfinal_answer(audio_summary)\\n```<end_action>\\n\\n---\\nTask: "Answer the question in the variable `question` about the text in the variable `text`. Use the answer to generate an image."\\n\\nThought: I will use the following tools: `text_qa` to create the answer, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = text_qa(text=text, question=question)\\nprint(f"The answer is {answer}.")\\nimage = image_generator(answer)\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: "Caption the following `image`."\\n\\nThought: I will use the following tool: `image_captioner` to generate a caption for the image.\\nCode:\\n```py\\ncaption = image_captioner(image)\\nfinal_answer(caption)\\n```<end_action>\\n\\n---\\nAbove example were using tools that might not exist for you. You only have acces to those Tools:\\n<<tool_names>>\\n\\nRemember to make sure that variables you use are all defined.\\nBe sure to provide a \\\'Code:\\n```\\\' sequence before the code and \\\'```<end_action>\\\' after, else you will get an error.\\nDO NOT pass the arguments as a dict as in \\\'answer = ask_search_agent({\\\'query\\\': "What is the place where James Bond lives?"})\\\', but use the arguments directly as in \\\'answer = ask_search_agent(query="What is the place where James Bond lives?")\\\'.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n\''},{name:"tool_description_template",val:": str = '\\n- {{ tool.name }}: {{ tool.description }}\\n    Takes inputs: {{tool.inputs}}\\n    Returns an output of type: {{tool.output_type}}\\n'"},{name:"grammar",val:": Dict = None"},{name:"additional_authorized_imports",val:": Optional = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L573"}}),et=new $({props:{name:"parse_code_blob",anchor:"transformers.CodeAgent.parse_code_blob",parameters:[{name:"result",val:": str"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L609"}}),tt=new $({props:{name:"run",anchor:"transformers.CodeAgent.run",parameters:[{name:"task",val:": str"},{name:"return_generated_code",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeAgent.run.task",description:"<strong>task</strong> (<code>str</code>) &#x2014; The task to perform",name:"task"},{anchor:"transformers.CodeAgent.run.return_generated_code",description:"<strong>return_generated_code</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to return the generated code instead of running it",name:"return_generated_code"},{anchor:"transformers.CodeAgent.run.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Any keyword argument to send to the agent when evaluating the code.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L616"}}),de=new br({props:{anchor:"transformers.CodeAgent.run.example",$$slots:{default:[ji]},$$scope:{ctx:q}}}),nt=new M({props:{title:"React agents",local:"transformers.ReactAgent",headingTag:"h3"}}),ot=new $({props:{name:"class transformers.ReactAgent",anchor:"transformers.ReactAgent",parameters:[{name:"tools",val:": List"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfApiEngine object at 0x7f3bd2e015a0>"},{name:"system_prompt",val:": str = 'You are an expert assistant who can solve any task using code blobs. You will be given a task to solve as best you can.\\nTo do so, you have been given access to a list of tools: these tools are basically Python functions which you can call with code.\\nTo solve the task, you must plan forward to proceed in a series of steps, in a cycle of \\'Thought:\\', \\'Code:\\', and \\'Observation:\\' sequences.\\n\\nAt each step, in the \\'Thought:\\' sequence, you should first explain your reasoning towards solving the task and the tools that you want to use.\\nThen in the \\'Code:\\' sequence, you should write the code in simple Python. The code sequence must end with \\'<end_action>\\' sequence.\\nDuring each intermediate step, you can use \\'print()\\' to save whatever important information you will then need.\\nThese print outputs will then appear in the \\'Observation:\\' field, which will be available as input for the next step.\\nIn the end you have to return a final answer using the `final_answer` tool.\\n\\nHere are a few examples using notional tools:\\n---\\nTask: \"Generate an image of the oldest person in this document.\"\\n\\nThought: I will proceed step by step and use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = document_qa(document=document, question=\"Who is the oldest person mentioned?\")\\nprint(answer)\\n```<end_action>\\nObservation: \"The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland.\"\\n\\nThought: I will now generate an image showcasing the oldest person.\\nCode:\\n```py\\nimage = image_generator(\"A portrait of John Doe, a 55-year-old man living in Canada.\")\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: \"What is the result of the following operation: 5 + 3 + 1294.678?\"\\n\\nThought: I will use python code to compute the result of the operation and then return the final answer using the `final_answer` tool\\nCode:\\n```py\\nresult = 5 + 3 + 1294.678\\nfinal_answer(result)\\n```<end_action>\\n\\n---\\nTask: \"Which city has the highest population: Guangzhou or Shanghai?\"\\n\\nThought: I need to get the populations for both cities and compare them: I will use the tool `search` to get the population of both cities.\\nCode:\\n```py\\npopulation_guangzhou = search(\"Guangzhou population\")\\nprint(\"Population Guangzhou:\", population_guangzhou)\\npopulation_shanghai = search(\"Shanghai population\")\\nprint(\"Population Shanghai:\", population_shanghai)\\n```<end_action>\\nObservation:\\nPopulation Guangzhou: [\\'Guangzhou has a population of 15 million inhabitants as of 2021.\\']\\nPopulation Shanghai: \\'26 million (2019)\\'\\n\\nThought: Now I know that Shanghai has the highest population.\\nCode:\\n```py\\nfinal_answer(\"Shanghai\")\\n```<end_action>\\n\\n---\\nTask: \"What is the current age of the pope, raised to the power 0.36?\"\\n\\nThought: I will use the tool `wiki` to get the age of the pope, then raise it to the power 0.36.\\nCode:\\n```py\\npope_age = wiki(query=\"current pope age\")\\nprint(\"Pope age:\", pope_age)\\n```<end_action>\\nObservation:\\nPope age: \"The pope Francis is currently 85 years old.\"\\n\\nThought: I know that the pope is 85 years old. Let\\'s compute the result using python code.\\nCode:\\n```py\\npope_current_age = 85 ** 0.36\\nfinal_answer(pope_current_age)\\n```<end_action>\\n\\nAbove example were using notional tools that might not exist for you. On top of performing computations in the Python code snippets that you create, you have acces to those tools (and no other tool):\\n\\n<<tool_descriptions>>\\n\\n<<managed_agents_descriptions>>\\n\\nHere are the rules you should always follow to solve your task:\\n1. Always provide a \\'Thought:\\' sequence, and a \\'Code:\\n```py\\' sequence ending with \\'```<end_action>\\' sequence, else you will fail.\\n2. Use only variables that you have defined!\\n3. Always use the right arguments for the tools. DO NOT pass the arguments as a dict as in \\'answer = wiki({\\'query\\': \"What is the place where James Bond lives?\"})\\', but use the arguments directly as in \\'answer = wiki(query=\"What is the place where James Bond lives?\")\\'.\\n4. Take care to not chain too many sequential tool calls in the same code block, especially when the output format is unpredictable. For instance, a call to search has an unpredictable return format, so do not have another tool call that depends on its output in the same block: rather output results with print() to use them in the next block.\\n5. Call a tool only when needed, and never re-do a tool call that you previously did with the exact same parameters.\\n6. Don\\'t name any new variable with the same name as a tool: for instance don\\'t name a variable \\'final_answer\\'.\\n7. Never create any notional variables in our code, as having these in your logs might derail you from the true variables.\\n8. You can use imports in your code, but only from the following list of modules: <<authorized_imports>>\\n9. The state persists between code executions: so if in one step you\\'ve created variables or imported modules, these will all persist.\\n10. Don\\'t give up! You\\'re in charge of solving the task, not providing directions to solve it.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n'"},{name:"tool_description_template",val:": str = '\\n- {{ tool.name }}: {{ tool.description }}\\n    Takes inputs: {{tool.inputs}}\\n    Returns an output of type: {{tool.output_type}}\\n'"},{name:"grammar",val:": Dict = None"},{name:"plan_type",val:": Literal = 'default'"},{name:"planning_interval",val:": Optional = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L693"}}),at=new $({props:{name:"direct_run",anchor:"transformers.ReactAgent.direct_run",parameters:[{name:"task",val:": str"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L801"}}),rt=new $({props:{name:"planning_step",anchor:"transformers.ReactAgent.planning_step",parameters:[{name:"task",val:""},{name:"is_first_step",val:": bool = False"},{name:"iteration",val:": int = None"}],parametersDescription:[{anchor:"transformers.ReactAgent.planning_step.task",description:"<strong>task</strong> (<code>str</code>) &#x2014; The task to perform",name:"task"},{anchor:"transformers.ReactAgent.planning_step.is_first_step",description:"<strong>is_first_step</strong> (<code>bool</code>) &#x2014; If this step is not the first one, the plan should be an update over a previous plan.",name:"is_first_step"},{anchor:"transformers.ReactAgent.planning_step.iteration",description:"<strong>iteration</strong> (<code>int</code>) &#x2014; The number of the current step, used as an indication for the LLM.",name:"iteration"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L830"}}),st=new $({props:{name:"provide_final_answer",anchor:"transformers.ReactAgent.provide_final_answer",parameters:[{name:"task",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L723"}}),lt=new $({props:{name:"run",anchor:"transformers.ReactAgent.run",parameters:[{name:"task",val:": str"},{name:"stream",val:": bool = False"},{name:"reset",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ReactAgent.run.task",description:"<strong>task</strong> (<code>str</code>) &#x2014; The task to perform",name:"task"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L745"}}),ge=new br({props:{anchor:"transformers.ReactAgent.run.example",$$slots:{default:[Li]},$$scope:{ctx:q}}}),it=new $({props:{name:"stream_run",anchor:"transformers.ReactAgent.stream_run",parameters:[{name:"task",val:": str"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L772"}}),dt=new $({props:{name:"class transformers.ReactJsonAgent",anchor:"transformers.ReactJsonAgent",parameters:[{name:"tools",val:": List"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfApiEngine object at 0x7f3bd2e1bbb0>"},{name:"system_prompt",val:`: str = 'You are an expert assistant who can solve any task using JSON tool calls. You will be given a task to solve as best you can.\\nTo do so, you have been given access to the following tools: <<tool_names>>\\nThe way you use the tools is by specifying a json blob, ending with \\'<end_action>\\'.\\nSpecifically, this json should have an \`action\` key (name of the tool to use) and an \`action_input\` key (input to the tool).\\n\\nThe $ACTION_JSON_BLOB should only contain a SINGLE action, do NOT return a list of multiple actions. It should be formatted in json. Do not try to escape special characters. Here is the template of a valid $ACTION_JSON_BLOB:\\n{\\n  "action": $TOOL_NAME,\\n  "action_input": $INPUT\\n}<end_action>\\n\\nMake sure to have the $INPUT as a dictionary in the right format for the tool you are using, and do not put variable names as input if you can find the right values.\\n\\nYou should ALWAYS use the following format:\\n\\nThought: you should always think about one action to take. Then use the action as follows:\\nAction:\\n$ACTION_JSON_BLOB\\nObservation: the result of the action\\n... (this Thought/Action/Observation can repeat N times, you should take several steps when needed. The $ACTION_JSON_BLOB must only use a SINGLE action at a time.)\\n\\nYou can use the result of the previous action as input for the next action.\\nThe observation will always be a string: it can represent a file, like "image_1.jpg".\\nThen you can use it as input for the next action. You can do it for instance as follows:\\n\\nObservation: "image_1.jpg"\\n\\nThought: I need to transform the image that I received in the previous observation to make it green.\\nAction:\\n{\\n  "action": "image_transformer",\\n  "action_input": {"image": "image_1.jpg"}\\n}<end_action>\\n\\nTo provide the final answer to the task, use an action blob with "action": "final_answer" tool. It is the only way to complete the task, else you will be stuck on a loop. So your final output should look like this:\\nAction:\\n{\\n  "action": "final_answer",\\n  "action_input": {"answer": "insert your final answer here"}\\n}<end_action>\\n\\n\\nHere are a few examples using notional tools:\\n---\\nTask: "Generate an image of the oldest person in this document."\\n\\nThought: I will proceed step by step and use the following tools: \`document_qa\` to find the oldest person in the document, then \`image_generator\` to generate an image according to the answer.\\nAction:\\n{\\n  "action": "document_qa",\\n  "action_input": {"document": "document.pdf", "question": "Who is the oldest person mentioned?"}\\n}<end_action>\\nObservation: "The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland."\\n\\n\\nThought: I will now generate an image showcasing the oldest person.\\nAction:\\n{\\n  "action": "image_generator",\\n  "action_input": {"prompt": "A portrait of John Doe, a 55-year-old man living in Canada."}\\n}<end_action>\\nObservation: "image.png"\\n\\nThought: I will now return the generated image.\\nAction:\\n{\\n  "action": "final_answer",\\n  "action_input": "image.png"\\n}<end_action>\\n\\n---\\nTask: "What is the result of the following operation: 5 + 3 + 1294.678?"\\n\\nThought: I will use python code evaluator to compute the result of the operation and then return the final answer using the \`final_answer\` tool\\nAction:\\n{\\n    "action": "python_interpreter",\\n    "action_input": {"code": "5 + 3 + 1294.678"}\\n}<end_action>\\nObservation: 1302.678\\n\\nThought: Now that I know the result, I will now return it.\\nAction:\\n{\\n  "action": "final_answer",\\n  "action_input": "1302.678"\\n}<end_action>\\n\\n---\\nTask: "Which city has the highest population , Guangzhou or Shanghai?"\\n\\nThought: I need to get the populations for both cities and compare them: I will use the tool \`search\` to get the population of both cities.\\nAction:\\n{\\n    "action": "search",\\n    "action_input": "Population Guangzhou"\\n}<end_action>\\nObservation: [\\'Guangzhou has a population of 15 million inhabitants as of 2021.\\']\\n\\n\\nThought: Now let\\'s get the population of Shanghai using the tool \\'search\\'.\\nAction:\\n{\\n    "action": "search",\\n    "action_input": "Population Shanghai"\\n}\\nObservation: \\'26 million (2019)\\'\\n\\nThought: Now I know that Shanghai has a larger population. Let\\'s return the result.\\nAction:\\n{\\n  "action": "final_answer",\\n  "action_input": "Shanghai"\\n}<end_action>\\n\\n\\nAbove example were using notional tools that might not exist for you. You only have acces to those tools:\\n<<tool_descriptions>>\\n\\nHere are the rules you should always follow to solve your task:\\n1. ALWAYS provide a \\'Thought:\\' sequence, and an \\'Action:\\' sequence that ends with <end_action>, else you will fail.\\n2. Always use the right arguments for the tools. Never use variable names in the \\'action_input\\' field, use the value instead.\\n3. Call a tool only when needed: do not call the search agent if you do not need information, try to solve the task yourself.\\n4. Never re-do a tool call that you previously did with the exact same parameters.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n'`},{name:"tool_description_template",val:": str = '\\n- {{ tool.name }}: {{ tool.description }}\\n    Takes inputs: {{tool.inputs}}\\n    Returns an output of type: {{tool.output_type}}\\n'"},{name:"grammar",val:": Dict = None"},{name:"planning_interval",val:": Optional = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L930"}}),mt=new $({props:{name:"step",anchor:"transformers.ReactJsonAgent.step",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L957"}}),pt=new $({props:{name:"class transformers.ReactCodeAgent",anchor:"transformers.ReactCodeAgent",parameters:[{name:"tools",val:": List"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfApiEngine object at 0x7f3bd2e1bfd0>"},{name:"system_prompt",val:": str = 'You are an expert assistant who can solve any task using code blobs. You will be given a task to solve as best you can.\\nTo do so, you have been given access to a list of tools: these tools are basically Python functions which you can call with code.\\nTo solve the task, you must plan forward to proceed in a series of steps, in a cycle of \\'Thought:\\', \\'Code:\\', and \\'Observation:\\' sequences.\\n\\nAt each step, in the \\'Thought:\\' sequence, you should first explain your reasoning towards solving the task and the tools that you want to use.\\nThen in the \\'Code:\\' sequence, you should write the code in simple Python. The code sequence must end with \\'<end_action>\\' sequence.\\nDuring each intermediate step, you can use \\'print()\\' to save whatever important information you will then need.\\nThese print outputs will then appear in the \\'Observation:\\' field, which will be available as input for the next step.\\nIn the end you have to return a final answer using the `final_answer` tool.\\n\\nHere are a few examples using notional tools:\\n---\\nTask: \"Generate an image of the oldest person in this document.\"\\n\\nThought: I will proceed step by step and use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = document_qa(document=document, question=\"Who is the oldest person mentioned?\")\\nprint(answer)\\n```<end_action>\\nObservation: \"The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland.\"\\n\\nThought: I will now generate an image showcasing the oldest person.\\nCode:\\n```py\\nimage = image_generator(\"A portrait of John Doe, a 55-year-old man living in Canada.\")\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: \"What is the result of the following operation: 5 + 3 + 1294.678?\"\\n\\nThought: I will use python code to compute the result of the operation and then return the final answer using the `final_answer` tool\\nCode:\\n```py\\nresult = 5 + 3 + 1294.678\\nfinal_answer(result)\\n```<end_action>\\n\\n---\\nTask: \"Which city has the highest population: Guangzhou or Shanghai?\"\\n\\nThought: I need to get the populations for both cities and compare them: I will use the tool `search` to get the population of both cities.\\nCode:\\n```py\\npopulation_guangzhou = search(\"Guangzhou population\")\\nprint(\"Population Guangzhou:\", population_guangzhou)\\npopulation_shanghai = search(\"Shanghai population\")\\nprint(\"Population Shanghai:\", population_shanghai)\\n```<end_action>\\nObservation:\\nPopulation Guangzhou: [\\'Guangzhou has a population of 15 million inhabitants as of 2021.\\']\\nPopulation Shanghai: \\'26 million (2019)\\'\\n\\nThought: Now I know that Shanghai has the highest population.\\nCode:\\n```py\\nfinal_answer(\"Shanghai\")\\n```<end_action>\\n\\n---\\nTask: \"What is the current age of the pope, raised to the power 0.36?\"\\n\\nThought: I will use the tool `wiki` to get the age of the pope, then raise it to the power 0.36.\\nCode:\\n```py\\npope_age = wiki(query=\"current pope age\")\\nprint(\"Pope age:\", pope_age)\\n```<end_action>\\nObservation:\\nPope age: \"The pope Francis is currently 85 years old.\"\\n\\nThought: I know that the pope is 85 years old. Let\\'s compute the result using python code.\\nCode:\\n```py\\npope_current_age = 85 ** 0.36\\nfinal_answer(pope_current_age)\\n```<end_action>\\n\\nAbove example were using notional tools that might not exist for you. On top of performing computations in the Python code snippets that you create, you have acces to those tools (and no other tool):\\n\\n<<tool_descriptions>>\\n\\n<<managed_agents_descriptions>>\\n\\nHere are the rules you should always follow to solve your task:\\n1. Always provide a \\'Thought:\\' sequence, and a \\'Code:\\n```py\\' sequence ending with \\'```<end_action>\\' sequence, else you will fail.\\n2. Use only variables that you have defined!\\n3. Always use the right arguments for the tools. DO NOT pass the arguments as a dict as in \\'answer = wiki({\\'query\\': \"What is the place where James Bond lives?\"})\\', but use the arguments directly as in \\'answer = wiki(query=\"What is the place where James Bond lives?\")\\'.\\n4. Take care to not chain too many sequential tool calls in the same code block, especially when the output format is unpredictable. For instance, a call to search has an unpredictable return format, so do not have another tool call that depends on its output in the same block: rather output results with print() to use them in the next block.\\n5. Call a tool only when needed, and never re-do a tool call that you previously did with the exact same parameters.\\n6. Don\\'t name any new variable with the same name as a tool: for instance don\\'t name a variable \\'final_answer\\'.\\n7. Never create any notional variables in our code, as having these in your logs might derail you from the true variables.\\n8. You can use imports in your code, but only from the following list of modules: <<authorized_imports>>\\n9. The state persists between code executions: so if in one step you\\'ve created variables or imported modules, these will all persist.\\n10. Don\\'t give up! You\\'re in charge of solving the task, not providing directions to solve it.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n'"},{name:"tool_description_template",val:": str = '\\n- {{ tool.name }}: {{ tool.description }}\\n    Takes inputs: {{tool.inputs}}\\n    Returns an output of type: {{tool.output_type}}\\n'"},{name:"grammar",val:": Dict = None"},{name:"additional_authorized_imports",val:": Optional = None"},{name:"planning_interval",val:": Optional = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L1037"}}),ct=new $({props:{name:"step",anchor:"transformers.ReactCodeAgent.step",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L1078"}}),gt=new M({props:{title:"ManagedAgent",local:"transformers.ManagedAgent",headingTag:"h3"}}),ut=new $({props:{name:"class transformers.ManagedAgent",anchor:"transformers.ManagedAgent",parameters:[{name:"agent",val:""},{name:"name",val:""},{name:"description",val:""},{name:"additional_prompting",val:" = None"},{name:"provide_run_summary",val:" = False"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L1164"}}),ft=new M({props:{title:"Tools",local:"tools",headingTag:"h2"}}),vt=new M({props:{title:"load_tool",local:"transformers.load_tool",headingTag:"h3"}}),bt=new $({props:{name:"transformers.load_tool",anchor:"transformers.load_tool",parameters:[{name:"task_or_repo_id",val:""},{name:"model_repo_id",val:" = None"},{name:"token",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.load_tool.task_or_repo_id",description:`<strong>task_or_repo_id</strong> (<code>str</code>) &#x2014;
The task for which to load the tool or a repo ID of a tool on the Hub. Tasks implemented in Transformers
are:</p>
<ul>
<li><code>&quot;document_question_answering&quot;</code></li>
<li><code>&quot;image_question_answering&quot;</code></li>
<li><code>&quot;speech_to_text&quot;</code></li>
<li><code>&quot;text_to_speech&quot;</code></li>
<li><code>&quot;translation&quot;</code></li>
</ul>`,name:"task_or_repo_id"},{anchor:"transformers.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:"transformers.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:"transformers.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/transformers/blob/vr_29969/src/transformers/agents/tools.py#L693"}}),ve=new ll({props:{warning:!0,$$slots:{default:[qi]},$$scope:{ctx:q}}}),_t=new M({props:{title:"tool",local:"transformers.tool",headingTag:"h3"}}),$t=new $({props:{name:"transformers.tool",anchor:"transformers.tool",parameters:[{name:"tool_function",val:": Callable"}],parametersDescription:[{anchor:"transformers.tool.Should",description:"<strong>Should</strong> also have a docstring description including an &#x2018;Args &#x2014;&#x2019; part where each argument is described.",name:"Should"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L849"}}),yt=new M({props:{title:"Tool",local:"transformers.Tool",headingTag:"h3"}}),wt=new $({props:{name:"class transformers.Tool",anchor:"transformers.Tool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L103"}}),Tt=new $({props:{name:"from_gradio",anchor:"transformers.Tool.from_gradio",parameters:[{name:"gradio_tool",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L408"}}),xt=new $({props:{name:"from_hub",anchor:"transformers.Tool.from_hub",parameters:[{name:"repo_id",val:": str"},{name:"model_repo_id",val:": Optional = None"},{name:"token",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Tool.from_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repo on the Hub where your tool is defined.`,name:"repo_id"},{anchor:"transformers.Tool.from_hub.model_repo_id",description:`<strong>model_repo_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If your tool uses a model and you want to use a different model than the default, you can pass a second
repo ID or an endpoint url to this argument.`,name:"model_repo_id"},{anchor:"transformers.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:"transformers.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/transformers/blob/vr_29969/src/transformers/agents/tools.py#L239"}}),_e=new ll({props:{warning:!0,$$slots:{default:[Pi]},$$scope:{ctx:q}}}),kt=new $({props:{name:"from_langchain",anchor:"transformers.Tool.from_langchain",parameters:[{name:"langchain_tool",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L430"}}),Ct=new $({props:{name:"push_to_hub",anchor:"transformers.Tool.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"commit_message",val:": str = 'Upload tool'"},{name:"private",val:": Optional = None"},{name:"token",val:": Union = None"},{name:"create_pr",val:": bool = False"}],parametersDescription:[{anchor:"transformers.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:"transformers.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:"transformers.Tool.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.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:"transformers.Tool.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L351"}}),ye=new br({props:{anchor:"transformers.Tool.push_to_hub.example",$$slots:{default:[Ji]},$$scope:{ctx:q}}}),Mt=new $({props:{name:"save",anchor:"transformers.Tool.save",parameters:[{name:"output_dir",val:""}],parametersDescription:[{anchor:"transformers.Tool.save.output_dir",description:"<strong>output_dir</strong> (<code>str</code>) &#x2014; The folder in which you want to save your tool.",name:"output_dir"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L179"}}),It=new $({props:{name:"setup",anchor:"transformers.Tool.setup",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L172"}}),At=new M({props:{title:"Toolbox",local:"transformers.Toolbox",headingTag:"h3"}}),jt=new $({props:{name:"class transformers.Toolbox",anchor:"transformers.Toolbox",parameters:[{name:"tools",val:": List"},{name:"add_base_tools",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Toolbox.tools",description:`<strong>tools</strong> (<code>List[Tool]</code>) &#x2014;
The list of tools to instantiate the toolbox with`,name:"tools"},{anchor:"transformers.Toolbox.add_base_tools",description:`<strong>add_base_tools</strong> (<code>bool</code>, defaults to <code>False</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to add the tools available within <code>transformers</code> to the toolbox.`,name:"add_base_tools"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L182"}}),Lt=new $({props:{name:"add_tool",anchor:"transformers.Toolbox.add_tool",parameters:[{name:"tool",val:": Tool"}],parametersDescription:[{anchor:"transformers.Toolbox.add_tool.tool",description:`<strong>tool</strong> (<code>Tool</code>) &#x2014;
The tool to add to the toolbox.`,name:"tool"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L228"}}),qt=new $({props:{name:"clear_toolbox",anchor:"transformers.Toolbox.clear_toolbox",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L268"}}),Pt=new $({props:{name:"remove_tool",anchor:"transformers.Toolbox.remove_tool",parameters:[{name:"tool_name",val:": str"}],parametersDescription:[{anchor:"transformers.Toolbox.remove_tool.tool_name",description:`<strong>tool_name</strong> (<code>str</code>) &#x2014;
The tool to remove from the toolbox.`,name:"tool_name"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L240"}}),Jt=new $({props:{name:"show_tool_descriptions",anchor:"transformers.Toolbox.show_tool_descriptions",parameters:[{name:"tool_description_template",val:": str = None"}],parametersDescription:[{anchor:"transformers.Toolbox.show_tool_descriptions.tool_description_template",description:`<strong>tool_description_template</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The template to use to describe the tools. If not provided, the default template will be used.`,name:"tool_description_template"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L216"}}),Et=new $({props:{name:"update_tool",anchor:"transformers.Toolbox.update_tool",parameters:[{name:"tool",val:": Tool"}],parametersDescription:[{anchor:"transformers.Toolbox.update_tool.tool",description:`<strong>tool</strong> (<code>Tool</code>) &#x2014;
The tool to update to the toolbox.`,name:"tool"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agents.py#L254"}}),Ut=new M({props:{title:"PipelineTool",local:"transformers.PipelineTool",headingTag:"h3"}}),Dt=new $({props:{name:"class transformers.PipelineTool",anchor:"transformers.PipelineTool",parameters:[{name:"model",val:" = None"},{name:"pre_processor",val:" = None"},{name:"post_processor",val:" = None"},{name:"device",val:" = None"},{name:"device_map",val:" = None"},{name:"model_kwargs",val:" = None"},{name:"token",val:" = None"},{name:"**hub_kwargs",val:""}],parametersDescription:[{anchor:"transformers.PipelineTool.model",description:`<strong>model</strong> (<code>str</code> or <a href="/docs/transformers/pr_29969/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>, <em>optional</em>) &#x2014;
The name of the checkpoint to use for the model, or the instantiated model. If unset, will default to the
value of the class attribute <code>default_checkpoint</code>.`,name:"model"},{anchor:"transformers.PipelineTool.pre_processor",description:`<strong>pre_processor</strong> (<code>str</code> or <code>Any</code>, <em>optional</em>) &#x2014;
The name of the checkpoint to use for the pre-processor, or the instantiated pre-processor (can be a
tokenizer, an image processor, a feature extractor or a processor). Will default to the value of <code>model</code> if
unset.`,name:"pre_processor"},{anchor:"transformers.PipelineTool.post_processor",description:`<strong>post_processor</strong> (<code>str</code> or <code>Any</code>, <em>optional</em>) &#x2014;
The name of the checkpoint to use for the post-processor, or the instantiated pre-processor (can be a
tokenizer, an image processor, a feature extractor or a processor). Will default to the <code>pre_processor</code> if
unset.`,name:"post_processor"},{anchor:"transformers.PipelineTool.device",description:`<strong>device</strong> (<code>int</code>, <code>str</code> or <code>torch.device</code>, <em>optional</em>) &#x2014;
The device on which to execute the model. Will default to any accelerator available (GPU, MPS etc&#x2026;), the
CPU otherwise.`,name:"device"},{anchor:"transformers.PipelineTool.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>dict</code>, <em>optional</em>) &#x2014;
If passed along, will be used to instantiate the model.`,name:"device_map"},{anchor:"transformers.PipelineTool.model_kwargs",description:`<strong>model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Any keyword argument to send to the model instantiation.`,name:"model_kwargs"},{anchor:"transformers.PipelineTool.token",description:`<strong>token</strong> (<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:"transformers.PipelineTool.hub_kwargs",description:`<strong>hub_kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Any additional keyword argument to send to the methods that will load the data from the Hub.`,name:"hub_kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L491"}}),Nt=new $({props:{name:"decode",anchor:"transformers.PipelineTool.decode",parameters:[{name:"outputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L614"}}),Ht=new $({props:{name:"encode",anchor:"transformers.PipelineTool.encode",parameters:[{name:"raw_inputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L601"}}),Wt=new $({props:{name:"forward",anchor:"transformers.PipelineTool.forward",parameters:[{name:"inputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L607"}}),Rt=new $({props:{name:"setup",anchor:"transformers.PipelineTool.setup",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L575"}}),Vt=new M({props:{title:"launch_gradio_demo",local:"transformers.launch_gradio_demo",headingTag:"h3"}}),zt=new $({props:{name:"transformers.launch_gradio_demo",anchor:"transformers.launch_gradio_demo",parameters:[{name:"tool_class",val:": Tool"}],parametersDescription:[{anchor:"transformers.launch_gradio_demo.tool_class",description:"<strong>tool_class</strong> (<code>type</code>) &#x2014; The class of the tool for which to launch the demo.",name:"tool_class"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L639"}}),Bt=new M({props:{title:"stream_to_gradio",local:"transformers.stream_to_gradio",headingTag:"h3"}}),St=new $({props:{name:"transformers.stream_to_gradio",anchor:"transformers.stream_to_gradio",parameters:[{name:"agent",val:": ReactAgent"},{name:"task",val:": str"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/monitoring.py#L49"}}),Zt=new M({props:{title:"ToolCollection",local:"transformers.ToolCollection",headingTag:"h3"}}),Gt=new $({props:{name:"class transformers.ToolCollection",anchor:"transformers.ToolCollection",parameters:[{name:"collection_slug",val:": str"},{name:"token",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ToolCollection.collection_slug",description:`<strong>collection_slug</strong> (str) &#x2014;
The collection slug referencing the collection.`,name:"collection_slug"},{anchor:"transformers.ToolCollection.token",description:`<strong>token</strong> (str, <em>optional</em>) &#x2014;
The authentication token if the collection is private.`,name:"token"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/tools.py#L817"}}),qe=new br({props:{anchor:"transformers.ToolCollection.example",$$slots:{default:[Ei]},$$scope:{ctx:q}}}),Ot=new M({props:{title:"Engines",local:"engines",headingTag:"h2"}}),Qt=new M({props:{title:"TransformersEngine",local:"transformers.TransformersEngine",headingTag:"h3"}}),Kt=new Ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUyQyUyMHBpcGVsaW5lJTJDJTIwVHJhbnNmb3JtZXJzRW5naW5lJTBBJTBBbW9kZWxfbmFtZSUyMCUzRCUyMCUyMkh1Z2dpbmdGYWNlVEIlMkZTbW9sTE0tMTM1TS1JbnN0cnVjdCUyMiUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX25hbWUpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfbmFtZSklMEElMEFwaXBlJTIwJTNEJTIwcGlwZWxpbmUoJTIydGV4dC1nZW5lcmF0aW9uJTIyJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMHRva2VuaXplciUzRHRva2VuaXplciklMEElMEFlbmdpbmUlMjAlM0QlMjBUcmFuc2Zvcm1lcnNFbmdpbmUocGlwZSklMEFlbmdpbmUoJTVCJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyT2shJTIyJTdEJTVEJTJDJTIwc3RvcF9zZXF1ZW5jZXMlM0QlNUIlMjJncmVhdCUyMiU1RCklMEE=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, pipeline, TransformersEngine

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;HuggingFaceTB/SmolLM-135M-Instruct&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(model_name)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipeline(<span class="hljs-string">&quot;text-generation&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>engine = TransformersEngine(pipe)
<span class="hljs-meta">&gt;&gt;&gt; </span>engine([{<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Ok!&quot;</span>}], stop_sequences=[<span class="hljs-string">&quot;great&quot;</span>])

<span class="hljs-string">&quot;What a &quot;</span>`,wrap:!1}}),en=new $({props:{name:"class transformers.TransformersEngine",anchor:"transformers.TransformersEngine",parameters:[{name:"pipeline",val:": Pipeline"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/llm_engine.py#L100"}}),tn=new M({props:{title:"HfApiEngine",local:"transformers.HfApiEngine",headingTag:"h3"}}),on=new Ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEhmQXBpRW5naW5lJTBBJTBBbWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJIZWxsbyUyQyUyMGhvdyUyMGFyZSUyMHlvdSUzRiUyMiU3RCUyQyUwQSUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJhc3Npc3RhbnQlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIySSdtJTIwZG9pbmclMjBncmVhdC4lMjBIb3clMjBjYW4lMjBJJTIwaGVscCUyMHlvdSUyMHRvZGF5JTNGJTIyJTdEJTJDJTBBJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyTm8lMjBuZWVkJTIwdG8lMjBoZWxwJTJDJTIwdGFrZSUyMGl0JTIwZWFzeS4lMjIlN0QlMkMlMEElNUQlMEElMEFIZkFwaUVuZ2luZSgpKG1lc3NhZ2VzJTJDJTIwc3RvcF9zZXF1ZW5jZXMlM0QlNUIlMjJjb252ZXJzYXRpb24lMjIlNUQpJTBB",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> HfApiEngine

<span class="hljs-meta">&gt;&gt;&gt; </span>messages = [
<span class="hljs-meta">... </span>  {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Hello, how are you?&quot;</span>},
<span class="hljs-meta">... </span>  {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;I&#x27;m doing great. How can I help you today?&quot;</span>},
<span class="hljs-meta">... </span>  {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;No need to help, take it easy.&quot;</span>},
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>HfApiEngine()(messages, stop_sequences=[<span class="hljs-string">&quot;conversation&quot;</span>])

<span class="hljs-string">&quot;That&#x27;s very kind of you to say! It&#x27;s always nice to have a relaxed &quot;</span>`,wrap:!1}}),an=new $({props:{name:"class transformers.HfApiEngine",anchor:"transformers.HfApiEngine",parameters:[{name:"model",val:": str = 'meta-llama/Meta-Llama-3.1-8B-Instruct'"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/llm_engine.py#L70"}}),rn=new M({props:{title:"Agent Types",local:"agent-types",headingTag:"h2"}}),pn=new M({props:{title:"AgentText",local:"transformers.agents.agent_types.AgentText",headingTag:"h3"}}),cn=new $({props:{name:"class transformers.agents.agent_types.AgentText",anchor:"transformers.agents.agent_types.AgentText",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agent_types.py#L73"}}),gn=new M({props:{title:"AgentImage",local:"transformers.agents.agent_types.AgentImage",headingTag:"h3"}}),hn=new $({props:{name:"class transformers.agents.agent_types.AgentImage",anchor:"transformers.agents.agent_types.AgentImage",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agent_types.py#L85"}}),un=new $({props:{name:"save",anchor:"transformers.agents.agent_types.AgentImage.save",parameters:[{name:"output_bytes",val:""},{name:"format",val:""},{name:"**params",val:""}],parametersDescription:[{anchor:"transformers.agents.agent_types.AgentImage.save.output_bytes",description:"<strong>output_bytes</strong> (bytes) &#x2014; The output bytes to save the image to.",name:"output_bytes"},{anchor:"transformers.agents.agent_types.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.
**params &#x2014; Additional parameters to pass to PIL.Image.save.`,name:"format"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agent_types.py#L162"}}),fn=new $({props:{name:"to_raw",anchor:"transformers.agents.agent_types.AgentImage.to_raw",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agent_types.py#L120"}}),vn=new $({props:{name:"to_string",anchor:"transformers.agents.agent_types.AgentImage.to_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agent_types.py#L135"}}),bn=new M({props:{title:"AgentAudio",local:"transformers.agents.agent_types.AgentAudio",headingTag:"h3"}}),_n=new $({props:{name:"class transformers.agents.agent_types.AgentAudio",anchor:"transformers.agents.agent_types.AgentAudio",parameters:[{name:"value",val:""},{name:"samplerate",val:" = 16000"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agent_types.py#L174"}}),$n=new $({props:{name:"to_raw",anchor:"transformers.agents.agent_types.AgentAudio.to_raw",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agent_types.py#L210"}}),yn=new $({props:{name:"to_string",anchor:"transformers.agents.agent_types.AgentAudio.to_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/agents/agent_types.py#L222"}}),wn=new Ii({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/main_classes/agent.md"}}),{c(){f=s("meta"),x=n(),y=s("p"),w=n(),d(T.$$.fragment),v=n(),d(C.$$.fragment),Ro=n(),Ve=s("p"),Ve.innerHTML=il,Vo=n(),d(ze.$$.fragment),zo=n(),Be=s("p"),Be.innerHTML=dl,Bo=n(),Se=s("ul"),Se.innerHTML=ml,So=n(),d(Ze.$$.fragment),Zo=n(),P=s("div"),d(Ge.$$.fragment),_r=n(),ae=s("div"),d(Oe.$$.fragment),$r=n(),An=s("p"),An.textContent=pl,yr=n(),re=s("div"),d(Fe.$$.fragment),wr=n(),jn=s("p"),jn.textContent=cl,Tr=n(),se=s("div"),d(Ye.$$.fragment),xr=n(),Ln=s("p"),Ln.textContent=gl,kr=n(),le=s("div"),d(Qe.$$.fragment),Cr=n(),qn=s("p"),qn.textContent=hl,Go=n(),d(Xe.$$.fragment),Oo=n(),N=s("div"),d(Ke.$$.fragment),Mr=n(),Pn=s("p"),Pn.textContent=ul,Ir=n(),ie=s("div"),d(et.$$.fragment),Ar=n(),Jn=s("p"),Jn.innerHTML=fl,jr=n(),O=s("div"),d(tt.$$.fragment),Lr=n(),En=s("p"),En.textContent=vl,qr=n(),d(de.$$.fragment),Fo=n(),d(nt.$$.fragment),Yo=n(),A=s("div"),d(ot.$$.fragment),Pr=n(),Un=s("p"),Un.textContent=bl,Jr=n(),me=s("div"),d(at.$$.fragment),Er=n(),Dn=s("p"),Dn.innerHTML=_l,Ur=n(),pe=s("div"),d(rt.$$.fragment),Dr=n(),Nn=s("p"),Nn.textContent=$l,Nr=n(),ce=s("div"),d(st.$$.fragment),Hr=n(),Hn=s("p"),Hn.textContent=yl,Wr=n(),F=s("div"),d(lt.$$.fragment),Rr=n(),Wn=s("p"),Wn.textContent=wl,Vr=n(),d(ge.$$.fragment),zr=n(),he=s("div"),d(it.$$.fragment),Br=n(),Rn=s("p"),Rn.innerHTML=Tl,Qo=n(),B=s("div"),d(dt.$$.fragment),Sr=n(),Vn=s("p"),Vn.textContent=xl,Zr=n(),ue=s("div"),d(mt.$$.fragment),Gr=n(),zn=s("p"),zn.textContent=kl,Xo=n(),S=s("div"),d(pt.$$.fragment),Or=n(),Bn=s("p"),Bn.textContent=Cl,Fr=n(),fe=s("div"),d(ct.$$.fragment),Yr=n(),Sn=s("p"),Sn.textContent=Ml,Ko=n(),d(gt.$$.fragment),ea=n(),ht=s("div"),d(ut.$$.fragment),ta=n(),d(ft.$$.fragment),na=n(),d(vt.$$.fragment),oa=n(),Z=s("div"),d(bt.$$.fragment),Qr=n(),Zn=s("p"),Zn.textContent=Il,Xr=n(),d(ve.$$.fragment),aa=n(),d(_t.$$.fragment),ra=n(),X=s("div"),d($t.$$.fragment),Kr=n(),Gn=s("p"),Gn.textContent=Al,sa=n(),d(yt.$$.fragment),la=n(),k=s("div"),d(wt.$$.fragment),es=n(),On=s("p"),On.innerHTML=jl,ts=n(),Fn=s("ul"),Fn.innerHTML=Ll,ns=n(),Yn=s("p"),Yn.innerHTML=ql,os=n(),be=s("div"),d(Tt.$$.fragment),as=n(),Qn=s("p"),Qn.innerHTML=Pl,rs=n(),Y=s("div"),d(xt.$$.fragment),ss=n(),Xn=s("p"),Xn.textContent=Jl,ls=n(),d(_e.$$.fragment),is=n(),$e=s("div"),d(kt.$$.fragment),ds=n(),Kn=s("p"),Kn.innerHTML=El,ms=n(),V=s("div"),d(Ct.$$.fragment),ps=n(),eo=s("p"),eo.textContent=Ul,cs=n(),to=s("p"),to.innerHTML=Dl,gs=n(),d(ye.$$.fragment),hs=n(),z=s("div"),d(Mt.$$.fragment),us=n(),no=s("p"),no.innerHTML=Nl,fs=n(),oo=s("ul"),oo.innerHTML=Hl,vs=n(),ao=s("p"),ao.innerHTML=Wl,bs=n(),we=s("div"),d(It.$$.fragment),_s=n(),ro=s("p"),ro.textContent=Rl,ia=n(),d(At.$$.fragment),da=n(),j=s("div"),d(jt.$$.fragment),$s=n(),so=s("p"),so.textContent=Vl,ys=n(),Te=s("div"),d(Lt.$$.fragment),ws=n(),lo=s("p"),lo.textContent=zl,Ts=n(),xe=s("div"),d(qt.$$.fragment),xs=n(),io=s("p"),io.textContent=Bl,ks=n(),ke=s("div"),d(Pt.$$.fragment),Cs=n(),mo=s("p"),mo.textContent=Sl,Ms=n(),Ce=s("div"),d(Jt.$$.fragment),Is=n(),po=s("p"),po.textContent=Zl,As=n(),Me=s("div"),d(Et.$$.fragment),js=n(),co=s("p"),co.textContent=Gl,ma=n(),d(Ut.$$.fragment),pa=n(),L=s("div"),d(Dt.$$.fragment),Ls=n(),go=s("p"),go.innerHTML=Ol,qs=n(),ho=s("ul"),ho.innerHTML=Fl,Ps=n(),Ie=s("div"),d(Nt.$$.fragment),Js=n(),uo=s("p"),uo.innerHTML=Yl,Es=n(),Ae=s("div"),d(Ht.$$.fragment),Us=n(),fo=s("p"),fo.innerHTML=Ql,Ds=n(),je=s("div"),d(Wt.$$.fragment),Ns=n(),vo=s("p"),vo.innerHTML=Xl,Hs=n(),Le=s("div"),d(Rt.$$.fragment),Ws=n(),bo=s("p"),bo.innerHTML=Kl,ca=n(),d(Vt.$$.fragment),ga=n(),K=s("div"),d(zt.$$.fragment),Rs=n(),_o=s("p"),_o.innerHTML=ei,ha=n(),d(Bt.$$.fragment),ua=n(),ee=s("div"),d(St.$$.fragment),Vs=n(),$o=s("p"),$o.textContent=ti,fa=n(),d(Zt.$$.fragment),va=n(),H=s("div"),d(Gt.$$.fragment),zs=n(),yo=s("p"),yo.textContent=ni,Bs=n(),wo=s("blockquote"),wo.innerHTML=oi,Ss=n(),d(qe.$$.fragment),ba=n(),d(Ot.$$.fragment),_a=n(),Ft=s("p"),Ft.textContent=ai,$a=n(),Yt=s("ol"),Yt.innerHTML=ri,ya=n(),d(Qt.$$.fragment),wa=n(),Xt=s("p"),Xt.innerHTML=si,Ta=n(),d(Kt.$$.fragment),xa=n(),te=s("div"),d(en.$$.fragment),Zs=n(),To=s("p"),To.textContent=li,ka=n(),d(tn.$$.fragment),Ca=n(),nn=s("p"),nn.innerHTML=ii,Ma=n(),d(on.$$.fragment),Ia=n(),ne=s("div"),d(an.$$.fragment),Gs=n(),xo=s("p"),xo.textContent=di,Aa=n(),d(rn.$$.fragment),ja=n(),sn=s("p"),sn.textContent=mi,La=n(),ln=s("p"),ln.innerHTML=pi,qa=n(),dn=s("p"),dn.textContent=ci,Pa=n(),mn=s("ul"),mn.innerHTML=gi,Ja=n(),d(pn.$$.fragment),Ea=n(),oe=s("div"),d(cn.$$.fragment),Os=n(),ko=s("p"),ko.textContent=hi,Ua=n(),d(gn.$$.fragment),Da=n(),J=s("div"),d(hn.$$.fragment),Fs=n(),Co=s("p"),Co.textContent=ui,Ys=n(),Pe=s("div"),d(un.$$.fragment),Qs=n(),Mo=s("p"),Mo.textContent=fi,Xs=n(),Je=s("div"),d(fn.$$.fragment),Ks=n(),Io=s("p"),Io.textContent=vi,el=n(),Ee=s("div"),d(vn.$$.fragment),tl=n(),Ao=s("p"),Ao.textContent=bi,Na=n(),d(bn.$$.fragment),Ha=n(),W=s("div"),d(_n.$$.fragment),nl=n(),jo=s("p"),jo.textContent=_i,ol=n(),Ue=s("div"),d($n.$$.fragment),al=n(),Lo=s("p"),Lo.innerHTML=$i,rl=n(),De=s("div"),d(yn.$$.fragment),sl=n(),qo=s("p"),qo.textContent=yi,Wa=n(),d(wn.$$.fragment),Ra=n(),Wo=s("p"),this.h()},l(e){const r=Mi("svelte-u9bgzb",document.head);f=l(r,"META",{name:!0,content:!0}),r.forEach(a),x=o(e),y=l(e,"P",{}),b(y).forEach(a),w=o(e),m(T.$$.fragment,e),v=o(e),m(C.$$.fragment,e),Ro=o(e),Ve=l(e,"P",{"data-svelte-h":!0}),u(Ve)!=="svelte-7mj07q"&&(Ve.innerHTML=il),Vo=o(e),m(ze.$$.fragment,e),zo=o(e),Be=l(e,"P",{"data-svelte-h":!0}),u(Be)!=="svelte-pbtakw"&&(Be.innerHTML=dl),Bo=o(e),Se=l(e,"UL",{"data-svelte-h":!0}),u(Se)!=="svelte-1ineygk"&&(Se.innerHTML=ml),So=o(e),m(Ze.$$.fragment,e),Zo=o(e),P=l(e,"DIV",{class:!0});var R=b(P);m(Ge.$$.fragment,R),_r=o(R),ae=l(R,"DIV",{class:!0});var Tn=b(ae);m(Oe.$$.fragment,Tn),$r=o(Tn),An=l(Tn,"P",{"data-svelte-h":!0}),u(An)!=="svelte-a91m64"&&(An.textContent=pl),Tn.forEach(a),yr=o(R),re=l(R,"DIV",{class:!0});var xn=b(re);m(Fe.$$.fragment,xn),wr=o(xn),jn=l(xn,"P",{"data-svelte-h":!0}),u(jn)!=="svelte-104knry"&&(jn.textContent=cl),xn.forEach(a),Tr=o(R),se=l(R,"DIV",{class:!0});var kn=b(se);m(Ye.$$.fragment,kn),xr=o(kn),Ln=l(kn,"P",{"data-svelte-h":!0}),u(Ln)!=="svelte-wvvftk"&&(Ln.textContent=gl),kn.forEach(a),kr=o(R),le=l(R,"DIV",{class:!0});var Cn=b(le);m(Qe.$$.fragment,Cn),Cr=o(Cn),qn=l(Cn,"P",{"data-svelte-h":!0}),u(qn)!=="svelte-1cw6633"&&(qn.textContent=hl),Cn.forEach(a),R.forEach(a),Go=o(e),m(Xe.$$.fragment,e),Oo=o(e),N=l(e,"DIV",{class:!0});var G=b(N);m(Ke.$$.fragment,G),Mr=o(G),Pn=l(G,"P",{"data-svelte-h":!0}),u(Pn)!=="svelte-rq8zg0"&&(Pn.textContent=ul),Ir=o(G),ie=l(G,"DIV",{class:!0});var Mn=b(ie);m(et.$$.fragment,Mn),Ar=o(Mn),Jn=l(Mn,"P",{"data-svelte-h":!0}),u(Jn)!=="svelte-tvi94l"&&(Jn.innerHTML=fl),Mn.forEach(a),jr=o(G),O=l(G,"DIV",{class:!0});var Po=b(O);m(tt.$$.fragment,Po),Lr=o(Po),En=l(Po,"P",{"data-svelte-h":!0}),u(En)!=="svelte-tbr5ck"&&(En.textContent=vl),qr=o(Po),m(de.$$.fragment,Po),Po.forEach(a),G.forEach(a),Fo=o(e),m(nt.$$.fragment,e),Yo=o(e),A=l(e,"DIV",{class:!0});var E=b(A);m(ot.$$.fragment,E),Pr=o(E),Un=l(E,"P",{"data-svelte-h":!0}),u(Un)!=="svelte-c95fji"&&(Un.textContent=bl),Jr=o(E),me=l(E,"DIV",{class:!0});var za=b(me);m(at.$$.fragment,za),Er=o(za),Dn=l(za,"P",{"data-svelte-h":!0}),u(Dn)!=="svelte-17ywxxr"&&(Dn.innerHTML=_l),za.forEach(a),Ur=o(E),pe=l(E,"DIV",{class:!0});var Ba=b(pe);m(rt.$$.fragment,Ba),Dr=o(Ba),Nn=l(Ba,"P",{"data-svelte-h":!0}),u(Nn)!=="svelte-e54ku6"&&(Nn.textContent=$l),Ba.forEach(a),Nr=o(E),ce=l(E,"DIV",{class:!0});var Sa=b(ce);m(st.$$.fragment,Sa),Hr=o(Sa),Hn=l(Sa,"P",{"data-svelte-h":!0}),u(Hn)!=="svelte-1ii4mb"&&(Hn.textContent=yl),Sa.forEach(a),Wr=o(E),F=l(E,"DIV",{class:!0});var Jo=b(F);m(lt.$$.fragment,Jo),Rr=o(Jo),Wn=l(Jo,"P",{"data-svelte-h":!0}),u(Wn)!=="svelte-tbr5ck"&&(Wn.textContent=wl),Vr=o(Jo),m(ge.$$.fragment,Jo),Jo.forEach(a),zr=o(E),he=l(E,"DIV",{class:!0});var Za=b(he);m(it.$$.fragment,Za),Br=o(Za),Rn=l(Za,"P",{"data-svelte-h":!0}),u(Rn)!=="svelte-nf9see"&&(Rn.innerHTML=Tl),Za.forEach(a),E.forEach(a),Qo=o(e),B=l(e,"DIV",{class:!0});var Eo=b(B);m(dt.$$.fragment,Eo),Sr=o(Eo),Vn=l(Eo,"P",{"data-svelte-h":!0}),u(Vn)!=="svelte-1ip7q5f"&&(Vn.textContent=xl),Zr=o(Eo),ue=l(Eo,"DIV",{class:!0});var Ga=b(ue);m(mt.$$.fragment,Ga),Gr=o(Ga),zn=l(Ga,"P",{"data-svelte-h":!0}),u(zn)!=="svelte-1bbx2c8"&&(zn.textContent=kl),Ga.forEach(a),Eo.forEach(a),Xo=o(e),S=l(e,"DIV",{class:!0});var Uo=b(S);m(pt.$$.fragment,Uo),Or=o(Uo),Bn=l(Uo,"P",{"data-svelte-h":!0}),u(Bn)!=="svelte-1egm30q"&&(Bn.textContent=Cl),Fr=o(Uo),fe=l(Uo,"DIV",{class:!0});var Oa=b(fe);m(ct.$$.fragment,Oa),Yr=o(Oa),Sn=l(Oa,"P",{"data-svelte-h":!0}),u(Sn)!=="svelte-1bbx2c8"&&(Sn.textContent=Ml),Oa.forEach(a),Uo.forEach(a),Ko=o(e),m(gt.$$.fragment,e),ea=o(e),ht=l(e,"DIV",{class:!0});var wi=b(ht);m(ut.$$.fragment,wi),wi.forEach(a),ta=o(e),m(ft.$$.fragment,e),na=o(e),m(vt.$$.fragment,e),oa=o(e),Z=l(e,"DIV",{class:!0});var Do=b(Z);m(bt.$$.fragment,Do),Qr=o(Do),Zn=l(Do,"P",{"data-svelte-h":!0}),u(Zn)!=="svelte-16uh3p8"&&(Zn.textContent=Il),Xr=o(Do),m(ve.$$.fragment,Do),Do.forEach(a),aa=o(e),m(_t.$$.fragment,e),ra=o(e),X=l(e,"DIV",{class:!0});var Fa=b(X);m($t.$$.fragment,Fa),Kr=o(Fa),Gn=l(Fa,"P",{"data-svelte-h":!0}),u(Gn)!=="svelte-1792ccx"&&(Gn.textContent=Al),Fa.forEach(a),sa=o(e),m(yt.$$.fragment,e),la=o(e),k=l(e,"DIV",{class:!0});var I=b(k);m(wt.$$.fragment,I),es=o(I),On=l(I,"P",{"data-svelte-h":!0}),u(On)!=="svelte-cca4c5"&&(On.innerHTML=jl),ts=o(I),Fn=l(I,"UL",{"data-svelte-h":!0}),u(Fn)!=="svelte-1cvtzkm"&&(Fn.innerHTML=Ll),ns=o(I),Yn=l(I,"P",{"data-svelte-h":!0}),u(Yn)!=="svelte-1ho19ou"&&(Yn.innerHTML=ql),os=o(I),be=l(I,"DIV",{class:!0});var Ya=b(be);m(Tt.$$.fragment,Ya),as=o(Ya),Qn=l(Ya,"P",{"data-svelte-h":!0}),u(Qn)!=="svelte-1azv7zg"&&(Qn.innerHTML=Pl),Ya.forEach(a),rs=o(I),Y=l(I,"DIV",{class:!0});var No=b(Y);m(xt.$$.fragment,No),ss=o(No),Xn=l(No,"P",{"data-svelte-h":!0}),u(Xn)!=="svelte-yy7b2c"&&(Xn.textContent=Jl),ls=o(No),m(_e.$$.fragment,No),No.forEach(a),is=o(I),$e=l(I,"DIV",{class:!0});var Qa=b($e);m(kt.$$.fragment,Qa),ds=o(Qa),Kn=l(Qa,"P",{"data-svelte-h":!0}),u(Kn)!=="svelte-mcv6pz"&&(Kn.innerHTML=El),Qa.forEach(a),ms=o(I),V=l(I,"DIV",{class:!0});var Ne=b(V);m(Ct.$$.fragment,Ne),ps=o(Ne),eo=l(Ne,"P",{"data-svelte-h":!0}),u(eo)!=="svelte-1u3gku9"&&(eo.textContent=Ul),cs=o(Ne),to=l(Ne,"P",{"data-svelte-h":!0}),u(to)!=="svelte-1yeagwn"&&(to.innerHTML=Dl),gs=o(Ne),m(ye.$$.fragment,Ne),Ne.forEach(a),hs=o(I),z=l(I,"DIV",{class:!0});var He=b(z);m(Mt.$$.fragment,He),us=o(He),no=l(He,"P",{"data-svelte-h":!0}),u(no)!=="svelte-19evuwa"&&(no.innerHTML=Nl),fs=o(He),oo=l(He,"UL",{"data-svelte-h":!0}),u(oo)!=="svelte-15of9ze"&&(oo.innerHTML=Hl),vs=o(He),ao=l(He,"P",{"data-svelte-h":!0}),u(ao)!=="svelte-msa4ge"&&(ao.innerHTML=Wl),He.forEach(a),bs=o(I),we=l(I,"DIV",{class:!0});var Xa=b(we);m(It.$$.fragment,Xa),_s=o(Xa),ro=l(Xa,"P",{"data-svelte-h":!0}),u(ro)!=="svelte-63kthh"&&(ro.textContent=Rl),Xa.forEach(a),I.forEach(a),ia=o(e),m(At.$$.fragment,e),da=o(e),j=l(e,"DIV",{class:!0});var U=b(j);m(jt.$$.fragment,U),$s=o(U),so=l(U,"P",{"data-svelte-h":!0}),u(so)!=="svelte-1jgzyq0"&&(so.textContent=Vl),ys=o(U),Te=l(U,"DIV",{class:!0});var Ka=b(Te);m(Lt.$$.fragment,Ka),ws=o(Ka),lo=l(Ka,"P",{"data-svelte-h":!0}),u(lo)!=="svelte-g8q0nk"&&(lo.textContent=zl),Ka.forEach(a),Ts=o(U),xe=l(U,"DIV",{class:!0});var er=b(xe);m(qt.$$.fragment,er),xs=o(er),io=l(er,"P",{"data-svelte-h":!0}),u(io)!=="svelte-1l2znf2"&&(io.textContent=Bl),er.forEach(a),ks=o(U),ke=l(U,"DIV",{class:!0});var tr=b(ke);m(Pt.$$.fragment,tr),Cs=o(tr),mo=l(tr,"P",{"data-svelte-h":!0}),u(mo)!=="svelte-165lhg0"&&(mo.textContent=Sl),tr.forEach(a),Ms=o(U),Ce=l(U,"DIV",{class:!0});var nr=b(Ce);m(Jt.$$.fragment,nr),Is=o(nr),po=l(nr,"P",{"data-svelte-h":!0}),u(po)!=="svelte-15vkk0u"&&(po.textContent=Zl),nr.forEach(a),As=o(U),Me=l(U,"DIV",{class:!0});var or=b(Me);m(Et.$$.fragment,or),js=o(or),co=l(or,"P",{"data-svelte-h":!0}),u(co)!=="svelte-1p64qrs"&&(co.textContent=Gl),or.forEach(a),U.forEach(a),ma=o(e),m(Ut.$$.fragment,e),pa=o(e),L=l(e,"DIV",{class:!0});var D=b(L);m(Dt.$$.fragment,D),Ls=o(D),go=l(D,"P",{"data-svelte-h":!0}),u(go)!=="svelte-1g9ha0p"&&(go.innerHTML=Ol),qs=o(D),ho=l(D,"UL",{"data-svelte-h":!0}),u(ho)!=="svelte-1uxpsj0"&&(ho.innerHTML=Fl),Ps=o(D),Ie=l(D,"DIV",{class:!0});var ar=b(Ie);m(Nt.$$.fragment,ar),Js=o(ar),uo=l(ar,"P",{"data-svelte-h":!0}),u(uo)!=="svelte-zkjq4t"&&(uo.innerHTML=Yl),ar.forEach(a),Es=o(D),Ae=l(D,"DIV",{class:!0});var rr=b(Ae);m(Ht.$$.fragment,rr),Us=o(rr),fo=l(rr,"P",{"data-svelte-h":!0}),u(fo)!=="svelte-1vxzk80"&&(fo.innerHTML=Ql),rr.forEach(a),Ds=o(D),je=l(D,"DIV",{class:!0});var sr=b(je);m(Wt.$$.fragment,sr),Ns=o(sr),vo=l(sr,"P",{"data-svelte-h":!0}),u(vo)!=="svelte-1qgsi13"&&(vo.innerHTML=Xl),sr.forEach(a),Hs=o(D),Le=l(D,"DIV",{class:!0});var lr=b(Le);m(Rt.$$.fragment,lr),Ws=o(lr),bo=l(lr,"P",{"data-svelte-h":!0}),u(bo)!=="svelte-1ojxz66"&&(bo.innerHTML=Kl),lr.forEach(a),D.forEach(a),ca=o(e),m(Vt.$$.fragment,e),ga=o(e),K=l(e,"DIV",{class:!0});var ir=b(K);m(zt.$$.fragment,ir),Rs=o(ir),_o=l(ir,"P",{"data-svelte-h":!0}),u(_o)!=="svelte-j4u4it"&&(_o.innerHTML=ei),ir.forEach(a),ha=o(e),m(Bt.$$.fragment,e),ua=o(e),ee=l(e,"DIV",{class:!0});var dr=b(ee);m(St.$$.fragment,dr),Vs=o(dr),$o=l(dr,"P",{"data-svelte-h":!0}),u($o)!=="svelte-3yyclm"&&($o.textContent=ti),dr.forEach(a),fa=o(e),m(Zt.$$.fragment,e),va=o(e),H=l(e,"DIV",{class:!0});var We=b(H);m(Gt.$$.fragment,We),zs=o(We),yo=l(We,"P",{"data-svelte-h":!0}),u(yo)!=="svelte-n5kqzu"&&(yo.textContent=ni),Bs=o(We),wo=l(We,"BLOCKQUOTE",{"data-svelte-h":!0}),u(wo)!=="svelte-1ezz2hf"&&(wo.innerHTML=oi),Ss=o(We),m(qe.$$.fragment,We),We.forEach(a),ba=o(e),m(Ot.$$.fragment,e),_a=o(e),Ft=l(e,"P",{"data-svelte-h":!0}),u(Ft)!=="svelte-oor881"&&(Ft.textContent=ai),$a=o(e),Yt=l(e,"OL",{"data-svelte-h":!0}),u(Yt)!=="svelte-1fvckr8"&&(Yt.innerHTML=ri),ya=o(e),m(Qt.$$.fragment,e),wa=o(e),Xt=l(e,"P",{"data-svelte-h":!0}),u(Xt)!=="svelte-326rto"&&(Xt.innerHTML=si),Ta=o(e),m(Kt.$$.fragment,e),xa=o(e),te=l(e,"DIV",{class:!0});var mr=b(te);m(en.$$.fragment,mr),Zs=o(mr),To=l(mr,"P",{"data-svelte-h":!0}),u(To)!=="svelte-phvciw"&&(To.textContent=li),mr.forEach(a),ka=o(e),m(tn.$$.fragment,e),Ca=o(e),nn=l(e,"P",{"data-svelte-h":!0}),u(nn)!=="svelte-1korg3b"&&(nn.innerHTML=ii),Ma=o(e),m(on.$$.fragment,e),Ia=o(e),ne=l(e,"DIV",{class:!0});var pr=b(ne);m(an.$$.fragment,pr),Gs=o(pr),xo=l(pr,"P",{"data-svelte-h":!0}),u(xo)!=="svelte-1earq1f"&&(xo.textContent=di),pr.forEach(a),Aa=o(e),m(rn.$$.fragment,e),ja=o(e),sn=l(e,"P",{"data-svelte-h":!0}),u(sn)!=="svelte-jsq4jz"&&(sn.textContent=mi),La=o(e),ln=l(e,"P",{"data-svelte-h":!0}),u(ln)!=="svelte-1ixcu88"&&(ln.innerHTML=pi),qa=o(e),dn=l(e,"P",{"data-svelte-h":!0}),u(dn)!=="svelte-1nfvcwf"&&(dn.textContent=ci),Pa=o(e),mn=l(e,"UL",{"data-svelte-h":!0}),u(mn)!=="svelte-ysem30"&&(mn.innerHTML=gi),Ja=o(e),m(pn.$$.fragment,e),Ea=o(e),oe=l(e,"DIV",{class:!0});var cr=b(oe);m(cn.$$.fragment,cr),Os=o(cr),ko=l(cr,"P",{"data-svelte-h":!0}),u(ko)!=="svelte-57fhj7"&&(ko.textContent=hi),cr.forEach(a),Ua=o(e),m(gn.$$.fragment,e),Da=o(e),J=l(e,"DIV",{class:!0});var Q=b(J);m(hn.$$.fragment,Q),Fs=o(Q),Co=l(Q,"P",{"data-svelte-h":!0}),u(Co)!=="svelte-1hsb0qs"&&(Co.textContent=ui),Ys=o(Q),Pe=l(Q,"DIV",{class:!0});var gr=b(Pe);m(un.$$.fragment,gr),Qs=o(gr),Mo=l(gr,"P",{"data-svelte-h":!0}),u(Mo)!=="svelte-qix5eq"&&(Mo.textContent=fi),gr.forEach(a),Xs=o(Q),Je=l(Q,"DIV",{class:!0});var hr=b(Je);m(fn.$$.fragment,hr),Ks=o(hr),Io=l(hr,"P",{"data-svelte-h":!0}),u(Io)!=="svelte-ybie7i"&&(Io.textContent=vi),hr.forEach(a),el=o(Q),Ee=l(Q,"DIV",{class:!0});var ur=b(Ee);m(vn.$$.fragment,ur),tl=o(ur),Ao=l(ur,"P",{"data-svelte-h":!0}),u(Ao)!=="svelte-chc6sp"&&(Ao.textContent=bi),ur.forEach(a),Q.forEach(a),Na=o(e),m(bn.$$.fragment,e),Ha=o(e),W=l(e,"DIV",{class:!0});var Re=b(W);m(_n.$$.fragment,Re),nl=o(Re),jo=l(Re,"P",{"data-svelte-h":!0}),u(jo)!=="svelte-ckiqb6"&&(jo.textContent=_i),ol=o(Re),Ue=l(Re,"DIV",{class:!0});var fr=b(Ue);m($n.$$.fragment,fr),al=o(fr),Lo=l(fr,"P",{"data-svelte-h":!0}),u(Lo)!=="svelte-10rnn1x"&&(Lo.innerHTML=$i),fr.forEach(a),rl=o(Re),De=l(Re,"DIV",{class:!0});var vr=b(De);m(yn.$$.fragment,vr),sl=o(vr),qo=l(vr,"P",{"data-svelte-h":!0}),u(qo)!=="svelte-1xu9o93"&&(qo.textContent=yi),vr.forEach(a),Re.forEach(a),Wa=o(e),m(wn.$$.fragment,e),Ra=o(e),Wo=l(e,"P",{}),b(Wo).forEach(a),this.h()},h(){_(f,"name","hf:doc:metadata"),_(f,"content",Di),_(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,r){t(document.head,f),i(e,x,r),i(e,y,r),i(e,w,r),p(T,e,r),i(e,v,r),p(C,e,r),i(e,Ro,r),i(e,Ve,r),i(e,Vo,r),p(ze,e,r),i(e,zo,r),i(e,Be,r),i(e,Bo,r),i(e,Se,r),i(e,So,r),p(Ze,e,r),i(e,Zo,r),i(e,P,r),p(Ge,P,null),t(P,_r),t(P,ae),p(Oe,ae,null),t(ae,$r),t(ae,An),t(P,yr),t(P,re),p(Fe,re,null),t(re,wr),t(re,jn),t(P,Tr),t(P,se),p(Ye,se,null),t(se,xr),t(se,Ln),t(P,kr),t(P,le),p(Qe,le,null),t(le,Cr),t(le,qn),i(e,Go,r),p(Xe,e,r),i(e,Oo,r),i(e,N,r),p(Ke,N,null),t(N,Mr),t(N,Pn),t(N,Ir),t(N,ie),p(et,ie,null),t(ie,Ar),t(ie,Jn),t(N,jr),t(N,O),p(tt,O,null),t(O,Lr),t(O,En),t(O,qr),p(de,O,null),i(e,Fo,r),p(nt,e,r),i(e,Yo,r),i(e,A,r),p(ot,A,null),t(A,Pr),t(A,Un),t(A,Jr),t(A,me),p(at,me,null),t(me,Er),t(me,Dn),t(A,Ur),t(A,pe),p(rt,pe,null),t(pe,Dr),t(pe,Nn),t(A,Nr),t(A,ce),p(st,ce,null),t(ce,Hr),t(ce,Hn),t(A,Wr),t(A,F),p(lt,F,null),t(F,Rr),t(F,Wn),t(F,Vr),p(ge,F,null),t(A,zr),t(A,he),p(it,he,null),t(he,Br),t(he,Rn),i(e,Qo,r),i(e,B,r),p(dt,B,null),t(B,Sr),t(B,Vn),t(B,Zr),t(B,ue),p(mt,ue,null),t(ue,Gr),t(ue,zn),i(e,Xo,r),i(e,S,r),p(pt,S,null),t(S,Or),t(S,Bn),t(S,Fr),t(S,fe),p(ct,fe,null),t(fe,Yr),t(fe,Sn),i(e,Ko,r),p(gt,e,r),i(e,ea,r),i(e,ht,r),p(ut,ht,null),i(e,ta,r),p(ft,e,r),i(e,na,r),p(vt,e,r),i(e,oa,r),i(e,Z,r),p(bt,Z,null),t(Z,Qr),t(Z,Zn),t(Z,Xr),p(ve,Z,null),i(e,aa,r),p(_t,e,r),i(e,ra,r),i(e,X,r),p($t,X,null),t(X,Kr),t(X,Gn),i(e,sa,r),p(yt,e,r),i(e,la,r),i(e,k,r),p(wt,k,null),t(k,es),t(k,On),t(k,ts),t(k,Fn),t(k,ns),t(k,Yn),t(k,os),t(k,be),p(Tt,be,null),t(be,as),t(be,Qn),t(k,rs),t(k,Y),p(xt,Y,null),t(Y,ss),t(Y,Xn),t(Y,ls),p(_e,Y,null),t(k,is),t(k,$e),p(kt,$e,null),t($e,ds),t($e,Kn),t(k,ms),t(k,V),p(Ct,V,null),t(V,ps),t(V,eo),t(V,cs),t(V,to),t(V,gs),p(ye,V,null),t(k,hs),t(k,z),p(Mt,z,null),t(z,us),t(z,no),t(z,fs),t(z,oo),t(z,vs),t(z,ao),t(k,bs),t(k,we),p(It,we,null),t(we,_s),t(we,ro),i(e,ia,r),p(At,e,r),i(e,da,r),i(e,j,r),p(jt,j,null),t(j,$s),t(j,so),t(j,ys),t(j,Te),p(Lt,Te,null),t(Te,ws),t(Te,lo),t(j,Ts),t(j,xe),p(qt,xe,null),t(xe,xs),t(xe,io),t(j,ks),t(j,ke),p(Pt,ke,null),t(ke,Cs),t(ke,mo),t(j,Ms),t(j,Ce),p(Jt,Ce,null),t(Ce,Is),t(Ce,po),t(j,As),t(j,Me),p(Et,Me,null),t(Me,js),t(Me,co),i(e,ma,r),p(Ut,e,r),i(e,pa,r),i(e,L,r),p(Dt,L,null),t(L,Ls),t(L,go),t(L,qs),t(L,ho),t(L,Ps),t(L,Ie),p(Nt,Ie,null),t(Ie,Js),t(Ie,uo),t(L,Es),t(L,Ae),p(Ht,Ae,null),t(Ae,Us),t(Ae,fo),t(L,Ds),t(L,je),p(Wt,je,null),t(je,Ns),t(je,vo),t(L,Hs),t(L,Le),p(Rt,Le,null),t(Le,Ws),t(Le,bo),i(e,ca,r),p(Vt,e,r),i(e,ga,r),i(e,K,r),p(zt,K,null),t(K,Rs),t(K,_o),i(e,ha,r),p(Bt,e,r),i(e,ua,r),i(e,ee,r),p(St,ee,null),t(ee,Vs),t(ee,$o),i(e,fa,r),p(Zt,e,r),i(e,va,r),i(e,H,r),p(Gt,H,null),t(H,zs),t(H,yo),t(H,Bs),t(H,wo),t(H,Ss),p(qe,H,null),i(e,ba,r),p(Ot,e,r),i(e,_a,r),i(e,Ft,r),i(e,$a,r),i(e,Yt,r),i(e,ya,r),p(Qt,e,r),i(e,wa,r),i(e,Xt,r),i(e,Ta,r),p(Kt,e,r),i(e,xa,r),i(e,te,r),p(en,te,null),t(te,Zs),t(te,To),i(e,ka,r),p(tn,e,r),i(e,Ca,r),i(e,nn,r),i(e,Ma,r),p(on,e,r),i(e,Ia,r),i(e,ne,r),p(an,ne,null),t(ne,Gs),t(ne,xo),i(e,Aa,r),p(rn,e,r),i(e,ja,r),i(e,sn,r),i(e,La,r),i(e,ln,r),i(e,qa,r),i(e,dn,r),i(e,Pa,r),i(e,mn,r),i(e,Ja,r),p(pn,e,r),i(e,Ea,r),i(e,oe,r),p(cn,oe,null),t(oe,Os),t(oe,ko),i(e,Ua,r),p(gn,e,r),i(e,Da,r),i(e,J,r),p(hn,J,null),t(J,Fs),t(J,Co),t(J,Ys),t(J,Pe),p(un,Pe,null),t(Pe,Qs),t(Pe,Mo),t(J,Xs),t(J,Je),p(fn,Je,null),t(Je,Ks),t(Je,Io),t(J,el),t(J,Ee),p(vn,Ee,null),t(Ee,tl),t(Ee,Ao),i(e,Na,r),p(bn,e,r),i(e,Ha,r),i(e,W,r),p(_n,W,null),t(W,nl),t(W,jo),t(W,ol),t(W,Ue),p($n,Ue,null),t(Ue,al),t(Ue,Lo),t(W,rl),t(W,De),p(yn,De,null),t(De,sl),t(De,qo),i(e,Wa,r),p(wn,e,r),i(e,Ra,r),i(e,Wo,r),Va=!0},p(e,[r]){const R={};r&2&&(R.$$scope={dirty:r,ctx:e}),C.$set(R);const Tn={};r&2&&(Tn.$$scope={dirty:r,ctx:e}),de.$set(Tn);const xn={};r&2&&(xn.$$scope={dirty:r,ctx:e}),ge.$set(xn);const kn={};r&2&&(kn.$$scope={dirty:r,ctx:e}),ve.$set(kn);const Cn={};r&2&&(Cn.$$scope={dirty:r,ctx:e}),_e.$set(Cn);const G={};r&2&&(G.$$scope={dirty:r,ctx:e}),ye.$set(G);const Mn={};r&2&&(Mn.$$scope={dirty:r,ctx:e}),qe.$set(Mn)},i(e){Va||(c(T.$$.fragment,e),c(C.$$.fragment,e),c(ze.$$.fragment,e),c(Ze.$$.fragment,e),c(Ge.$$.fragment,e),c(Oe.$$.fragment,e),c(Fe.$$.fragment,e),c(Ye.$$.fragment,e),c(Qe.$$.fragment,e),c(Xe.$$.fragment,e),c(Ke.$$.fragment,e),c(et.$$.fragment,e),c(tt.$$.fragment,e),c(de.$$.fragment,e),c(nt.$$.fragment,e),c(ot.$$.fragment,e),c(at.$$.fragment,e),c(rt.$$.fragment,e),c(st.$$.fragment,e),c(lt.$$.fragment,e),c(ge.$$.fragment,e),c(it.$$.fragment,e),c(dt.$$.fragment,e),c(mt.$$.fragment,e),c(pt.$$.fragment,e),c(ct.$$.fragment,e),c(gt.$$.fragment,e),c(ut.$$.fragment,e),c(ft.$$.fragment,e),c(vt.$$.fragment,e),c(bt.$$.fragment,e),c(ve.$$.fragment,e),c(_t.$$.fragment,e),c($t.$$.fragment,e),c(yt.$$.fragment,e),c(wt.$$.fragment,e),c(Tt.$$.fragment,e),c(xt.$$.fragment,e),c(_e.$$.fragment,e),c(kt.$$.fragment,e),c(Ct.$$.fragment,e),c(ye.$$.fragment,e),c(Mt.$$.fragment,e),c(It.$$.fragment,e),c(At.$$.fragment,e),c(jt.$$.fragment,e),c(Lt.$$.fragment,e),c(qt.$$.fragment,e),c(Pt.$$.fragment,e),c(Jt.$$.fragment,e),c(Et.$$.fragment,e),c(Ut.$$.fragment,e),c(Dt.$$.fragment,e),c(Nt.$$.fragment,e),c(Ht.$$.fragment,e),c(Wt.$$.fragment,e),c(Rt.$$.fragment,e),c(Vt.$$.fragment,e),c(zt.$$.fragment,e),c(Bt.$$.fragment,e),c(St.$$.fragment,e),c(Zt.$$.fragment,e),c(Gt.$$.fragment,e),c(qe.$$.fragment,e),c(Ot.$$.fragment,e),c(Qt.$$.fragment,e),c(Kt.$$.fragment,e),c(en.$$.fragment,e),c(tn.$$.fragment,e),c(on.$$.fragment,e),c(an.$$.fragment,e),c(rn.$$.fragment,e),c(pn.$$.fragment,e),c(cn.$$.fragment,e),c(gn.$$.fragment,e),c(hn.$$.fragment,e),c(un.$$.fragment,e),c(fn.$$.fragment,e),c(vn.$$.fragment,e),c(bn.$$.fragment,e),c(_n.$$.fragment,e),c($n.$$.fragment,e),c(yn.$$.fragment,e),c(wn.$$.fragment,e),Va=!0)},o(e){g(T.$$.fragment,e),g(C.$$.fragment,e),g(ze.$$.fragment,e),g(Ze.$$.fragment,e),g(Ge.$$.fragment,e),g(Oe.$$.fragment,e),g(Fe.$$.fragment,e),g(Ye.$$.fragment,e),g(Qe.$$.fragment,e),g(Xe.$$.fragment,e),g(Ke.$$.fragment,e),g(et.$$.fragment,e),g(tt.$$.fragment,e),g(de.$$.fragment,e),g(nt.$$.fragment,e),g(ot.$$.fragment,e),g(at.$$.fragment,e),g(rt.$$.fragment,e),g(st.$$.fragment,e),g(lt.$$.fragment,e),g(ge.$$.fragment,e),g(it.$$.fragment,e),g(dt.$$.fragment,e),g(mt.$$.fragment,e),g(pt.$$.fragment,e),g(ct.$$.fragment,e),g(gt.$$.fragment,e),g(ut.$$.fragment,e),g(ft.$$.fragment,e),g(vt.$$.fragment,e),g(bt.$$.fragment,e),g(ve.$$.fragment,e),g(_t.$$.fragment,e),g($t.$$.fragment,e),g(yt.$$.fragment,e),g(wt.$$.fragment,e),g(Tt.$$.fragment,e),g(xt.$$.fragment,e),g(_e.$$.fragment,e),g(kt.$$.fragment,e),g(Ct.$$.fragment,e),g(ye.$$.fragment,e),g(Mt.$$.fragment,e),g(It.$$.fragment,e),g(At.$$.fragment,e),g(jt.$$.fragment,e),g(Lt.$$.fragment,e),g(qt.$$.fragment,e),g(Pt.$$.fragment,e),g(Jt.$$.fragment,e),g(Et.$$.fragment,e),g(Ut.$$.fragment,e),g(Dt.$$.fragment,e),g(Nt.$$.fragment,e),g(Ht.$$.fragment,e),g(Wt.$$.fragment,e),g(Rt.$$.fragment,e),g(Vt.$$.fragment,e),g(zt.$$.fragment,e),g(Bt.$$.fragment,e),g(St.$$.fragment,e),g(Zt.$$.fragment,e),g(Gt.$$.fragment,e),g(qe.$$.fragment,e),g(Ot.$$.fragment,e),g(Qt.$$.fragment,e),g(Kt.$$.fragment,e),g(en.$$.fragment,e),g(tn.$$.fragment,e),g(on.$$.fragment,e),g(an.$$.fragment,e),g(rn.$$.fragment,e),g(pn.$$.fragment,e),g(cn.$$.fragment,e),g(gn.$$.fragment,e),g(hn.$$.fragment,e),g(un.$$.fragment,e),g(fn.$$.fragment,e),g(vn.$$.fragment,e),g(bn.$$.fragment,e),g(_n.$$.fragment,e),g($n.$$.fragment,e),g(yn.$$.fragment,e),g(wn.$$.fragment,e),Va=!1},d(e){e&&(a(x),a(y),a(w),a(v),a(Ro),a(Ve),a(Vo),a(zo),a(Be),a(Bo),a(Se),a(So),a(Zo),a(P),a(Go),a(Oo),a(N),a(Fo),a(Yo),a(A),a(Qo),a(B),a(Xo),a(S),a(Ko),a(ea),a(ht),a(ta),a(na),a(oa),a(Z),a(aa),a(ra),a(X),a(sa),a(la),a(k),a(ia),a(da),a(j),a(ma),a(pa),a(L),a(ca),a(ga),a(K),a(ha),a(ua),a(ee),a(fa),a(va),a(H),a(ba),a(_a),a(Ft),a($a),a(Yt),a(ya),a(wa),a(Xt),a(Ta),a(xa),a(te),a(ka),a(Ca),a(nn),a(Ma),a(Ia),a(ne),a(Aa),a(ja),a(sn),a(La),a(ln),a(qa),a(dn),a(Pa),a(mn),a(Ja),a(Ea),a(oe),a(Ua),a(Da),a(J),a(Na),a(Ha),a(W),a(Wa),a(Ra),a(Wo)),a(f),h(T,e),h(C,e),h(ze,e),h(Ze,e),h(Ge),h(Oe),h(Fe),h(Ye),h(Qe),h(Xe,e),h(Ke),h(et),h(tt),h(de),h(nt,e),h(ot),h(at),h(rt),h(st),h(lt),h(ge),h(it),h(dt),h(mt),h(pt),h(ct),h(gt,e),h(ut),h(ft,e),h(vt,e),h(bt),h(ve),h(_t,e),h($t),h(yt,e),h(wt),h(Tt),h(xt),h(_e),h(kt),h(Ct),h(ye),h(Mt),h(It),h(At,e),h(jt),h(Lt),h(qt),h(Pt),h(Jt),h(Et),h(Ut,e),h(Dt),h(Nt),h(Ht),h(Wt),h(Rt),h(Vt,e),h(zt),h(Bt,e),h(St),h(Zt,e),h(Gt),h(qe),h(Ot,e),h(Qt,e),h(Kt,e),h(en),h(tn,e),h(on,e),h(an),h(rn,e),h(pn,e),h(cn),h(gn,e),h(hn),h(un),h(fn),h(vn),h(bn,e),h(_n),h($n),h(yn),h(wn,e)}}}const Di='{"title":"Agents & Tools","local":"agents--tools","sections":[{"title":"Agents","local":"agents","sections":[{"title":"Agent","local":"transformers.Agent","sections":[],"depth":3},{"title":"CodeAgent","local":"transformers.CodeAgent","sections":[],"depth":3},{"title":"React agents","local":"transformers.ReactAgent","sections":[],"depth":3},{"title":"ManagedAgent","local":"transformers.ManagedAgent","sections":[],"depth":3}],"depth":2},{"title":"Tools","local":"tools","sections":[{"title":"load_tool","local":"transformers.load_tool","sections":[],"depth":3},{"title":"tool","local":"transformers.tool","sections":[],"depth":3},{"title":"Tool","local":"transformers.Tool","sections":[],"depth":3},{"title":"Toolbox","local":"transformers.Toolbox","sections":[],"depth":3},{"title":"PipelineTool","local":"transformers.PipelineTool","sections":[],"depth":3},{"title":"launch_gradio_demo","local":"transformers.launch_gradio_demo","sections":[],"depth":3},{"title":"stream_to_gradio","local":"transformers.stream_to_gradio","sections":[],"depth":3},{"title":"ToolCollection","local":"transformers.ToolCollection","sections":[],"depth":3}],"depth":2},{"title":"Engines","local":"engines","sections":[{"title":"TransformersEngine","local":"transformers.TransformersEngine","sections":[],"depth":3},{"title":"HfApiEngine","local":"transformers.HfApiEngine","sections":[],"depth":3}],"depth":2},{"title":"Agent Types","local":"agent-types","sections":[{"title":"AgentText","local":"transformers.agents.agent_types.AgentText","sections":[],"depth":3},{"title":"AgentImage","local":"transformers.agents.agent_types.AgentImage","sections":[],"depth":3},{"title":"AgentAudio","local":"transformers.agents.agent_types.AgentAudio","sections":[],"depth":3}],"depth":2}],"depth":1}';function Ni(q){return xi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zi extends ki{constructor(f){super(),Ci(this,f,Ni,Ui,Ti,{})}}export{Zi as component};
