import{s as il,o as dl,n as rn}from"../chunks/scheduler.25b97de1.js";import{S as cl,i as ml,g as s,s as n,r as d,A as hl,h as l,f as a,c as o,j as _,u as c,x as u,k as v,y as t,a as i,v as m,d as h,t as p,w as g}from"../chunks/index.d9030fc9.js";import{T as ts}from"../chunks/Tip.baa67368.js";import{D as $}from"../chunks/Docstring.e257edda.js";import{C as co}from"../chunks/CodeBlock.e6cd0d95.js";import{E as xa}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as j,E as pl}from"../chunks/EditOnGithub.91d95064.js";function gl(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:rn,d(y){y&&a(f)}}}function ul(L){let f,x="Example:",y,w,T;return w=new co({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5hZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBQeXRob25JbnRlcnByZXRlclRvb2wlMEElMEFweXRob25faW50ZXJwcmV0ZXIlMjAlM0QlMjBQeXRob25JbnRlcnByZXRlclRvb2woKSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCcHl0aG9uX2ludGVycHJldGVyJTVEKSUwQWFnZW50LnJ1biglMjJXaGF0JTIwaXMlMjB0aGUlMjByZXN1bHQlMjBvZiUyMDIlMjBwb3dlciUyMDMuNzM4NCUzRiUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers.agents <span class="hljs-keyword">import</span> CodeAgent, PythonInterpreterTool

python_interpreter = PythonInterpreterTool()
agent = CodeAgent(tools=[python_interpreter])
agent.run(<span class="hljs-string">&quot;What is the result of 2 power 3.7384?&quot;</span>)`,wrap:!1}}),{c(){f=s("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(b){f=l(b,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(b),c(w.$$.fragment,b)},m(b,C){i(b,f,C),i(b,y,C),m(w,b,C),T=!0},p:rn,i(b){T||(h(w.$$.fragment,b),T=!0)},o(b){p(w.$$.fragment,b),T=!1},d(b){b&&(a(f),a(y)),g(w,b)}}}function fl(L){let f,x="Example:",y,w,T;return w=new co({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5hZ2VudHMlMjBpbXBvcnQlMjBSZWFjdEpzb25BZ2VudCUyQyUyMFB5dGhvbkludGVycHJldGVyVG9vbCUwQSUwQXB5dGhvbl9pbnRlcnByZXRlciUyMCUzRCUyMFB5dGhvbkludGVycHJldGVyVG9vbCgpJTBBYWdlbnQlMjAlM0QlMjBSZWFjdEpzb25BZ2VudCh0b29scyUzRCU1QnB5dGhvbl9pbnRlcnByZXRlciU1RCklMEFhZ2VudC5ydW4oJTIyV2hhdCUyMGlzJTIwdGhlJTIwcmVzdWx0JTIwb2YlMjAyJTIwcG93ZXIlMjAzLjczODQlM0YlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers.agents <span class="hljs-keyword">import</span> ReactJsonAgent, PythonInterpreterTool

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>agent.run(<span class="hljs-string">&quot;Please draw me a picture of rivers and lakes.&quot;</span>)`,wrap:!1}}),{c(){f=s("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(b){f=l(b,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(b),c(w.$$.fragment,b)},m(b,C){i(b,f,C),i(b,y,C),m(w,b,C),T=!0},p:rn,i(b){T||(h(w.$$.fragment,b),T=!0)},o(b){p(w.$$.fragment,b),T=!1},d(b){b&&(a(f),a(y)),g(w,b)}}}function yl(L){let f,x,y,w,T,b,C,mo,Je,ns=`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.`,ho,Ee,po,Ne,os='We provide two types of agents, based on the main <a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.Agent">Agent</a> class:',go,He,as='<li><a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.CodeAgent">CodeAgent</a> acts in one shot, generating code to solve the task, then executes it at once.</li> <li><a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.ReactAgent">ReactAgent</a> acts step by step, each step consisting of one thought, then one tool call and execution. It has two classes:<ul><li><a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.ReactJsonAgent">ReactJsonAgent</a> writes its tool calls in JSON.</li> <li><a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.ReactCodeAgent">ReactCodeAgent</a> writes its tool calls in Python code.</li></ul></li>',uo,Ue,fo,q,De,ka,X,Be,Ca,sn,rs=`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.`,Ia,K,We,Aa,ln,ss="Parse action from the LLM output",Ma,ee,Re,ja,dn,ls="To be implemented in the child class",La,te,Se,qa,cn,is=`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.`,bo,Ve,_o,E,ze,Pa,mn,ds="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.",Ja,ne,Oe,Ea,hn,cs=`Override this method if you want to change the way the code is
cleaned in the <code>run</code> method.`,Na,G,Ge,Ha,pn,ms="Runs the agent for the given task.",Ua,oe,vo,Ze,$o,N,Ye,Da,gn,hs=`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.`,Ba,ae,Fe,Wa,un,ps="This method provides a final answer to the task, based on the logs of the agent’s interactions.",Ra,Z,Qe,Sa,fn,gs="Runs the agent for the given task.",Va,re,yo,S,Xe,za,bn,us=`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.`,Oa,se,Ke,Ga,_n,fs=`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.`,wo,V,et,Za,vn,bs=`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.`,Ya,le,tt,Fa,$n,_s=`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.`,To,nt,xo,ot,ko,z,at,Qa,yn,vs="Main function to quickly load a tool, be it on the Hub or in the Transformers library.",Xa,ie,Co,rt,Io,k,st,Ka,wn,$s=`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:`,er,Tn,ys=`<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>`,tr,xn,ws=`You can also override the method <a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.Tool.setup">setup()</a> if your tool as an expensive operation to perform before being
usable (such as loading a model). <a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.Tool.setup">setup()</a> will be called the first time you use your tool, but not at
instantiation.`,nr,de,lt,or,kn,Ts='Creates a <a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.Tool">Tool</a> from a gradio tool.',ar,Y,it,rr,Cn,xs="Loads a tool defined on the Hub.",sr,ce,lr,me,dt,ir,In,ks='Creates a <a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.Tool">Tool</a> from a langchain tool.',dr,W,ct,cr,An,Cs="Upload the tool to the Hub.",mr,Mn,Is="For this method to work properly, your tool must have been defined in a separate module (not <code>__main__</code>).",hr,he,pr,R,mt,gr,jn,As=`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:`,ur,Ln,Ms=`<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>`,fr,qn,js="You should only use this method to save tools that are defined in a separate module (not <code>__main__</code>).",br,pe,ht,_r,Pn,Ls=`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.`,Ao,pt,Mo,A,gt,vr,Jn,qs=`The toolbox contains all tools that the agent can perform operations with, as well as a few methods to
manage them.`,$r,ge,ut,yr,En,Ps="Adds a tool to the toolbox",wr,ue,ft,Tr,Nn,Js="Clears the toolbox",xr,fe,bt,kr,Hn,Es="Removes a tool from the toolbox",Cr,be,_t,Ir,Un,Ns="Returns the description of all tools in the toolbox",Ar,_e,vt,Mr,Dn,Hs="Updates a tool in the toolbox according to its name.",jo,$t,Lo,M,yt,jr,Bn,Us=`A <a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.Tool">Tool</a> tailored towards Transformer models. On top of the class attributes of the base class <a href="/docs/transformers/pr_30929/en/main_classes/agent#transformers.Tool">Tool</a>, you will
need to specify:`,Lr,Wn,Ds=`<li><strong>model_class</strong> (<code>type</code>) — The class to use to load the model in this tool.</li> <li><strong>default_checkpoint</strong> (<code>str</code>) — The default checkpoint that should be used when the user doesn’t specify one.</li> <li><strong>pre_processor_class</strong> (<code>type</code>, <em>optional</em>, defaults to <a href="/docs/transformers/pr_30929/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>) — The class to use to load the
pre-processor</li> <li><strong>post_processor_class</strong> (<code>type</code>, <em>optional</em>, defaults to <a href="/docs/transformers/pr_30929/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>) — The class to use to load the
post-processor (when different from the pre-processor).</li>`,qr,ve,wt,Pr,Rn,Bs="Uses the <code>post_processor</code> to decode the model output.",Jr,$e,Tt,Er,Sn,Ws="Uses the <code>pre_processor</code> to prepare the inputs for the <code>model</code>.",Nr,ye,xt,Hr,Vn,Rs="Sends the inputs through the <code>model</code>.",Ur,we,kt,Dr,zn,Ss="Instantiates the <code>pre_processor</code>, <code>model</code> and <code>post_processor</code> if necessary.",qo,Ct,Po,F,It,Br,On,Vs=`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>.`,Jo,At,Eo,H,Mt,Wr,Gn,zs="Tool collections enable loading all Spaces from a collection in order to be added to the agent’s toolbox.",Rr,Zn,Os=`<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>`,Sr,Te,No,jt,Ho,Lt,Gs=`You’re free to create and use your own engines to be usable by the Agents framework.
These engines have the following specification:`,Uo,qt,Zs='<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>',Do,Pt,Bo,Jt,Ys="For convenience, we have added a <code>HfEngine</code> that implements the points above and uses an inference endpoint for the execution of the LLM.",Wo,Et,Ro,Nt,Ht,So,Ut,Vo,Dt,Fs=`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.`,zo,Bt,Qs=`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>.`,Oo,Wt,Xs="These types have three specific purposes:",Go,Rt,Ks=`<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>`,Zo,St,Yo,Q,Vt,Vr,Yn,el="Text type returned by the agent. Behaves as a string.",Fo,zt,Qo,U,Ot,zr,Fn,tl="Image type returned by the agent. Behaves as a PIL.Image.",Or,xe,Gt,Gr,Qn,nl="Returns the “raw” version of that object. In the case of an AgentImage, it is a PIL.Image.",Zr,ke,Zt,Yr,Xn,ol=`Returns the stringified version of that object. In the case of an AgentImage, it is a path to the serialized
version of the image.`,Xo,Yt,Ko,D,Ft,Fr,Kn,al="Audio type returned by the agent.",Qr,Ce,Qt,Xr,eo,rl="Returns the “raw” version of that object. It is a <code>torch.Tensor</code> object.",Kr,Ie,Xt,es,to,sl=`Returns the stringified version of that object. In the case of an AgentAudio, it is a path to the serialized
version of the audio.`,ea,Kt,ta,io,na;return T=new j({props:{title:"Agents & Tools",local:"agents--tools",headingTag:"h1"}}),C=new ts({props:{warning:!0,$$slots:{default:[gl]},$$scope:{ctx:L}}}),Ee=new j({props:{title:"Agents",local:"agents",headingTag:"h2"}}),Ue=new j({props:{title:"Agent",local:"transformers.Agent",headingTag:"h3"}}),De=new $({props:{name:"class transformers.Agent",anchor:"transformers.Agent",parameters:[{name:"tools",val:": Union"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfEngine object at 0x7f1b79caa620>"},{name:"system_prompt",val:` = 'You will be given a task to solve as best you can. To 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 dictionnary 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": {"text": ""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:" = None"},{name:"additional_args",val:" = {}"},{name:"max_iterations",val:": int = 6"},{name:"tool_parser",val:" = <function parse_json_tool_call at 0x7f1b79ab4ee0>"},{name:"add_base_tools",val:": bool = False"},{name:"verbose",val:": int = 0"},{name:"memory_verbose",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L300"}}),Be=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 (shoulde be one from self.toolbox).",name:"tool_name"},{anchor:"transformers.Agent.execute_tool_call.arguments",description:"<strong>arguments</strong> (Dict[str, str]) &#x2014; Arguments passed to the Tool.",name:"arguments"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L443"}}),We=new $({props:{name:"extract_action",anchor:"transformers.Agent.extract_action",parameters:[{name:"llm_output",val:": str"},{name:"split_token",val:": str"}],parametersDescription:[{anchor:"transformers.Agent.extract_action.llm_output",description:"<strong>llm_output</strong> (<code>str</code>) &#x2014; Output of the LLM",name:"llm_output"},{anchor:"transformers.Agent.extract_action.split_token",description:"<strong>split_token</strong> (<code>str</code>) &#x2014; Separator for the action. Should match the example in the system prompt.",name:"split_token"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L422"}}),Re=new $({props:{name:"run",anchor:"transformers.Agent.run",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L483"}}),Se=new $({props:{name:"write_inner_memory_from_logs",anchor:"transformers.Agent.write_inner_memory_from_logs",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L370"}}),Ve=new j({props:{title:"CodeAgent",local:"transformers.CodeAgent",headingTag:"h3"}}),ze=new $({props:{name:"class transformers.CodeAgent",anchor:"transformers.CodeAgent",parameters:[{name:"tools",val:": List"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfEngine object at 0x7f1b79caa860>"},{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.\\nBe sure to provide a \\\'Code:\\\' token, else the system will be stuck in a loop.\\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\\nI 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)\\nprint(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\\nI 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)\\n```<end_action>\\n\\n---\\nTask: "Generate an image using the text given in the variable `caption`."\\n\\nI will use the following tool: `image_generator` to generate an image.\\nCode:\\n```py\\nimage = image_generator(prompt=caption)\\n```<end_action>\\n\\n---\\nTask: "Summarize the text given in the variable `text` and read it out loud."\\n\\nI 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)\\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\\nI 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)\\n```<end_action>\\n\\n---\\nTask: "Caption the following `image`."\\n\\nI will use the following tool: `image_captioner` to generate a caption for the image.\\nCode:\\n```py\\ncaption = image_captioner(image)\\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'"},{name:"additional_authorized_imports",val:": List = []"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L488"}}),Oe=new $({props:{name:"parse_code_blob",anchor:"transformers.CodeAgent.parse_code_blob",parameters:[{name:"result",val:": str"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L520"}}),Ge=new $({props:{name:"run",anchor:"transformers.CodeAgent.run",parameters:[{name:"task",val:": str"},{name:"return_generated_code",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeAgent.run.task",description:"<strong>task</strong> (<code>str</code>) &#x2014; The task to perform",name:"task"},{anchor:"transformers.CodeAgent.run.return_generated_code",description:"<strong>return_generated_code</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to return the generated code instead of running it",name:"return_generated_code"},{anchor:"transformers.CodeAgent.run.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Any keyword argument to send to the agent when evaluating the code.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L527"}}),oe=new xa({props:{anchor:"transformers.CodeAgent.run.example",$$slots:{default:[ul]},$$scope:{ctx:L}}}),Ze=new j({props:{title:"React agents",local:"transformers.ReactAgent",headingTag:"h3"}}),Ye=new $({props:{name:"class transformers.ReactAgent",anchor:"transformers.ReactAgent",parameters:[{name:"tools",val:": List"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfEngine object at 0x7f1b79caaa10>"},{name:"system_prompt",val:": str = 'You will be given a task to solve as best you can.\\nTo do so, you have been given access to *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.\\n\\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\\n\\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 `search` to get the age of the pope, then raise it to the power 0.36.\\nCode:\\n```py\\npope_age = search(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. You only have acces to those tools:\\n\\n<<tool_descriptions>>\\n\\nYou also can perform computations in the Python code that you generate.\\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 = 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?\")\\'.\\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\\'.\\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'"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L592"}}),Fe=new $({props:{name:"provide_final_answer",anchor:"transformers.ReactAgent.provide_final_answer",parameters:[{name:"task",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L617"}}),Qe=new $({props:{name:"run",anchor:"transformers.ReactAgent.run",parameters:[{name:"task",val:": str"},{name:"stream",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ReactAgent.run.task",description:"<strong>task</strong> (<code>str</code>) &#x2014; The task to perform",name:"task"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L639"}}),re=new xa({props:{anchor:"transformers.ReactAgent.run.example",$$slots:{default:[fl]},$$scope:{ctx:L}}}),Xe=new $({props:{name:"class transformers.ReactJsonAgent",anchor:"transformers.ReactJsonAgent",parameters:[{name:"tools",val:": List"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfEngine object at 0x7f1b79caabc0>"},{name:"system_prompt",val:`: str = 'You will be given a task to solve as best you can. To 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 dictionnary 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": {"text": ""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'"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L716"}}),Ke=new $({props:{name:"step",anchor:"transformers.ReactJsonAgent.step",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L739"}}),et=new $({props:{name:"class transformers.ReactCodeAgent",anchor:"transformers.ReactCodeAgent",parameters:[{name:"tools",val:": List"},{name:"llm_engine",val:": Callable = <transformers.agents.llm_engine.HfEngine object at 0x7f1b79caad70>"},{name:"system_prompt",val:": str = 'You will be given a task to solve as best you can.\\nTo do so, you have been given access to *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.\\n\\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\\n\\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 `search` to get the age of the pope, then raise it to the power 0.36.\\nCode:\\n```py\\npope_age = search(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. You only have acces to those tools:\\n\\n<<tool_descriptions>>\\n\\nYou also can perform computations in the Python code that you generate.\\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 = 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?\")\\'.\\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\\'.\\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'"},{name:"additional_authorized_imports",val:": List = []"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L810"}}),tt=new $({props:{name:"step",anchor:"transformers.ReactCodeAgent.step",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L844"}}),nt=new j({props:{title:"Tools",local:"tools",headingTag:"h2"}}),ot=new j({props:{title:"load_tool",local:"transformers.load_tool",headingTag:"h3"}}),at=new $({props:{name:"transformers.load_tool",anchor:"transformers.load_tool",parameters:[{name:"task_or_repo_id",val:""},{name:"model_repo_id",val:" = None"},{name:"token",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.load_tool.task_or_repo_id",description:`<strong>task_or_repo_id</strong> (<code>str</code>) &#x2014;
The task for which to load the tool or a repo ID of a tool on the Hub. Tasks implemented in Transformers
are:</p>
<ul>
<li><code>&quot;document-question-answering&quot;</code></li>
<li><code>&quot;image-question-answering&quot;</code></li>
<li><code>&quot;speech-to-text&quot;</code></li>
<li><code>&quot;text-to-speech&quot;</code></li>
<li><code>&quot;translation&quot;</code></li>
</ul>`,name:"task_or_repo_id"},{anchor:"transformers.load_tool.model_repo_id",description:`<strong>model_repo_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Use this argument to use a different model than the default one for the tool you selected.`,name:"model_repo_id"},{anchor:"transformers.load_tool.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to identify you on hf.co. If unset, will use the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.load_tool.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Additional keyword arguments that will be split in two: all arguments relevant to the Hub (such as
<code>cache_dir</code>, <code>revision</code>, <code>subfolder</code>) will be used when downloading the files for your tool, and the others
will be passed along to its init.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L661"}}),ie=new ts({props:{warning:!0,$$slots:{default:[bl]},$$scope:{ctx:L}}}),rt=new j({props:{title:"Tool",local:"transformers.Tool",headingTag:"h3"}}),st=new $({props:{name:"class transformers.Tool",anchor:"transformers.Tool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L91"}}),lt=new $({props:{name:"from_gradio",anchor:"transformers.Tool.from_gradio",parameters:[{name:"gradio_tool",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L377"}}),it=new $({props:{name:"from_hub",anchor:"transformers.Tool.from_hub",parameters:[{name:"repo_id",val:": str"},{name:"model_repo_id",val:": Optional = None"},{name:"token",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Tool.from_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repo on the Hub where your tool is defined.`,name:"repo_id"},{anchor:"transformers.Tool.from_hub.model_repo_id",description:`<strong>model_repo_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If your tool uses a model and you want to use a different model than the default, you can pass a second
repo ID or an endpoint url to this argument.`,name:"model_repo_id"},{anchor:"transformers.Tool.from_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to identify you on hf.co. If unset, will use the token generated when running
<code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.Tool.from_hub.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Additional keyword arguments that will be split in two: all arguments relevant to the Hub (such as
<code>cache_dir</code>, <code>revision</code>, <code>subfolder</code>) will be used when downloading the files for your tool, and the
others will be passed along to its init.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L208"}}),ce=new ts({props:{warning:!0,$$slots:{default:[_l]},$$scope:{ctx:L}}}),dt=new $({props:{name:"from_langchain",anchor:"transformers.Tool.from_langchain",parameters:[{name:"langchain_tool",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L399"}}),ct=new $({props:{name:"push_to_hub",anchor:"transformers.Tool.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"commit_message",val:": str = 'Upload tool'"},{name:"private",val:": Optional = None"},{name:"token",val:": Union = None"},{name:"create_pr",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Tool.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your tool to. It should contain your organization name when
pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.Tool.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;Upload tool&quot;</code>) &#x2014;
Message to commit while pushing.`,name:"commit_message"},{anchor:"transformers.Tool.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.Tool.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If unset, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.Tool.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L320"}}),he=new xa({props:{anchor:"transformers.Tool.push_to_hub.example",$$slots:{default:[vl]},$$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/vr_30929/src/transformers/agents/tools.py#L148"}}),ht=new $({props:{name:"setup",anchor:"transformers.Tool.setup",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L141"}}),pt=new j({props:{title:"Toolbox",local:"transformers.Toolbox",headingTag:"h3"}}),gt=new $({props:{name:"class transformers.Toolbox",anchor:"transformers.Toolbox",parameters:[{name:"tools",val:": List"},{name:"add_base_tools",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Toolbox.tools",description:`<strong>tools</strong> (<code>List[Tool]</code>) &#x2014;
The list of tools to instantiate the toolbox with`,name:"tools"},{anchor:"transformers.Toolbox.add_base_tools",description:`<strong>add_base_tools</strong> (<code>bool</code>, defaults to <code>False</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to add the tools available within <code>transformers</code> to the toolbox.`,name:"add_base_tools"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L156"}}),ut=new $({props:{name:"add_tool",anchor:"transformers.Toolbox.add_tool",parameters:[{name:"tool",val:": Tool"}],parametersDescription:[{anchor:"transformers.Toolbox.add_tool.tool",description:`<strong>tool</strong> (<code>Tool</code>) &#x2014;
The tool to add to the toolbox.`,name:"tool"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L202"}}),ft=new $({props:{name:"clear_toolbox",anchor:"transformers.Toolbox.clear_toolbox",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L242"}}),bt=new $({props:{name:"remove_tool",anchor:"transformers.Toolbox.remove_tool",parameters:[{name:"tool_name",val:": str"}],parametersDescription:[{anchor:"transformers.Toolbox.remove_tool.tool_name",description:`<strong>tool_name</strong> (<code>str</code>) &#x2014;
The tool to remove from the toolbox.`,name:"tool_name"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L214"}}),_t=new $({props:{name:"show_tool_descriptions",anchor:"transformers.Toolbox.show_tool_descriptions",parameters:[{name:"tool_description_template",val:": str = None"}],parametersDescription:[{anchor:"transformers.Toolbox.show_tool_descriptions.tool_description_template",description:`<strong>tool_description_template</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The template to use to describe the tools. If not provided, the default template will be used.`,name:"tool_description_template"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L190"}}),vt=new $({props:{name:"update_tool",anchor:"transformers.Toolbox.update_tool",parameters:[{name:"tool",val:": Tool"}],parametersDescription:[{anchor:"transformers.Toolbox.update_tool.tool",description:`<strong>tool</strong> (<code>Tool</code>) &#x2014;
The tool to update to the toolbox.`,name:"tool"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agents.py#L228"}}),$t=new j({props:{title:"PipelineTool",local:"transformers.PipelineTool",headingTag:"h3"}}),yt=new $({props:{name:"class transformers.PipelineTool",anchor:"transformers.PipelineTool",parameters:[{name:"model",val:" = None"},{name:"pre_processor",val:" = None"},{name:"post_processor",val:" = None"},{name:"device",val:" = None"},{name:"device_map",val:" = None"},{name:"model_kwargs",val:" = None"},{name:"token",val:" = None"},{name:"**hub_kwargs",val:""}],parametersDescription:[{anchor:"transformers.PipelineTool.model",description:`<strong>model</strong> (<code>str</code> or <a href="/docs/transformers/pr_30929/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>, <em>optional</em>) &#x2014;
The name of the checkpoint to use for the model, or the instantiated model. If unset, will default to the
value of the class attribute <code>default_checkpoint</code>.`,name:"model"},{anchor:"transformers.PipelineTool.pre_processor",description:`<strong>pre_processor</strong> (<code>str</code> or <code>Any</code>, <em>optional</em>) &#x2014;
The name of the checkpoint to use for the pre-processor, or the instantiated pre-processor (can be a
tokenizer, an image processor, a feature extractor or a processor). Will default to the value of <code>model</code> if
unset.`,name:"pre_processor"},{anchor:"transformers.PipelineTool.post_processor",description:`<strong>post_processor</strong> (<code>str</code> or <code>Any</code>, <em>optional</em>) &#x2014;
The name of the checkpoint to use for the post-processor, or the instantiated pre-processor (can be a
tokenizer, an image processor, a feature extractor or a processor). Will default to the <code>pre_processor</code> if
unset.`,name:"post_processor"},{anchor:"transformers.PipelineTool.device",description:`<strong>device</strong> (<code>int</code>, <code>str</code> or <code>torch.device</code>, <em>optional</em>) &#x2014;
The device on which to execute the model. Will default to any accelerator available (GPU, MPS etc&#x2026;), the
CPU otherwise.`,name:"device"},{anchor:"transformers.PipelineTool.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>dict</code>, <em>optional</em>) &#x2014;
If passed along, will be used to instantiate the model.`,name:"device_map"},{anchor:"transformers.PipelineTool.model_kwargs",description:`<strong>model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Any keyword argument to send to the model instantiation.`,name:"model_kwargs"},{anchor:"transformers.PipelineTool.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If unset, will use the token generated when
running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.PipelineTool.hub_kwargs",description:`<strong>hub_kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Any additional keyword argument to send to the methods that will load the data from the Hub.`,name:"hub_kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L459"}}),wt=new $({props:{name:"decode",anchor:"transformers.PipelineTool.decode",parameters:[{name:"outputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L582"}}),Tt=new $({props:{name:"encode",anchor:"transformers.PipelineTool.encode",parameters:[{name:"raw_inputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L569"}}),xt=new $({props:{name:"forward",anchor:"transformers.PipelineTool.forward",parameters:[{name:"inputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L575"}}),kt=new $({props:{name:"setup",anchor:"transformers.PipelineTool.setup",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L543"}}),Ct=new j({props:{title:"launch_gradio_demo",local:"transformers.launch_gradio_demo",headingTag:"h3"}}),It=new $({props:{name:"transformers.launch_gradio_demo",anchor:"transformers.launch_gradio_demo",parameters:[{name:"tool_class",val:": Tool"}],parametersDescription:[{anchor:"transformers.launch_gradio_demo.tool_class",description:"<strong>tool_class</strong> (<code>type</code>) &#x2014; The class of the tool for which to launch the demo.",name:"tool_class"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L607"}}),At=new j({props:{title:"ToolCollection",local:"transformers.ToolCollection",headingTag:"h3"}}),Mt=new $({props:{name:"class transformers.ToolCollection",anchor:"transformers.ToolCollection",parameters:[{name:"collection_slug",val:": str"},{name:"token",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ToolCollection.collection_slug",description:`<strong>collection_slug</strong> (str) &#x2014;
The collection slug referencing the collection.`,name:"collection_slug"},{anchor:"transformers.ToolCollection.token",description:`<strong>token</strong> (str, <em>optional</em>) &#x2014;
The authentication token if the collection is private.`,name:"token"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/tools.py#L785"}}),Te=new xa({props:{anchor:"transformers.ToolCollection.example",$$slots:{default:[$l]},$$scope:{ctx:L}}}),jt=new j({props:{title:"Engines",local:"engines",headingTag:"h2"}}),Pt=new j({props:{title:"HfEngine",local:"transformers.HfEngine",headingTag:"h3"}}),Et=new co({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEhmRW5naW5lJTBBJTBBbWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJIZWxsbyUyQyUyMGhvdyUyMGFyZSUyMHlvdSUzRiUyMiU3RCUyQyUwQSUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJhc3Npc3RhbnQlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIySSdtJTIwZG9pbmclMjBncmVhdC4lMjBIb3clMjBjYW4lMjBJJTIwaGVscCUyMHlvdSUyMHRvZGF5JTNGJTIyJTdEJTJDJTBBJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyTm8lMjBuZWVkJTIwdG8lMjBoZWxwJTJDJTIwdGFrZSUyMGl0JTIwZWFzeS4lMjIlN0QlMkMlMEElNUQlMEElMEFIZkVuZ2luZSgpKG1lc3NhZ2VzJTJDJTIwc3RvcF9zZXF1ZW5jZXMlM0QlNUIlMjJjb252ZXJzYXRpb24lMjIlNUQpJTBB",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> HfEngine

<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>HfEngine()(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}}),Ht=new $({props:{name:"class transformers.HfEngine",anchor:"transformers.HfEngine",parameters:[{name:"model",val:": str = 'meta-llama/Meta-Llama-3-8B-Instruct'"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/llm_engine.py#L68"}}),Ut=new j({props:{title:"Agent Types",local:"agent-types",headingTag:"h2"}}),St=new j({props:{title:"AgentText",local:"transformers.agents.agent_types.AgentText",headingTag:"h3"}}),Vt=new $({props:{name:"class transformers.agents.agent_types.AgentText",anchor:"transformers.agents.agent_types.AgentText",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agent_types.py#L73"}}),zt=new j({props:{title:"AgentImage",local:"transformers.agents.agent_types.AgentImage",headingTag:"h3"}}),Ot=new $({props:{name:"class transformers.agents.agent_types.AgentImage",anchor:"transformers.agents.agent_types.AgentImage",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agent_types.py#L85"}}),Gt=new $({props:{name:"to_raw",anchor:"transformers.agents.agent_types.AgentImage.to_raw",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agent_types.py#L117"}}),Zt=new $({props:{name:"to_string",anchor:"transformers.agents.agent_types.AgentImage.to_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agent_types.py#L128"}}),Yt=new j({props:{title:"AgentAudio",local:"transformers.agents.agent_types.AgentAudio",headingTag:"h3"}}),Ft=new $({props:{name:"class transformers.agents.agent_types.AgentAudio",anchor:"transformers.agents.agent_types.AgentAudio",parameters:[{name:"value",val:""},{name:"samplerate",val:" = 16000"}],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agent_types.py#L157"}}),Qt=new $({props:{name:"to_raw",anchor:"transformers.agents.agent_types.AgentAudio.to_raw",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agent_types.py#L188"}}),Xt=new $({props:{name:"to_string",anchor:"transformers.agents.agent_types.AgentAudio.to_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30929/src/transformers/agents/agent_types.py#L200"}}),Kt=new pl({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/main_classes/agent.md"}}),{c(){f=s("meta"),x=n(),y=s("p"),w=n(),d(T.$$.fragment),b=n(),d(C.$$.fragment),mo=n(),Je=s("p"),Je.innerHTML=ns,ho=n(),d(Ee.$$.fragment),po=n(),Ne=s("p"),Ne.innerHTML=os,go=n(),He=s("ul"),He.innerHTML=as,uo=n(),d(Ue.$$.fragment),fo=n(),q=s("div"),d(De.$$.fragment),ka=n(),X=s("div"),d(Be.$$.fragment),Ca=n(),sn=s("p"),sn.textContent=rs,Ia=n(),K=s("div"),d(We.$$.fragment),Aa=n(),ln=s("p"),ln.textContent=ss,Ma=n(),ee=s("div"),d(Re.$$.fragment),ja=n(),dn=s("p"),dn.textContent=ls,La=n(),te=s("div"),d(Se.$$.fragment),qa=n(),cn=s("p"),cn.textContent=is,bo=n(),d(Ve.$$.fragment),_o=n(),E=s("div"),d(ze.$$.fragment),Pa=n(),mn=s("p"),mn.textContent=ds,Ja=n(),ne=s("div"),d(Oe.$$.fragment),Ea=n(),hn=s("p"),hn.innerHTML=cs,Na=n(),G=s("div"),d(Ge.$$.fragment),Ha=n(),pn=s("p"),pn.textContent=ms,Ua=n(),d(oe.$$.fragment),vo=n(),d(Ze.$$.fragment),$o=n(),N=s("div"),d(Ye.$$.fragment),Da=n(),gn=s("p"),gn.textContent=hs,Ba=n(),ae=s("div"),d(Fe.$$.fragment),Wa=n(),un=s("p"),un.textContent=ps,Ra=n(),Z=s("div"),d(Qe.$$.fragment),Sa=n(),fn=s("p"),fn.textContent=gs,Va=n(),d(re.$$.fragment),yo=n(),S=s("div"),d(Xe.$$.fragment),za=n(),bn=s("p"),bn.textContent=us,Oa=n(),se=s("div"),d(Ke.$$.fragment),Ga=n(),_n=s("p"),_n.textContent=fs,wo=n(),V=s("div"),d(et.$$.fragment),Za=n(),vn=s("p"),vn.textContent=bs,Ya=n(),le=s("div"),d(tt.$$.fragment),Fa=n(),$n=s("p"),$n.textContent=_s,To=n(),d(nt.$$.fragment),xo=n(),d(ot.$$.fragment),ko=n(),z=s("div"),d(at.$$.fragment),Qa=n(),yn=s("p"),yn.textContent=vs,Xa=n(),d(ie.$$.fragment),Co=n(),d(rt.$$.fragment),Io=n(),k=s("div"),d(st.$$.fragment),Ka=n(),wn=s("p"),wn.innerHTML=$s,er=n(),Tn=s("ul"),Tn.innerHTML=ys,tr=n(),xn=s("p"),xn.innerHTML=ws,nr=n(),de=s("div"),d(lt.$$.fragment),or=n(),kn=s("p"),kn.innerHTML=Ts,ar=n(),Y=s("div"),d(it.$$.fragment),rr=n(),Cn=s("p"),Cn.textContent=xs,sr=n(),d(ce.$$.fragment),lr=n(),me=s("div"),d(dt.$$.fragment),ir=n(),In=s("p"),In.innerHTML=ks,dr=n(),W=s("div"),d(ct.$$.fragment),cr=n(),An=s("p"),An.textContent=Cs,mr=n(),Mn=s("p"),Mn.innerHTML=Is,hr=n(),d(he.$$.fragment),pr=n(),R=s("div"),d(mt.$$.fragment),gr=n(),jn=s("p"),jn.innerHTML=As,ur=n(),Ln=s("ul"),Ln.innerHTML=Ms,fr=n(),qn=s("p"),qn.innerHTML=js,br=n(),pe=s("div"),d(ht.$$.fragment),_r=n(),Pn=s("p"),Pn.textContent=Ls,Ao=n(),d(pt.$$.fragment),Mo=n(),A=s("div"),d(gt.$$.fragment),vr=n(),Jn=s("p"),Jn.textContent=qs,$r=n(),ge=s("div"),d(ut.$$.fragment),yr=n(),En=s("p"),En.textContent=Ps,wr=n(),ue=s("div"),d(ft.$$.fragment),Tr=n(),Nn=s("p"),Nn.textContent=Js,xr=n(),fe=s("div"),d(bt.$$.fragment),kr=n(),Hn=s("p"),Hn.textContent=Es,Cr=n(),be=s("div"),d(_t.$$.fragment),Ir=n(),Un=s("p"),Un.textContent=Ns,Ar=n(),_e=s("div"),d(vt.$$.fragment),Mr=n(),Dn=s("p"),Dn.textContent=Hs,jo=n(),d($t.$$.fragment),Lo=n(),M=s("div"),d(yt.$$.fragment),jr=n(),Bn=s("p"),Bn.innerHTML=Us,Lr=n(),Wn=s("ul"),Wn.innerHTML=Ds,qr=n(),ve=s("div"),d(wt.$$.fragment),Pr=n(),Rn=s("p"),Rn.innerHTML=Bs,Jr=n(),$e=s("div"),d(Tt.$$.fragment),Er=n(),Sn=s("p"),Sn.innerHTML=Ws,Nr=n(),ye=s("div"),d(xt.$$.fragment),Hr=n(),Vn=s("p"),Vn.innerHTML=Rs,Ur=n(),we=s("div"),d(kt.$$.fragment),Dr=n(),zn=s("p"),zn.innerHTML=Ss,qo=n(),d(Ct.$$.fragment),Po=n(),F=s("div"),d(It.$$.fragment),Br=n(),On=s("p"),On.innerHTML=Vs,Jo=n(),d(At.$$.fragment),Eo=n(),H=s("div"),d(Mt.$$.fragment),Wr=n(),Gn=s("p"),Gn.textContent=zs,Rr=n(),Zn=s("blockquote"),Zn.innerHTML=Os,Sr=n(),d(Te.$$.fragment),No=n(),d(jt.$$.fragment),Ho=n(),Lt=s("p"),Lt.textContent=Gs,Uo=n(),qt=s("ol"),qt.innerHTML=Zs,Do=n(),d(Pt.$$.fragment),Bo=n(),Jt=s("p"),Jt.innerHTML=Ys,Wo=n(),d(Et.$$.fragment),Ro=n(),Nt=s("div"),d(Ht.$$.fragment),So=n(),d(Ut.$$.fragment),Vo=n(),Dt=s("p"),Dt.textContent=Fs,zo=n(),Bt=s("p"),Bt.innerHTML=Qs,Oo=n(),Wt=s("p"),Wt.textContent=Xs,Go=n(),Rt=s("ul"),Rt.innerHTML=Ks,Zo=n(),d(St.$$.fragment),Yo=n(),Q=s("div"),d(Vt.$$.fragment),Vr=n(),Yn=s("p"),Yn.textContent=el,Fo=n(),d(zt.$$.fragment),Qo=n(),U=s("div"),d(Ot.$$.fragment),zr=n(),Fn=s("p"),Fn.textContent=tl,Or=n(),xe=s("div"),d(Gt.$$.fragment),Gr=n(),Qn=s("p"),Qn.textContent=nl,Zr=n(),ke=s("div"),d(Zt.$$.fragment),Yr=n(),Xn=s("p"),Xn.textContent=ol,Xo=n(),d(Yt.$$.fragment),Ko=n(),D=s("div"),d(Ft.$$.fragment),Fr=n(),Kn=s("p"),Kn.textContent=al,Qr=n(),Ce=s("div"),d(Qt.$$.fragment),Xr=n(),eo=s("p"),eo.innerHTML=rl,Kr=n(),Ie=s("div"),d(Xt.$$.fragment),es=n(),to=s("p"),to.textContent=sl,ea=n(),d(Kt.$$.fragment),ta=n(),io=s("p"),this.h()},l(e){const r=hl("svelte-u9bgzb",document.head);f=l(r,"META",{name:!0,content:!0}),r.forEach(a),x=o(e),y=l(e,"P",{}),_(y).forEach(a),w=o(e),c(T.$$.fragment,e),b=o(e),c(C.$$.fragment,e),mo=o(e),Je=l(e,"P",{"data-svelte-h":!0}),u(Je)!=="svelte-7mj07q"&&(Je.innerHTML=ns),ho=o(e),c(Ee.$$.fragment,e),po=o(e),Ne=l(e,"P",{"data-svelte-h":!0}),u(Ne)!=="svelte-z4hm2a"&&(Ne.innerHTML=os),go=o(e),He=l(e,"UL",{"data-svelte-h":!0}),u(He)!=="svelte-y0d098"&&(He.innerHTML=as),uo=o(e),c(Ue.$$.fragment,e),fo=o(e),q=l(e,"DIV",{class:!0});var B=_(q);c(De.$$.fragment,B),ka=o(B),X=l(B,"DIV",{class:!0});var en=_(X);c(Be.$$.fragment,en),Ca=o(en),sn=l(en,"P",{"data-svelte-h":!0}),u(sn)!=="svelte-a91m64"&&(sn.textContent=rs),en.forEach(a),Ia=o(B),K=l(B,"DIV",{class:!0});var tn=_(K);c(We.$$.fragment,tn),Aa=o(tn),ln=l(tn,"P",{"data-svelte-h":!0}),u(ln)!=="svelte-104knry"&&(ln.textContent=ss),tn.forEach(a),Ma=o(B),ee=l(B,"DIV",{class:!0});var nn=_(ee);c(Re.$$.fragment,nn),ja=o(nn),dn=l(nn,"P",{"data-svelte-h":!0}),u(dn)!=="svelte-wvvftk"&&(dn.textContent=ls),nn.forEach(a),La=o(B),te=l(B,"DIV",{class:!0});var on=_(te);c(Se.$$.fragment,on),qa=o(on),cn=l(on,"P",{"data-svelte-h":!0}),u(cn)!=="svelte-1cw6633"&&(cn.textContent=is),on.forEach(a),B.forEach(a),bo=o(e),c(Ve.$$.fragment,e),_o=o(e),E=l(e,"DIV",{class:!0});var O=_(E);c(ze.$$.fragment,O),Pa=o(O),mn=l(O,"P",{"data-svelte-h":!0}),u(mn)!=="svelte-rq8zg0"&&(mn.textContent=ds),Ja=o(O),ne=l(O,"DIV",{class:!0});var an=_(ne);c(Oe.$$.fragment,an),Ea=o(an),hn=l(an,"P",{"data-svelte-h":!0}),u(hn)!=="svelte-tvi94l"&&(hn.innerHTML=cs),an.forEach(a),Na=o(O),G=l(O,"DIV",{class:!0});var no=_(G);c(Ge.$$.fragment,no),Ha=o(no),pn=l(no,"P",{"data-svelte-h":!0}),u(pn)!=="svelte-tbr5ck"&&(pn.textContent=ms),Ua=o(no),c(oe.$$.fragment,no),no.forEach(a),O.forEach(a),vo=o(e),c(Ze.$$.fragment,e),$o=o(e),N=l(e,"DIV",{class:!0});var Ae=_(N);c(Ye.$$.fragment,Ae),Da=o(Ae),gn=l(Ae,"P",{"data-svelte-h":!0}),u(gn)!=="svelte-c95fji"&&(gn.textContent=hs),Ba=o(Ae),ae=l(Ae,"DIV",{class:!0});var oa=_(ae);c(Fe.$$.fragment,oa),Wa=o(oa),un=l(oa,"P",{"data-svelte-h":!0}),u(un)!=="svelte-1ii4mb"&&(un.textContent=ps),oa.forEach(a),Ra=o(Ae),Z=l(Ae,"DIV",{class:!0});var oo=_(Z);c(Qe.$$.fragment,oo),Sa=o(oo),fn=l(oo,"P",{"data-svelte-h":!0}),u(fn)!=="svelte-tbr5ck"&&(fn.textContent=gs),Va=o(oo),c(re.$$.fragment,oo),oo.forEach(a),Ae.forEach(a),yo=o(e),S=l(e,"DIV",{class:!0});var ao=_(S);c(Xe.$$.fragment,ao),za=o(ao),bn=l(ao,"P",{"data-svelte-h":!0}),u(bn)!=="svelte-1ip7q5f"&&(bn.textContent=us),Oa=o(ao),se=l(ao,"DIV",{class:!0});var aa=_(se);c(Ke.$$.fragment,aa),Ga=o(aa),_n=l(aa,"P",{"data-svelte-h":!0}),u(_n)!=="svelte-1bbx2c8"&&(_n.textContent=fs),aa.forEach(a),ao.forEach(a),wo=o(e),V=l(e,"DIV",{class:!0});var ro=_(V);c(et.$$.fragment,ro),Za=o(ro),vn=l(ro,"P",{"data-svelte-h":!0}),u(vn)!=="svelte-1egm30q"&&(vn.textContent=bs),Ya=o(ro),le=l(ro,"DIV",{class:!0});var ra=_(le);c(tt.$$.fragment,ra),Fa=o(ra),$n=l(ra,"P",{"data-svelte-h":!0}),u($n)!=="svelte-1bbx2c8"&&($n.textContent=_s),ra.forEach(a),ro.forEach(a),To=o(e),c(nt.$$.fragment,e),xo=o(e),c(ot.$$.fragment,e),ko=o(e),z=l(e,"DIV",{class:!0});var so=_(z);c(at.$$.fragment,so),Qa=o(so),yn=l(so,"P",{"data-svelte-h":!0}),u(yn)!=="svelte-16uh3p8"&&(yn.textContent=vs),Xa=o(so),c(ie.$$.fragment,so),so.forEach(a),Co=o(e),c(rt.$$.fragment,e),Io=o(e),k=l(e,"DIV",{class:!0});var I=_(k);c(st.$$.fragment,I),Ka=o(I),wn=l(I,"P",{"data-svelte-h":!0}),u(wn)!=="svelte-cca4c5"&&(wn.innerHTML=$s),er=o(I),Tn=l(I,"UL",{"data-svelte-h":!0}),u(Tn)!=="svelte-1cvtzkm"&&(Tn.innerHTML=ys),tr=o(I),xn=l(I,"P",{"data-svelte-h":!0}),u(xn)!=="svelte-jgfzlu"&&(xn.innerHTML=ws),nr=o(I),de=l(I,"DIV",{class:!0});var sa=_(de);c(lt.$$.fragment,sa),or=o(sa),kn=l(sa,"P",{"data-svelte-h":!0}),u(kn)!=="svelte-g34uhe"&&(kn.innerHTML=Ts),sa.forEach(a),ar=o(I),Y=l(I,"DIV",{class:!0});var lo=_(Y);c(it.$$.fragment,lo),rr=o(lo),Cn=l(lo,"P",{"data-svelte-h":!0}),u(Cn)!=="svelte-yy7b2c"&&(Cn.textContent=xs),sr=o(lo),c(ce.$$.fragment,lo),lo.forEach(a),lr=o(I),me=l(I,"DIV",{class:!0});var la=_(me);c(dt.$$.fragment,la),ir=o(la),In=l(la,"P",{"data-svelte-h":!0}),u(In)!=="svelte-17r7ecp"&&(In.innerHTML=ks),la.forEach(a),dr=o(I),W=l(I,"DIV",{class:!0});var Me=_(W);c(ct.$$.fragment,Me),cr=o(Me),An=l(Me,"P",{"data-svelte-h":!0}),u(An)!=="svelte-1u3gku9"&&(An.textContent=Cs),mr=o(Me),Mn=l(Me,"P",{"data-svelte-h":!0}),u(Mn)!=="svelte-1yeagwn"&&(Mn.innerHTML=Is),hr=o(Me),c(he.$$.fragment,Me),Me.forEach(a),pr=o(I),R=l(I,"DIV",{class:!0});var je=_(R);c(mt.$$.fragment,je),gr=o(je),jn=l(je,"P",{"data-svelte-h":!0}),u(jn)!=="svelte-19evuwa"&&(jn.innerHTML=As),ur=o(je),Ln=l(je,"UL",{"data-svelte-h":!0}),u(Ln)!=="svelte-15of9ze"&&(Ln.innerHTML=Ms),fr=o(je),qn=l(je,"P",{"data-svelte-h":!0}),u(qn)!=="svelte-msa4ge"&&(qn.innerHTML=js),je.forEach(a),br=o(I),pe=l(I,"DIV",{class:!0});var ia=_(pe);c(ht.$$.fragment,ia),_r=o(ia),Pn=l(ia,"P",{"data-svelte-h":!0}),u(Pn)!=="svelte-63kthh"&&(Pn.textContent=Ls),ia.forEach(a),I.forEach(a),Ao=o(e),c(pt.$$.fragment,e),Mo=o(e),A=l(e,"DIV",{class:!0});var P=_(A);c(gt.$$.fragment,P),vr=o(P),Jn=l(P,"P",{"data-svelte-h":!0}),u(Jn)!=="svelte-1jgzyq0"&&(Jn.textContent=qs),$r=o(P),ge=l(P,"DIV",{class:!0});var da=_(ge);c(ut.$$.fragment,da),yr=o(da),En=l(da,"P",{"data-svelte-h":!0}),u(En)!=="svelte-g8q0nk"&&(En.textContent=Ps),da.forEach(a),wr=o(P),ue=l(P,"DIV",{class:!0});var ca=_(ue);c(ft.$$.fragment,ca),Tr=o(ca),Nn=l(ca,"P",{"data-svelte-h":!0}),u(Nn)!=="svelte-1l2znf2"&&(Nn.textContent=Js),ca.forEach(a),xr=o(P),fe=l(P,"DIV",{class:!0});var ma=_(fe);c(bt.$$.fragment,ma),kr=o(ma),Hn=l(ma,"P",{"data-svelte-h":!0}),u(Hn)!=="svelte-165lhg0"&&(Hn.textContent=Es),ma.forEach(a),Cr=o(P),be=l(P,"DIV",{class:!0});var ha=_(be);c(_t.$$.fragment,ha),Ir=o(ha),Un=l(ha,"P",{"data-svelte-h":!0}),u(Un)!=="svelte-15vkk0u"&&(Un.textContent=Ns),ha.forEach(a),Ar=o(P),_e=l(P,"DIV",{class:!0});var pa=_(_e);c(vt.$$.fragment,pa),Mr=o(pa),Dn=l(pa,"P",{"data-svelte-h":!0}),u(Dn)!=="svelte-1p64qrs"&&(Dn.textContent=Hs),pa.forEach(a),P.forEach(a),jo=o(e),c($t.$$.fragment,e),Lo=o(e),M=l(e,"DIV",{class:!0});var J=_(M);c(yt.$$.fragment,J),jr=o(J),Bn=l(J,"P",{"data-svelte-h":!0}),u(Bn)!=="svelte-8vv8r5"&&(Bn.innerHTML=Us),Lr=o(J),Wn=l(J,"UL",{"data-svelte-h":!0}),u(Wn)!=="svelte-119pwrg"&&(Wn.innerHTML=Ds),qr=o(J),ve=l(J,"DIV",{class:!0});var ga=_(ve);c(wt.$$.fragment,ga),Pr=o(ga),Rn=l(ga,"P",{"data-svelte-h":!0}),u(Rn)!=="svelte-zkjq4t"&&(Rn.innerHTML=Bs),ga.forEach(a),Jr=o(J),$e=l(J,"DIV",{class:!0});var ua=_($e);c(Tt.$$.fragment,ua),Er=o(ua),Sn=l(ua,"P",{"data-svelte-h":!0}),u(Sn)!=="svelte-1vxzk80"&&(Sn.innerHTML=Ws),ua.forEach(a),Nr=o(J),ye=l(J,"DIV",{class:!0});var fa=_(ye);c(xt.$$.fragment,fa),Hr=o(fa),Vn=l(fa,"P",{"data-svelte-h":!0}),u(Vn)!=="svelte-1qgsi13"&&(Vn.innerHTML=Rs),fa.forEach(a),Ur=o(J),we=l(J,"DIV",{class:!0});var ba=_(we);c(kt.$$.fragment,ba),Dr=o(ba),zn=l(ba,"P",{"data-svelte-h":!0}),u(zn)!=="svelte-1ojxz66"&&(zn.innerHTML=Ss),ba.forEach(a),J.forEach(a),qo=o(e),c(Ct.$$.fragment,e),Po=o(e),F=l(e,"DIV",{class:!0});var _a=_(F);c(It.$$.fragment,_a),Br=o(_a),On=l(_a,"P",{"data-svelte-h":!0}),u(On)!=="svelte-j4u4it"&&(On.innerHTML=Vs),_a.forEach(a),Jo=o(e),c(At.$$.fragment,e),Eo=o(e),H=l(e,"DIV",{class:!0});var Le=_(H);c(Mt.$$.fragment,Le),Wr=o(Le),Gn=l(Le,"P",{"data-svelte-h":!0}),u(Gn)!=="svelte-n5kqzu"&&(Gn.textContent=zs),Rr=o(Le),Zn=l(Le,"BLOCKQUOTE",{"data-svelte-h":!0}),u(Zn)!=="svelte-1ezz2hf"&&(Zn.innerHTML=Os),Sr=o(Le),c(Te.$$.fragment,Le),Le.forEach(a),No=o(e),c(jt.$$.fragment,e),Ho=o(e),Lt=l(e,"P",{"data-svelte-h":!0}),u(Lt)!=="svelte-oor881"&&(Lt.textContent=Gs),Uo=o(e),qt=l(e,"OL",{"data-svelte-h":!0}),u(qt)!=="svelte-1fvckr8"&&(qt.innerHTML=Zs),Do=o(e),c(Pt.$$.fragment,e),Bo=o(e),Jt=l(e,"P",{"data-svelte-h":!0}),u(Jt)!=="svelte-1helv3l"&&(Jt.innerHTML=Ys),Wo=o(e),c(Et.$$.fragment,e),Ro=o(e),Nt=l(e,"DIV",{class:!0});var ll=_(Nt);c(Ht.$$.fragment,ll),ll.forEach(a),So=o(e),c(Ut.$$.fragment,e),Vo=o(e),Dt=l(e,"P",{"data-svelte-h":!0}),u(Dt)!=="svelte-jsq4jz"&&(Dt.textContent=Fs),zo=o(e),Bt=l(e,"P",{"data-svelte-h":!0}),u(Bt)!=="svelte-1ixcu88"&&(Bt.innerHTML=Qs),Oo=o(e),Wt=l(e,"P",{"data-svelte-h":!0}),u(Wt)!=="svelte-1nfvcwf"&&(Wt.textContent=Xs),Go=o(e),Rt=l(e,"UL",{"data-svelte-h":!0}),u(Rt)!=="svelte-ysem30"&&(Rt.innerHTML=Ks),Zo=o(e),c(St.$$.fragment,e),Yo=o(e),Q=l(e,"DIV",{class:!0});var va=_(Q);c(Vt.$$.fragment,va),Vr=o(va),Yn=l(va,"P",{"data-svelte-h":!0}),u(Yn)!=="svelte-57fhj7"&&(Yn.textContent=el),va.forEach(a),Fo=o(e),c(zt.$$.fragment,e),Qo=o(e),U=l(e,"DIV",{class:!0});var qe=_(U);c(Ot.$$.fragment,qe),zr=o(qe),Fn=l(qe,"P",{"data-svelte-h":!0}),u(Fn)!=="svelte-1hsb0qs"&&(Fn.textContent=tl),Or=o(qe),xe=l(qe,"DIV",{class:!0});var $a=_(xe);c(Gt.$$.fragment,$a),Gr=o($a),Qn=l($a,"P",{"data-svelte-h":!0}),u(Qn)!=="svelte-ybie7i"&&(Qn.textContent=nl),$a.forEach(a),Zr=o(qe),ke=l(qe,"DIV",{class:!0});var ya=_(ke);c(Zt.$$.fragment,ya),Yr=o(ya),Xn=l(ya,"P",{"data-svelte-h":!0}),u(Xn)!=="svelte-chc6sp"&&(Xn.textContent=ol),ya.forEach(a),qe.forEach(a),Xo=o(e),c(Yt.$$.fragment,e),Ko=o(e),D=l(e,"DIV",{class:!0});var Pe=_(D);c(Ft.$$.fragment,Pe),Fr=o(Pe),Kn=l(Pe,"P",{"data-svelte-h":!0}),u(Kn)!=="svelte-ckiqb6"&&(Kn.textContent=al),Qr=o(Pe),Ce=l(Pe,"DIV",{class:!0});var wa=_(Ce);c(Qt.$$.fragment,wa),Xr=o(wa),eo=l(wa,"P",{"data-svelte-h":!0}),u(eo)!=="svelte-10rnn1x"&&(eo.innerHTML=rl),wa.forEach(a),Kr=o(Pe),Ie=l(Pe,"DIV",{class:!0});var Ta=_(Ie);c(Xt.$$.fragment,Ta),es=o(Ta),to=l(Ta,"P",{"data-svelte-h":!0}),u(to)!=="svelte-1xu9o93"&&(to.textContent=sl),Ta.forEach(a),Pe.forEach(a),ea=o(e),c(Kt.$$.fragment,e),ta=o(e),io=l(e,"P",{}),_(io).forEach(a),this.h()},h(){v(f,"name","hf:doc:metadata"),v(f,"content",wl),v(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(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(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(_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(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v($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(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(D,"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),m(T,e,r),i(e,b,r),m(C,e,r),i(e,mo,r),i(e,Je,r),i(e,ho,r),m(Ee,e,r),i(e,po,r),i(e,Ne,r),i(e,go,r),i(e,He,r),i(e,uo,r),m(Ue,e,r),i(e,fo,r),i(e,q,r),m(De,q,null),t(q,ka),t(q,X),m(Be,X,null),t(X,Ca),t(X,sn),t(q,Ia),t(q,K),m(We,K,null),t(K,Aa),t(K,ln),t(q,Ma),t(q,ee),m(Re,ee,null),t(ee,ja),t(ee,dn),t(q,La),t(q,te),m(Se,te,null),t(te,qa),t(te,cn),i(e,bo,r),m(Ve,e,r),i(e,_o,r),i(e,E,r),m(ze,E,null),t(E,Pa),t(E,mn),t(E,Ja),t(E,ne),m(Oe,ne,null),t(ne,Ea),t(ne,hn),t(E,Na),t(E,G),m(Ge,G,null),t(G,Ha),t(G,pn),t(G,Ua),m(oe,G,null),i(e,vo,r),m(Ze,e,r),i(e,$o,r),i(e,N,r),m(Ye,N,null),t(N,Da),t(N,gn),t(N,Ba),t(N,ae),m(Fe,ae,null),t(ae,Wa),t(ae,un),t(N,Ra),t(N,Z),m(Qe,Z,null),t(Z,Sa),t(Z,fn),t(Z,Va),m(re,Z,null),i(e,yo,r),i(e,S,r),m(Xe,S,null),t(S,za),t(S,bn),t(S,Oa),t(S,se),m(Ke,se,null),t(se,Ga),t(se,_n),i(e,wo,r),i(e,V,r),m(et,V,null),t(V,Za),t(V,vn),t(V,Ya),t(V,le),m(tt,le,null),t(le,Fa),t(le,$n),i(e,To,r),m(nt,e,r),i(e,xo,r),m(ot,e,r),i(e,ko,r),i(e,z,r),m(at,z,null),t(z,Qa),t(z,yn),t(z,Xa),m(ie,z,null),i(e,Co,r),m(rt,e,r),i(e,Io,r),i(e,k,r),m(st,k,null),t(k,Ka),t(k,wn),t(k,er),t(k,Tn),t(k,tr),t(k,xn),t(k,nr),t(k,de),m(lt,de,null),t(de,or),t(de,kn),t(k,ar),t(k,Y),m(it,Y,null),t(Y,rr),t(Y,Cn),t(Y,sr),m(ce,Y,null),t(k,lr),t(k,me),m(dt,me,null),t(me,ir),t(me,In),t(k,dr),t(k,W),m(ct,W,null),t(W,cr),t(W,An),t(W,mr),t(W,Mn),t(W,hr),m(he,W,null),t(k,pr),t(k,R),m(mt,R,null),t(R,gr),t(R,jn),t(R,ur),t(R,Ln),t(R,fr),t(R,qn),t(k,br),t(k,pe),m(ht,pe,null),t(pe,_r),t(pe,Pn),i(e,Ao,r),m(pt,e,r),i(e,Mo,r),i(e,A,r),m(gt,A,null),t(A,vr),t(A,Jn),t(A,$r),t(A,ge),m(ut,ge,null),t(ge,yr),t(ge,En),t(A,wr),t(A,ue),m(ft,ue,null),t(ue,Tr),t(ue,Nn),t(A,xr),t(A,fe),m(bt,fe,null),t(fe,kr),t(fe,Hn),t(A,Cr),t(A,be),m(_t,be,null),t(be,Ir),t(be,Un),t(A,Ar),t(A,_e),m(vt,_e,null),t(_e,Mr),t(_e,Dn),i(e,jo,r),m($t,e,r),i(e,Lo,r),i(e,M,r),m(yt,M,null),t(M,jr),t(M,Bn),t(M,Lr),t(M,Wn),t(M,qr),t(M,ve),m(wt,ve,null),t(ve,Pr),t(ve,Rn),t(M,Jr),t(M,$e),m(Tt,$e,null),t($e,Er),t($e,Sn),t(M,Nr),t(M,ye),m(xt,ye,null),t(ye,Hr),t(ye,Vn),t(M,Ur),t(M,we),m(kt,we,null),t(we,Dr),t(we,zn),i(e,qo,r),m(Ct,e,r),i(e,Po,r),i(e,F,r),m(It,F,null),t(F,Br),t(F,On),i(e,Jo,r),m(At,e,r),i(e,Eo,r),i(e,H,r),m(Mt,H,null),t(H,Wr),t(H,Gn),t(H,Rr),t(H,Zn),t(H,Sr),m(Te,H,null),i(e,No,r),m(jt,e,r),i(e,Ho,r),i(e,Lt,r),i(e,Uo,r),i(e,qt,r),i(e,Do,r),m(Pt,e,r),i(e,Bo,r),i(e,Jt,r),i(e,Wo,r),m(Et,e,r),i(e,Ro,r),i(e,Nt,r),m(Ht,Nt,null),i(e,So,r),m(Ut,e,r),i(e,Vo,r),i(e,Dt,r),i(e,zo,r),i(e,Bt,r),i(e,Oo,r),i(e,Wt,r),i(e,Go,r),i(e,Rt,r),i(e,Zo,r),m(St,e,r),i(e,Yo,r),i(e,Q,r),m(Vt,Q,null),t(Q,Vr),t(Q,Yn),i(e,Fo,r),m(zt,e,r),i(e,Qo,r),i(e,U,r),m(Ot,U,null),t(U,zr),t(U,Fn),t(U,Or),t(U,xe),m(Gt,xe,null),t(xe,Gr),t(xe,Qn),t(U,Zr),t(U,ke),m(Zt,ke,null),t(ke,Yr),t(ke,Xn),i(e,Xo,r),m(Yt,e,r),i(e,Ko,r),i(e,D,r),m(Ft,D,null),t(D,Fr),t(D,Kn),t(D,Qr),t(D,Ce),m(Qt,Ce,null),t(Ce,Xr),t(Ce,eo),t(D,Kr),t(D,Ie),m(Xt,Ie,null),t(Ie,es),t(Ie,to),i(e,ea,r),m(Kt,e,r),i(e,ta,r),i(e,io,r),na=!0},p(e,[r]){const B={};r&2&&(B.$$scope={dirty:r,ctx:e}),C.$set(B);const en={};r&2&&(en.$$scope={dirty:r,ctx:e}),oe.$set(en);const tn={};r&2&&(tn.$$scope={dirty:r,ctx:e}),re.$set(tn);const nn={};r&2&&(nn.$$scope={dirty:r,ctx:e}),ie.$set(nn);const on={};r&2&&(on.$$scope={dirty:r,ctx:e}),ce.$set(on);const O={};r&2&&(O.$$scope={dirty:r,ctx:e}),he.$set(O);const an={};r&2&&(an.$$scope={dirty:r,ctx:e}),Te.$set(an)},i(e){na||(h(T.$$.fragment,e),h(C.$$.fragment,e),h(Ee.$$.fragment,e),h(Ue.$$.fragment,e),h(De.$$.fragment,e),h(Be.$$.fragment,e),h(We.$$.fragment,e),h(Re.$$.fragment,e),h(Se.$$.fragment,e),h(Ve.$$.fragment,e),h(ze.$$.fragment,e),h(Oe.$$.fragment,e),h(Ge.$$.fragment,e),h(oe.$$.fragment,e),h(Ze.$$.fragment,e),h(Ye.$$.fragment,e),h(Fe.$$.fragment,e),h(Qe.$$.fragment,e),h(re.$$.fragment,e),h(Xe.$$.fragment,e),h(Ke.$$.fragment,e),h(et.$$.fragment,e),h(tt.$$.fragment,e),h(nt.$$.fragment,e),h(ot.$$.fragment,e),h(at.$$.fragment,e),h(ie.$$.fragment,e),h(rt.$$.fragment,e),h(st.$$.fragment,e),h(lt.$$.fragment,e),h(it.$$.fragment,e),h(ce.$$.fragment,e),h(dt.$$.fragment,e),h(ct.$$.fragment,e),h(he.$$.fragment,e),h(mt.$$.fragment,e),h(ht.$$.fragment,e),h(pt.$$.fragment,e),h(gt.$$.fragment,e),h(ut.$$.fragment,e),h(ft.$$.fragment,e),h(bt.$$.fragment,e),h(_t.$$.fragment,e),h(vt.$$.fragment,e),h($t.$$.fragment,e),h(yt.$$.fragment,e),h(wt.$$.fragment,e),h(Tt.$$.fragment,e),h(xt.$$.fragment,e),h(kt.$$.fragment,e),h(Ct.$$.fragment,e),h(It.$$.fragment,e),h(At.$$.fragment,e),h(Mt.$$.fragment,e),h(Te.$$.fragment,e),h(jt.$$.fragment,e),h(Pt.$$.fragment,e),h(Et.$$.fragment,e),h(Ht.$$.fragment,e),h(Ut.$$.fragment,e),h(St.$$.fragment,e),h(Vt.$$.fragment,e),h(zt.$$.fragment,e),h(Ot.$$.fragment,e),h(Gt.$$.fragment,e),h(Zt.$$.fragment,e),h(Yt.$$.fragment,e),h(Ft.$$.fragment,e),h(Qt.$$.fragment,e),h(Xt.$$.fragment,e),h(Kt.$$.fragment,e),na=!0)},o(e){p(T.$$.fragment,e),p(C.$$.fragment,e),p(Ee.$$.fragment,e),p(Ue.$$.fragment,e),p(De.$$.fragment,e),p(Be.$$.fragment,e),p(We.$$.fragment,e),p(Re.$$.fragment,e),p(Se.$$.fragment,e),p(Ve.$$.fragment,e),p(ze.$$.fragment,e),p(Oe.$$.fragment,e),p(Ge.$$.fragment,e),p(oe.$$.fragment,e),p(Ze.$$.fragment,e),p(Ye.$$.fragment,e),p(Fe.$$.fragment,e),p(Qe.$$.fragment,e),p(re.$$.fragment,e),p(Xe.$$.fragment,e),p(Ke.$$.fragment,e),p(et.$$.fragment,e),p(tt.$$.fragment,e),p(nt.$$.fragment,e),p(ot.$$.fragment,e),p(at.$$.fragment,e),p(ie.$$.fragment,e),p(rt.$$.fragment,e),p(st.$$.fragment,e),p(lt.$$.fragment,e),p(it.$$.fragment,e),p(ce.$$.fragment,e),p(dt.$$.fragment,e),p(ct.$$.fragment,e),p(he.$$.fragment,e),p(mt.$$.fragment,e),p(ht.$$.fragment,e),p(pt.$$.fragment,e),p(gt.$$.fragment,e),p(ut.$$.fragment,e),p(ft.$$.fragment,e),p(bt.$$.fragment,e),p(_t.$$.fragment,e),p(vt.$$.fragment,e),p($t.$$.fragment,e),p(yt.$$.fragment,e),p(wt.$$.fragment,e),p(Tt.$$.fragment,e),p(xt.$$.fragment,e),p(kt.$$.fragment,e),p(Ct.$$.fragment,e),p(It.$$.fragment,e),p(At.$$.fragment,e),p(Mt.$$.fragment,e),p(Te.$$.fragment,e),p(jt.$$.fragment,e),p(Pt.$$.fragment,e),p(Et.$$.fragment,e),p(Ht.$$.fragment,e),p(Ut.$$.fragment,e),p(St.$$.fragment,e),p(Vt.$$.fragment,e),p(zt.$$.fragment,e),p(Ot.$$.fragment,e),p(Gt.$$.fragment,e),p(Zt.$$.fragment,e),p(Yt.$$.fragment,e),p(Ft.$$.fragment,e),p(Qt.$$.fragment,e),p(Xt.$$.fragment,e),p(Kt.$$.fragment,e),na=!1},d(e){e&&(a(x),a(y),a(w),a(b),a(mo),a(Je),a(ho),a(po),a(Ne),a(go),a(He),a(uo),a(fo),a(q),a(bo),a(_o),a(E),a(vo),a($o),a(N),a(yo),a(S),a(wo),a(V),a(To),a(xo),a(ko),a(z),a(Co),a(Io),a(k),a(Ao),a(Mo),a(A),a(jo),a(Lo),a(M),a(qo),a(Po),a(F),a(Jo),a(Eo),a(H),a(No),a(Ho),a(Lt),a(Uo),a(qt),a(Do),a(Bo),a(Jt),a(Wo),a(Ro),a(Nt),a(So),a(Vo),a(Dt),a(zo),a(Bt),a(Oo),a(Wt),a(Go),a(Rt),a(Zo),a(Yo),a(Q),a(Fo),a(Qo),a(U),a(Xo),a(Ko),a(D),a(ea),a(ta),a(io)),a(f),g(T,e),g(C,e),g(Ee,e),g(Ue,e),g(De),g(Be),g(We),g(Re),g(Se),g(Ve,e),g(ze),g(Oe),g(Ge),g(oe),g(Ze,e),g(Ye),g(Fe),g(Qe),g(re),g(Xe),g(Ke),g(et),g(tt),g(nt,e),g(ot,e),g(at),g(ie),g(rt,e),g(st),g(lt),g(it),g(ce),g(dt),g(ct),g(he),g(mt),g(ht),g(pt,e),g(gt),g(ut),g(ft),g(bt),g(_t),g(vt),g($t,e),g(yt),g(wt),g(Tt),g(xt),g(kt),g(Ct,e),g(It),g(At,e),g(Mt),g(Te),g(jt,e),g(Pt,e),g(Et,e),g(Ht),g(Ut,e),g(St,e),g(Vt),g(zt,e),g(Ot),g(Gt),g(Zt),g(Yt,e),g(Ft),g(Qt),g(Xt),g(Kt,e)}}}const wl='{"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}],"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":"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":"ToolCollection","local":"transformers.ToolCollection","sections":[],"depth":3}],"depth":2},{"title":"Engines","local":"engines","sections":[{"title":"HfEngine","local":"transformers.HfEngine","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 Tl(L){return dl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ll extends cl{constructor(f){super(),ml(this,f,Tl,yl,il,{})}}export{Ll as component};
