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 m,A as Mi,h as l,f as a,c as o,j as v,u as d,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 vr}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as M,E as Ii}from"../chunks/EditOnGithub.91d95064.js";function Ai(L){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(L){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(),m(w.$$.fragment)},l(b){f=l(b,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(b),d(w.$$.fragment,b)},m(b,C){i(b,f,C),i(b,y,C),p(w,b,C),T=!0},p:In,i(b){T||(c(w.$$.fragment,b),T=!0)},o(b){g(w.$$.fragment,b),T=!1},d(b){b&&(a(f),a(y)),h(w,b)}}}function qi(L){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(),m(w.$$.fragment)},l(b){f=l(b,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(b),d(w.$$.fragment,b)},m(b,C){i(b,f,C),i(b,y,C),p(w,b,C),T=!0},p:In,i(b){T||(c(w.$$.fragment,b),T=!0)},o(b){g(w.$$.fragment,b),T=!1},d(b){b&&(a(f),a(y)),h(w,b)}}}function Li(L){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(L){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(L){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(),m(w.$$.fragment)},l(b){f=l(b,"P",{"data-svelte-h":!0}),u(f)!=="svelte-4vay6o"&&(f.textContent=x),y=o(b),d(w.$$.fragment,b)},m(b,C){i(b,f,C),i(b,y,C),p(w,b,C),T=!0},p:In,i(b){T||(c(w.$$.fragment,b),T=!0)},o(b){g(w.$$.fragment,b),T=!1},d(b){b&&(a(f),a(y)),h(w,b)}}}function Ei(L){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(),m(w.$$.fragment)},l(b){f=l(b,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(b),d(w.$$.fragment,b)},m(b,C){i(b,f,C),i(b,y,C),p(w,b,C),T=!0},p:In,i(b){T||(c(w.$$.fragment,b),T=!0)},o(b){g(w.$$.fragment,b),T=!1},d(b){b&&(a(f),a(y)),h(w,b)}}}function Ui(L){let f,x,y,w,T,b,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,ml='We provide two types of agents, based on the main <a href="/docs/transformers/main/en/main_classes/agent#transformers.Agent">Agent</a> class:',Bo,Se,dl='<li><a href="/docs/transformers/main/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/main/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/main/en/main_classes/agent#transformers.ReactJsonAgent">ReactJsonAgent</a> writes its tool calls in JSON.</li> <li><a href="/docs/transformers/main/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,qn,gl="To be implemented in the child class",kr,le,Qe,Cr,Ln,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,qr,En,bl="Runs the agent for the given task.",Lr,me,Fo,nt,Yo,A,ot,Pr,Un,vl=`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,de,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,mt,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,dt,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,bt,oa,Z,vt,Qr,Zn,Il="Main function to quickly load a tool, be it on the Hub or in the Transformers library.",Xr,be,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,ql=`<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,Ll=`You can also override the method <a href="/docs/transformers/main/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/main/en/main_classes/agent#transformers.Tool.setup">setup()</a> will be called the first time you use your tool, but not at
instantiation.`,os,ve,Tt,as,Qn,Pl='Creates a <a href="/docs/transformers/main/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,ms,Kn,El='Creates a <a href="/docs/transformers/main/en/main_classes/agent#transformers.Tool">Tool</a> from a langchain tool.',ds,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>`,bs,ao,Wl="You should only use this method to save tools that are defined in a separate module (not <code>__main__</code>).",vs,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,ma,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,qt,ws,lo,zl="Adds a tool to the toolbox",Ts,xe,Lt,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.",da,Ut,pa,q,Dt,qs,go,Ol=`A <a href="/docs/transformers/main/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/main/en/main_classes/agent#transformers.Tool">Tool</a>, you will
need to specify:`,Ls,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/main/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/main/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,bo,Xl="Sends the inputs through the <code>model</code>.",Hs,qe,Rt,Ws,vo,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,ba,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,Le,va,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,mi="This engine leverages Hugging Face’s Inference API service, either serverless or with a dedicated endpoint.",Aa,rn,ja,sn,di=`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.`,qa,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>.`,La,mn,ci="These types have three specific purposes:",Pa,dn,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,bi="Returns the “raw” version of that object. In the case of an AgentImage, it is a PIL.Image.",el,Ee,bn,tl,Ao,vi=`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,vn,Ha,W,_n,nl,jo,_i="Audio type returned by the agent.",ol,Ue,$n,al,qo,$i="Returns the “raw” version of that object. It is a <code>torch.Tensor</code> object.",rl,De,yn,sl,Lo,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:L}}}),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 0x7f64a9be3e50>"},{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 0x7f64a9c18dc0>"},{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/main/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/main/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/main/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/main/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/main/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 0x7f64a9c24100>"},{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/main/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/main/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/main/src/transformers/agents/agents.py#L616"}}),me=new vr({props:{anchor:"transformers.CodeAgent.run.example",$$slots:{default:[ji]},$$scope:{ctx:L}}}),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 0x7f64a9c24280>"},{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/main/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/main/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/main/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/main/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/main/src/transformers/agents/agents.py#L745"}}),ge=new vr({props:{anchor:"transformers.ReactAgent.run.example",$$slots:{default:[qi]},$$scope:{ctx:L}}}),it=new $({props:{name:"stream_run",anchor:"transformers.ReactAgent.stream_run",parameters:[{name:"task",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/agents/agents.py#L772"}}),mt=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 0x7f64a9c24430>"},{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/main/src/transformers/agents/agents.py#L930"}}),dt=new $({props:{name:"step",anchor:"transformers.ReactJsonAgent.step",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/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 0x7f64a9c245b0>"},{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/main/src/transformers/agents/agents.py#L1037"}}),ct=new $({props:{name:"step",anchor:"transformers.ReactCodeAgent.step",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/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/main/src/transformers/agents/agents.py#L1164"}}),ft=new M({props:{title:"Tools",local:"tools",headingTag:"h2"}}),bt=new M({props:{title:"load_tool",local:"transformers.load_tool",headingTag:"h3"}}),vt=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/main/src/transformers/agents/tools.py#L693"}}),be=new ll({props:{warning:!0,$$slots:{default:[Li]},$$scope:{ctx:L}}}),_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/main/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/main/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/main/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/main/src/transformers/agents/tools.py#L239"}}),_e=new ll({props:{warning:!0,$$slots:{default:[Pi]},$$scope:{ctx:L}}}),kt=new $({props:{name:"from_langchain",anchor:"transformers.Tool.from_langchain",parameters:[{name:"langchain_tool",val:""}],source:"https://github.com/huggingface/transformers/blob/main/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/main/src/transformers/agents/tools.py#L351"}}),ye=new vr({props:{anchor:"transformers.Tool.push_to_hub.example",$$slots:{default:[Ji]},$$scope:{ctx:L}}}),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/main/src/transformers/agents/tools.py#L179"}}),It=new $({props:{name:"setup",anchor:"transformers.Tool.setup",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/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/main/src/transformers/agents/agents.py#L182"}}),qt=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/main/src/transformers/agents/agents.py#L228"}}),Lt=new $({props:{name:"clear_toolbox",anchor:"transformers.Toolbox.clear_toolbox",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/transformers/agents/tools.py#L607"}}),Rt=new $({props:{name:"setup",anchor:"transformers.PipelineTool.setup",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/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/main/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/main/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/main/src/transformers/agents/tools.py#L817"}}),Le=new vr({props:{anchor:"transformers.ToolCollection.example",$$slots:{default:[Ei]},$$scope:{ctx:L}}}),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/main/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/main/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/main/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/main/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/main/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/main/src/transformers/agents/agent_types.py#L120"}}),bn=new $({props:{name:"to_string",anchor:"transformers.agents.agent_types.AgentImage.to_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/agents/agent_types.py#L135"}}),vn=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/main/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/main/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/main/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(),m(T.$$.fragment),b=n(),m(C.$$.fragment),Ro=n(),Ve=s("p"),Ve.innerHTML=il,Vo=n(),m(ze.$$.fragment),zo=n(),Be=s("p"),Be.innerHTML=ml,Bo=n(),Se=s("ul"),Se.innerHTML=dl,So=n(),m(Ze.$$.fragment),Zo=n(),P=s("div"),m(Ge.$$.fragment),_r=n(),ae=s("div"),m(Oe.$$.fragment),$r=n(),An=s("p"),An.textContent=pl,yr=n(),re=s("div"),m(Fe.$$.fragment),wr=n(),jn=s("p"),jn.textContent=cl,Tr=n(),se=s("div"),m(Ye.$$.fragment),xr=n(),qn=s("p"),qn.textContent=gl,kr=n(),le=s("div"),m(Qe.$$.fragment),Cr=n(),Ln=s("p"),Ln.textContent=hl,Go=n(),m(Xe.$$.fragment),Oo=n(),N=s("div"),m(Ke.$$.fragment),Mr=n(),Pn=s("p"),Pn.textContent=ul,Ir=n(),ie=s("div"),m(et.$$.fragment),Ar=n(),Jn=s("p"),Jn.innerHTML=fl,jr=n(),O=s("div"),m(tt.$$.fragment),qr=n(),En=s("p"),En.textContent=bl,Lr=n(),m(me.$$.fragment),Fo=n(),m(nt.$$.fragment),Yo=n(),A=s("div"),m(ot.$$.fragment),Pr=n(),Un=s("p"),Un.textContent=vl,Jr=n(),de=s("div"),m(at.$$.fragment),Er=n(),Dn=s("p"),Dn.innerHTML=_l,Ur=n(),pe=s("div"),m(rt.$$.fragment),Dr=n(),Nn=s("p"),Nn.textContent=$l,Nr=n(),ce=s("div"),m(st.$$.fragment),Hr=n(),Hn=s("p"),Hn.textContent=yl,Wr=n(),F=s("div"),m(lt.$$.fragment),Rr=n(),Wn=s("p"),Wn.textContent=wl,Vr=n(),m(ge.$$.fragment),zr=n(),he=s("div"),m(it.$$.fragment),Br=n(),Rn=s("p"),Rn.innerHTML=Tl,Qo=n(),B=s("div"),m(mt.$$.fragment),Sr=n(),Vn=s("p"),Vn.textContent=xl,Zr=n(),ue=s("div"),m(dt.$$.fragment),Gr=n(),zn=s("p"),zn.textContent=kl,Xo=n(),S=s("div"),m(pt.$$.fragment),Or=n(),Bn=s("p"),Bn.textContent=Cl,Fr=n(),fe=s("div"),m(ct.$$.fragment),Yr=n(),Sn=s("p"),Sn.textContent=Ml,Ko=n(),m(gt.$$.fragment),ea=n(),ht=s("div"),m(ut.$$.fragment),ta=n(),m(ft.$$.fragment),na=n(),m(bt.$$.fragment),oa=n(),Z=s("div"),m(vt.$$.fragment),Qr=n(),Zn=s("p"),Zn.textContent=Il,Xr=n(),m(be.$$.fragment),aa=n(),m(_t.$$.fragment),ra=n(),X=s("div"),m($t.$$.fragment),Kr=n(),Gn=s("p"),Gn.textContent=Al,sa=n(),m(yt.$$.fragment),la=n(),k=s("div"),m(wt.$$.fragment),es=n(),On=s("p"),On.innerHTML=jl,ts=n(),Fn=s("ul"),Fn.innerHTML=ql,ns=n(),Yn=s("p"),Yn.innerHTML=Ll,os=n(),ve=s("div"),m(Tt.$$.fragment),as=n(),Qn=s("p"),Qn.innerHTML=Pl,rs=n(),Y=s("div"),m(xt.$$.fragment),ss=n(),Xn=s("p"),Xn.textContent=Jl,ls=n(),m(_e.$$.fragment),is=n(),$e=s("div"),m(kt.$$.fragment),ms=n(),Kn=s("p"),Kn.innerHTML=El,ds=n(),V=s("div"),m(Ct.$$.fragment),ps=n(),eo=s("p"),eo.textContent=Ul,cs=n(),to=s("p"),to.innerHTML=Dl,gs=n(),m(ye.$$.fragment),hs=n(),z=s("div"),m(Mt.$$.fragment),us=n(),no=s("p"),no.innerHTML=Nl,fs=n(),oo=s("ul"),oo.innerHTML=Hl,bs=n(),ao=s("p"),ao.innerHTML=Wl,vs=n(),we=s("div"),m(It.$$.fragment),_s=n(),ro=s("p"),ro.textContent=Rl,ia=n(),m(At.$$.fragment),ma=n(),j=s("div"),m(jt.$$.fragment),$s=n(),so=s("p"),so.textContent=Vl,ys=n(),Te=s("div"),m(qt.$$.fragment),ws=n(),lo=s("p"),lo.textContent=zl,Ts=n(),xe=s("div"),m(Lt.$$.fragment),xs=n(),io=s("p"),io.textContent=Bl,ks=n(),ke=s("div"),m(Pt.$$.fragment),Cs=n(),mo=s("p"),mo.textContent=Sl,Ms=n(),Ce=s("div"),m(Jt.$$.fragment),Is=n(),po=s("p"),po.textContent=Zl,As=n(),Me=s("div"),m(Et.$$.fragment),js=n(),co=s("p"),co.textContent=Gl,da=n(),m(Ut.$$.fragment),pa=n(),q=s("div"),m(Dt.$$.fragment),qs=n(),go=s("p"),go.innerHTML=Ol,Ls=n(),ho=s("ul"),ho.innerHTML=Fl,Ps=n(),Ie=s("div"),m(Nt.$$.fragment),Js=n(),uo=s("p"),uo.innerHTML=Yl,Es=n(),Ae=s("div"),m(Ht.$$.fragment),Us=n(),fo=s("p"),fo.innerHTML=Ql,Ds=n(),je=s("div"),m(Wt.$$.fragment),Ns=n(),bo=s("p"),bo.innerHTML=Xl,Hs=n(),qe=s("div"),m(Rt.$$.fragment),Ws=n(),vo=s("p"),vo.innerHTML=Kl,ca=n(),m(Vt.$$.fragment),ga=n(),K=s("div"),m(zt.$$.fragment),Rs=n(),_o=s("p"),_o.innerHTML=ei,ha=n(),m(Bt.$$.fragment),ua=n(),ee=s("div"),m(St.$$.fragment),Vs=n(),$o=s("p"),$o.textContent=ti,fa=n(),m(Zt.$$.fragment),ba=n(),H=s("div"),m(Gt.$$.fragment),zs=n(),yo=s("p"),yo.textContent=ni,Bs=n(),wo=s("blockquote"),wo.innerHTML=oi,Ss=n(),m(Le.$$.fragment),va=n(),m(Ot.$$.fragment),_a=n(),Ft=s("p"),Ft.textContent=ai,$a=n(),Yt=s("ol"),Yt.innerHTML=ri,ya=n(),m(Qt.$$.fragment),wa=n(),Xt=s("p"),Xt.innerHTML=si,Ta=n(),m(Kt.$$.fragment),xa=n(),te=s("div"),m(en.$$.fragment),Zs=n(),To=s("p"),To.textContent=li,ka=n(),m(tn.$$.fragment),Ca=n(),nn=s("p"),nn.innerHTML=ii,Ma=n(),m(on.$$.fragment),Ia=n(),ne=s("div"),m(an.$$.fragment),Gs=n(),xo=s("p"),xo.textContent=mi,Aa=n(),m(rn.$$.fragment),ja=n(),sn=s("p"),sn.textContent=di,qa=n(),ln=s("p"),ln.innerHTML=pi,La=n(),mn=s("p"),mn.textContent=ci,Pa=n(),dn=s("ul"),dn.innerHTML=gi,Ja=n(),m(pn.$$.fragment),Ea=n(),oe=s("div"),m(cn.$$.fragment),Os=n(),ko=s("p"),ko.textContent=hi,Ua=n(),m(gn.$$.fragment),Da=n(),J=s("div"),m(hn.$$.fragment),Fs=n(),Co=s("p"),Co.textContent=ui,Ys=n(),Pe=s("div"),m(un.$$.fragment),Qs=n(),Mo=s("p"),Mo.textContent=fi,Xs=n(),Je=s("div"),m(fn.$$.fragment),Ks=n(),Io=s("p"),Io.textContent=bi,el=n(),Ee=s("div"),m(bn.$$.fragment),tl=n(),Ao=s("p"),Ao.textContent=vi,Na=n(),m(vn.$$.fragment),Ha=n(),W=s("div"),m(_n.$$.fragment),nl=n(),jo=s("p"),jo.textContent=_i,ol=n(),Ue=s("div"),m($n.$$.fragment),al=n(),qo=s("p"),qo.innerHTML=$i,rl=n(),De=s("div"),m(yn.$$.fragment),sl=n(),Lo=s("p"),Lo.textContent=yi,Wa=n(),m(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",{}),v(y).forEach(a),w=o(e),d(T.$$.fragment,e),b=o(e),d(C.$$.fragment,e),Ro=o(e),Ve=l(e,"P",{"data-svelte-h":!0}),u(Ve)!=="svelte-7mj07q"&&(Ve.innerHTML=il),Vo=o(e),d(ze.$$.fragment,e),zo=o(e),Be=l(e,"P",{"data-svelte-h":!0}),u(Be)!=="svelte-n8fmrj"&&(Be.innerHTML=ml),Bo=o(e),Se=l(e,"UL",{"data-svelte-h":!0}),u(Se)!=="svelte-kxuq94"&&(Se.innerHTML=dl),So=o(e),d(Ze.$$.fragment,e),Zo=o(e),P=l(e,"DIV",{class:!0});var R=v(P);d(Ge.$$.fragment,R),_r=o(R),ae=l(R,"DIV",{class:!0});var Tn=v(ae);d(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=v(re);d(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=v(se);d(Ye.$$.fragment,kn),xr=o(kn),qn=l(kn,"P",{"data-svelte-h":!0}),u(qn)!=="svelte-wvvftk"&&(qn.textContent=gl),kn.forEach(a),kr=o(R),le=l(R,"DIV",{class:!0});var Cn=v(le);d(Qe.$$.fragment,Cn),Cr=o(Cn),Ln=l(Cn,"P",{"data-svelte-h":!0}),u(Ln)!=="svelte-1cw6633"&&(Ln.textContent=hl),Cn.forEach(a),R.forEach(a),Go=o(e),d(Xe.$$.fragment,e),Oo=o(e),N=l(e,"DIV",{class:!0});var G=v(N);d(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=v(ie);d(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=v(O);d(tt.$$.fragment,Po),qr=o(Po),En=l(Po,"P",{"data-svelte-h":!0}),u(En)!=="svelte-tbr5ck"&&(En.textContent=bl),Lr=o(Po),d(me.$$.fragment,Po),Po.forEach(a),G.forEach(a),Fo=o(e),d(nt.$$.fragment,e),Yo=o(e),A=l(e,"DIV",{class:!0});var E=v(A);d(ot.$$.fragment,E),Pr=o(E),Un=l(E,"P",{"data-svelte-h":!0}),u(Un)!=="svelte-c95fji"&&(Un.textContent=vl),Jr=o(E),de=l(E,"DIV",{class:!0});var za=v(de);d(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=v(pe);d(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=v(ce);d(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=v(F);d(lt.$$.fragment,Jo),Rr=o(Jo),Wn=l(Jo,"P",{"data-svelte-h":!0}),u(Wn)!=="svelte-tbr5ck"&&(Wn.textContent=wl),Vr=o(Jo),d(ge.$$.fragment,Jo),Jo.forEach(a),zr=o(E),he=l(E,"DIV",{class:!0});var Za=v(he);d(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=v(B);d(mt.$$.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=v(ue);d(dt.$$.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=v(S);d(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=v(fe);d(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),d(gt.$$.fragment,e),ea=o(e),ht=l(e,"DIV",{class:!0});var wi=v(ht);d(ut.$$.fragment,wi),wi.forEach(a),ta=o(e),d(ft.$$.fragment,e),na=o(e),d(bt.$$.fragment,e),oa=o(e),Z=l(e,"DIV",{class:!0});var Do=v(Z);d(vt.$$.fragment,Do),Qr=o(Do),Zn=l(Do,"P",{"data-svelte-h":!0}),u(Zn)!=="svelte-16uh3p8"&&(Zn.textContent=Il),Xr=o(Do),d(be.$$.fragment,Do),Do.forEach(a),aa=o(e),d(_t.$$.fragment,e),ra=o(e),X=l(e,"DIV",{class:!0});var Fa=v(X);d($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),d(yt.$$.fragment,e),la=o(e),k=l(e,"DIV",{class:!0});var I=v(k);d(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=ql),ns=o(I),Yn=l(I,"P",{"data-svelte-h":!0}),u(Yn)!=="svelte-10s049q"&&(Yn.innerHTML=Ll),os=o(I),ve=l(I,"DIV",{class:!0});var Ya=v(ve);d(Tt.$$.fragment,Ya),as=o(Ya),Qn=l(Ya,"P",{"data-svelte-h":!0}),u(Qn)!=="svelte-548oc7"&&(Qn.innerHTML=Pl),Ya.forEach(a),rs=o(I),Y=l(I,"DIV",{class:!0});var No=v(Y);d(xt.$$.fragment,No),ss=o(No),Xn=l(No,"P",{"data-svelte-h":!0}),u(Xn)!=="svelte-yy7b2c"&&(Xn.textContent=Jl),ls=o(No),d(_e.$$.fragment,No),No.forEach(a),is=o(I),$e=l(I,"DIV",{class:!0});var Qa=v($e);d(kt.$$.fragment,Qa),ms=o(Qa),Kn=l(Qa,"P",{"data-svelte-h":!0}),u(Kn)!=="svelte-umcuss"&&(Kn.innerHTML=El),Qa.forEach(a),ds=o(I),V=l(I,"DIV",{class:!0});var Ne=v(V);d(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),d(ye.$$.fragment,Ne),Ne.forEach(a),hs=o(I),z=l(I,"DIV",{class:!0});var He=v(z);d(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),bs=o(He),ao=l(He,"P",{"data-svelte-h":!0}),u(ao)!=="svelte-msa4ge"&&(ao.innerHTML=Wl),He.forEach(a),vs=o(I),we=l(I,"DIV",{class:!0});var Xa=v(we);d(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),d(At.$$.fragment,e),ma=o(e),j=l(e,"DIV",{class:!0});var U=v(j);d(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=v(Te);d(qt.$$.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=v(xe);d(Lt.$$.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=v(ke);d(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=v(Ce);d(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=v(Me);d(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),da=o(e),d(Ut.$$.fragment,e),pa=o(e),q=l(e,"DIV",{class:!0});var D=v(q);d(Dt.$$.fragment,D),qs=o(D),go=l(D,"P",{"data-svelte-h":!0}),u(go)!=="svelte-1tqfigx"&&(go.innerHTML=Ol),Ls=o(D),ho=l(D,"UL",{"data-svelte-h":!0}),u(ho)!=="svelte-n6zm2g"&&(ho.innerHTML=Fl),Ps=o(D),Ie=l(D,"DIV",{class:!0});var ar=v(Ie);d(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=v(Ae);d(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=v(je);d(Wt.$$.fragment,sr),Ns=o(sr),bo=l(sr,"P",{"data-svelte-h":!0}),u(bo)!=="svelte-1qgsi13"&&(bo.innerHTML=Xl),sr.forEach(a),Hs=o(D),qe=l(D,"DIV",{class:!0});var lr=v(qe);d(Rt.$$.fragment,lr),Ws=o(lr),vo=l(lr,"P",{"data-svelte-h":!0}),u(vo)!=="svelte-1ojxz66"&&(vo.innerHTML=Kl),lr.forEach(a),D.forEach(a),ca=o(e),d(Vt.$$.fragment,e),ga=o(e),K=l(e,"DIV",{class:!0});var ir=v(K);d(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),d(Bt.$$.fragment,e),ua=o(e),ee=l(e,"DIV",{class:!0});var mr=v(ee);d(St.$$.fragment,mr),Vs=o(mr),$o=l(mr,"P",{"data-svelte-h":!0}),u($o)!=="svelte-3yyclm"&&($o.textContent=ti),mr.forEach(a),fa=o(e),d(Zt.$$.fragment,e),ba=o(e),H=l(e,"DIV",{class:!0});var We=v(H);d(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),d(Le.$$.fragment,We),We.forEach(a),va=o(e),d(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),d(Qt.$$.fragment,e),wa=o(e),Xt=l(e,"P",{"data-svelte-h":!0}),u(Xt)!=="svelte-326rto"&&(Xt.innerHTML=si),Ta=o(e),d(Kt.$$.fragment,e),xa=o(e),te=l(e,"DIV",{class:!0});var dr=v(te);d(en.$$.fragment,dr),Zs=o(dr),To=l(dr,"P",{"data-svelte-h":!0}),u(To)!=="svelte-phvciw"&&(To.textContent=li),dr.forEach(a),ka=o(e),d(tn.$$.fragment,e),Ca=o(e),nn=l(e,"P",{"data-svelte-h":!0}),u(nn)!=="svelte-1korg3b"&&(nn.innerHTML=ii),Ma=o(e),d(on.$$.fragment,e),Ia=o(e),ne=l(e,"DIV",{class:!0});var pr=v(ne);d(an.$$.fragment,pr),Gs=o(pr),xo=l(pr,"P",{"data-svelte-h":!0}),u(xo)!=="svelte-1earq1f"&&(xo.textContent=mi),pr.forEach(a),Aa=o(e),d(rn.$$.fragment,e),ja=o(e),sn=l(e,"P",{"data-svelte-h":!0}),u(sn)!=="svelte-jsq4jz"&&(sn.textContent=di),qa=o(e),ln=l(e,"P",{"data-svelte-h":!0}),u(ln)!=="svelte-1ixcu88"&&(ln.innerHTML=pi),La=o(e),mn=l(e,"P",{"data-svelte-h":!0}),u(mn)!=="svelte-1nfvcwf"&&(mn.textContent=ci),Pa=o(e),dn=l(e,"UL",{"data-svelte-h":!0}),u(dn)!=="svelte-ysem30"&&(dn.innerHTML=gi),Ja=o(e),d(pn.$$.fragment,e),Ea=o(e),oe=l(e,"DIV",{class:!0});var cr=v(oe);d(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),d(gn.$$.fragment,e),Da=o(e),J=l(e,"DIV",{class:!0});var Q=v(J);d(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=v(Pe);d(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=v(Je);d(fn.$$.fragment,hr),Ks=o(hr),Io=l(hr,"P",{"data-svelte-h":!0}),u(Io)!=="svelte-ybie7i"&&(Io.textContent=bi),hr.forEach(a),el=o(Q),Ee=l(Q,"DIV",{class:!0});var ur=v(Ee);d(bn.$$.fragment,ur),tl=o(ur),Ao=l(ur,"P",{"data-svelte-h":!0}),u(Ao)!=="svelte-chc6sp"&&(Ao.textContent=vi),ur.forEach(a),Q.forEach(a),Na=o(e),d(vn.$$.fragment,e),Ha=o(e),W=l(e,"DIV",{class:!0});var Re=v(W);d(_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=v(Ue);d($n.$$.fragment,fr),al=o(fr),qo=l(fr,"P",{"data-svelte-h":!0}),u(qo)!=="svelte-10rnn1x"&&(qo.innerHTML=$i),fr.forEach(a),rl=o(Re),De=l(Re,"DIV",{class:!0});var br=v(De);d(yn.$$.fragment,br),sl=o(br),Lo=l(br,"P",{"data-svelte-h":!0}),u(Lo)!=="svelte-1xu9o93"&&(Lo.textContent=yi),br.forEach(a),Re.forEach(a),Wa=o(e),d(wn.$$.fragment,e),Ra=o(e),Wo=l(e,"P",{}),v(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"),_(de,"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"),_(ve,"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"),_(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(q,"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,b,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,qn),t(P,kr),t(P,le),p(Qe,le,null),t(le,Cr),t(le,Ln),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,qr),t(O,En),t(O,Lr),p(me,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,de),p(at,de,null),t(de,Er),t(de,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(mt,B,null),t(B,Sr),t(B,Vn),t(B,Zr),t(B,ue),p(dt,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(bt,e,r),i(e,oa,r),i(e,Z,r),p(vt,Z,null),t(Z,Qr),t(Z,Zn),t(Z,Xr),p(be,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,ve),p(Tt,ve,null),t(ve,as),t(ve,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,ms),t($e,Kn),t(k,ds),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,bs),t(z,ao),t(k,vs),t(k,we),p(It,we,null),t(we,_s),t(we,ro),i(e,ia,r),p(At,e,r),i(e,ma,r),i(e,j,r),p(jt,j,null),t(j,$s),t(j,so),t(j,ys),t(j,Te),p(qt,Te,null),t(Te,ws),t(Te,lo),t(j,Ts),t(j,xe),p(Lt,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,da,r),p(Ut,e,r),i(e,pa,r),i(e,q,r),p(Dt,q,null),t(q,qs),t(q,go),t(q,Ls),t(q,ho),t(q,Ps),t(q,Ie),p(Nt,Ie,null),t(Ie,Js),t(Ie,uo),t(q,Es),t(q,Ae),p(Ht,Ae,null),t(Ae,Us),t(Ae,fo),t(q,Ds),t(q,je),p(Wt,je,null),t(je,Ns),t(je,bo),t(q,Hs),t(q,qe),p(Rt,qe,null),t(qe,Ws),t(qe,vo),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,ba,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(Le,H,null),i(e,va,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,qa,r),i(e,ln,r),i(e,La,r),i(e,mn,r),i(e,Pa,r),i(e,dn,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(bn,Ee,null),t(Ee,tl),t(Ee,Ao),i(e,Na,r),p(vn,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,qo),t(W,rl),t(W,De),p(yn,De,null),t(De,sl),t(De,Lo),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}),me.$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}),be.$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}),Le.$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(me.$$.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(mt.$$.fragment,e),c(dt.$$.fragment,e),c(pt.$$.fragment,e),c(ct.$$.fragment,e),c(gt.$$.fragment,e),c(ut.$$.fragment,e),c(ft.$$.fragment,e),c(bt.$$.fragment,e),c(vt.$$.fragment,e),c(be.$$.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(qt.$$.fragment,e),c(Lt.$$.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(Le.$$.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(bn.$$.fragment,e),c(vn.$$.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(me.$$.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(mt.$$.fragment,e),g(dt.$$.fragment,e),g(pt.$$.fragment,e),g(ct.$$.fragment,e),g(gt.$$.fragment,e),g(ut.$$.fragment,e),g(ft.$$.fragment,e),g(bt.$$.fragment,e),g(vt.$$.fragment,e),g(be.$$.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(qt.$$.fragment,e),g(Lt.$$.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(Le.$$.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(bn.$$.fragment,e),g(vn.$$.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(b),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(ma),a(j),a(da),a(pa),a(q),a(ca),a(ga),a(K),a(ha),a(ua),a(ee),a(fa),a(ba),a(H),a(va),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(qa),a(ln),a(La),a(mn),a(Pa),a(dn),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(me),h(nt,e),h(ot),h(at),h(rt),h(st),h(lt),h(ge),h(it),h(mt),h(dt),h(pt),h(ct),h(gt,e),h(ut),h(ft,e),h(bt,e),h(vt),h(be),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(qt),h(Lt),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(Le),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(bn),h(vn,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(L){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};
