import{s as zl,o as Ol,n as vn}from"../chunks/scheduler.25b97de1.js";import{S as Zl,i as Gl,g as r,s as n,r as d,A as Yl,h as s,f as a,c as o,j as b,u as m,x as u,k as _,y as t,a as i,v as c,d as h,t as p,w as g}from"../chunks/index.d9030fc9.js";import{T as Ps}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 Za}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as q,E as Fl}from"../chunks/EditOnGithub.91d95064.js";function Ql(j){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=r("p"),f.textContent=x},l(y){f=s(y,"P",{"data-svelte-h":!0}),u(f)!=="svelte-1fgfei3"&&(f.textContent=x)},m(y,w){i(y,f,w)},p:vn,d(y){y&&a(f)}}}function Xl(j){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=r("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(v){f=s(v,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(v),m(w.$$.fragment,v)},m(v,C){i(v,f,C),i(v,y,C),c(w,v,C),T=!0},p:vn,i(v){T||(h(w.$$.fragment,v),T=!0)},o(v){p(w.$$.fragment,v),T=!1},d(v){v&&(a(f),a(y)),g(w,v)}}}function Kl(j){let f,x="Example:",y,w,T;return w=new Co({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5hZ2VudHMlMjBpbXBvcnQlMjBSZWFjdENvZGVBZ2VudCUwQWFnZW50JTIwJTNEJTIwUmVhY3RDb2RlQWdlbnQodG9vbHMlM0QlNUIlNUQpJTBBYWdlbnQucnVuKCUyMldoYXQlMjBpcyUyMHRoZSUyMHJlc3VsdCUyMG9mJTIwMiUyMHBvd2VyJTIwMy43Mzg0JTNGJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers.agents <span class="hljs-keyword">import</span> ReactCodeAgent
agent = ReactCodeAgent(tools=[])
agent.run(<span class="hljs-string">&quot;What is the result of 2 power 3.7384?&quot;</span>)`,wrap:!1}}),{c(){f=r("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(v){f=s(v,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(v),m(w.$$.fragment,v)},m(v,C){i(v,f,C),i(v,y,C),c(w,v,C),T=!0},p:vn,i(v){T||(h(w.$$.fragment,v),T=!0)},o(v){p(w.$$.fragment,v),T=!1},d(v){v&&(a(f),a(y)),g(w,v)}}}function ei(j){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=r("p"),f.textContent=x},l(y){f=s(y,"P",{"data-svelte-h":!0}),u(f)!=="svelte-1kcherd"&&(f.textContent=x)},m(y,w){i(y,f,w)},p:vn,d(y){y&&a(f)}}}function ti(j){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=r("p"),f.textContent=x},l(y){f=s(y,"P",{"data-svelte-h":!0}),u(f)!=="svelte-fpk7e5"&&(f.textContent=x)},m(y,w){i(y,f,w)},p:vn,d(y){y&&a(f)}}}function ni(j){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=r("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(v){f=s(v,"P",{"data-svelte-h":!0}),u(f)!=="svelte-4vay6o"&&(f.textContent=x),y=o(v),m(w.$$.fragment,v)},m(v,C){i(v,f,C),i(v,y,C),c(w,v,C),T=!0},p:vn,i(v){T||(h(w.$$.fragment,v),T=!0)},o(v){p(w.$$.fragment,v),T=!1},d(v){v&&(a(f),a(y)),g(w,v)}}}function oi(j){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=r("p"),f.textContent=x,y=n(),d(w.$$.fragment)},l(v){f=s(v,"P",{"data-svelte-h":!0}),u(f)!=="svelte-11lpom8"&&(f.textContent=x),y=o(v),m(w.$$.fragment,v)},m(v,C){i(v,f,C),i(v,y,C),c(w,v,C),T=!0},p:vn,i(v){T||(h(w.$$.fragment,v),T=!0)},o(v){p(w.$$.fragment,v),T=!1},d(v){v&&(a(f),a(y)),g(w,v)}}}function ai(j){let f,x,y,w,T,v,C,Io,Re,Js=`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.`,Mo,Ue,Ao,We,Ds='We provide two types of agents, based on the main <a href="/docs/transformers/pr_31098/en/main_classes/agent#transformers.Agent">Agent</a> class:',Lo,Be,Es='<li><a href="/docs/transformers/pr_31098/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_31098/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_31098/en/main_classes/agent#transformers.ReactJsonAgent">ReactJsonAgent</a> writes its tool calls in JSON.</li> <li><a href="/docs/transformers/pr_31098/en/main_classes/agent#transformers.ReactCodeAgent">ReactCodeAgent</a> writes its tool calls in Python code.</li></ul></li>',qo,Ve,jo,P,Se,Ga,te,ze,Ya,bn,Hs=`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.`,Fa,ne,Oe,Qa,_n,Ns="Parse action from the LLM output",Xa,oe,Ze,Ka,$n,Rs="To be implemented in the child class",er,ae,Ge,tr,yn,Us=`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.`,Po,Ye,Jo,N,Fe,nr,wn,Ws="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.",or,re,Qe,ar,Tn,Bs=`Override this method if you want to change the way the code is
cleaned in the <code>run</code> method.`,rr,G,Xe,sr,xn,Vs="Runs the agent for the given task.",lr,se,Do,Ke,Eo,M,et,ir,kn,Ss=`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.`,dr,le,tt,mr,Cn,zs="Runs the agent in direct mode, returning outputs only at the end: should be launched only in the <code>run</code> method.",cr,ie,nt,hr,In,Os="Used periodically by the agent to plan the next steps to reach the objective.",pr,de,ot,gr,Mn,Zs="This method provides a final answer to the task, based on the logs of the agent’s interactions.",ur,Y,at,fr,An,Gs="Runs the agent for the given task.",vr,me,br,ce,rt,_r,Ln,Ys="Runs the agent in streaming mode, yielding steps as they are executed: should be launched only in the <code>run</code> method.",Ho,S,st,$r,qn,Fs=`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.`,yr,he,lt,wr,jn,Qs=`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.`,No,z,it,Tr,Pn,Xs=`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.`,xr,pe,dt,kr,Jn,Ks=`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.`,Ro,mt,Uo,ct,Wo,O,ht,Cr,Dn,el="Main function to quickly load a tool, be it on the Hub or in the Transformers library.",Ir,ge,Bo,pt,Vo,k,gt,Mr,En,tl=`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:`,Ar,Hn,nl=`<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>`,Lr,Nn,ol=`You can also override the method <a href="/docs/transformers/pr_31098/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_31098/en/main_classes/agent#transformers.Tool.setup">setup()</a> will be called the first time you use your tool, but not at
instantiation.`,qr,ue,ut,jr,Rn,al='Creates a <a href="/docs/transformers/pr_31098/en/main_classes/agent#transformers.Tool">Tool</a> from a gradio tool.',Pr,F,ft,Jr,Un,rl="Loads a tool defined on the Hub.",Dr,fe,Er,ve,vt,Hr,Wn,sl='Creates a <a href="/docs/transformers/pr_31098/en/main_classes/agent#transformers.Tool">Tool</a> from a langchain tool.',Nr,B,bt,Rr,Bn,ll="Upload the tool to the Hub.",Ur,Vn,il="For this method to work properly, your tool must have been defined in a separate module (not <code>__main__</code>).",Wr,be,Br,V,_t,Vr,Sn,dl=`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:`,Sr,zn,ml=`<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>`,zr,On,cl="You should only use this method to save tools that are defined in a separate module (not <code>__main__</code>).",Or,_e,$t,Zr,Zn,hl=`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.`,So,yt,zo,A,wt,Gr,Gn,pl=`The toolbox contains all tools that the agent can perform operations with, as well as a few methods to
manage them.`,Yr,$e,Tt,Fr,Yn,gl="Adds a tool to the toolbox",Qr,ye,xt,Xr,Fn,ul="Clears the toolbox",Kr,we,kt,es,Qn,fl="Removes a tool from the toolbox",ts,Te,Ct,ns,Xn,vl="Returns the description of all tools in the toolbox",os,xe,It,as,Kn,bl="Updates a tool in the toolbox according to its name.",Oo,Mt,Zo,L,At,rs,eo,_l=`A <a href="/docs/transformers/pr_31098/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_31098/en/main_classes/agent#transformers.Tool">Tool</a>, you will
need to specify:`,ss,to,$l=`<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_31098/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_31098/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>) — The class to use to load the
post-processor (when different from the pre-processor).</li>`,ls,ke,Lt,is,no,yl="Uses the <code>post_processor</code> to decode the model output.",ds,Ce,qt,ms,oo,wl="Uses the <code>pre_processor</code> to prepare the inputs for the <code>model</code>.",cs,Ie,jt,hs,ao,Tl="Sends the inputs through the <code>model</code>.",ps,Me,Pt,gs,ro,xl="Instantiates the <code>pre_processor</code>, <code>model</code> and <code>post_processor</code> if necessary.",Go,Jt,Yo,X,Dt,us,so,kl=`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>.`,Fo,Et,Qo,K,Ht,fs,lo,Cl="Runs an agent with the given task and streams the messages from the agent as gradio ChatMessages.",Xo,Nt,Ko,R,Rt,vs,io,Il="Tool collections enable loading all Spaces from a collection in order to be added to the agent’s toolbox.",bs,mo,Ml=`<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>`,_s,Ae,ea,Ut,ta,Wt,Al=`You’re free to create and use your own engines to be usable by the Agents framework.
These engines have the following specification:`,na,Bt,Ll='<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>',oa,Vt,aa,St,ql="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.",ra,zt,sa,Ot,Zt,la,Gt,ia,Yt,jl=`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.`,da,Ft,Pl=`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>.`,ma,Qt,Jl="These types have three specific purposes:",ca,Xt,Dl=`<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>`,ha,Kt,pa,ee,en,$s,co,El="Text type returned by the agent. Behaves as a string.",ga,tn,ua,J,nn,ys,ho,Hl="Image type returned by the agent. Behaves as a PIL.Image.",ws,Le,on,Ts,po,Nl="Saves the image to a file.",xs,qe,an,ks,go,Rl="Returns the “raw” version of that object. In the case of an AgentImage, it is a PIL.Image.",Cs,je,rn,Is,uo,Ul=`Returns the stringified version of that object. In the case of an AgentImage, it is a path to the serialized
version of the image.`,fa,sn,va,U,ln,Ms,fo,Wl="Audio type returned by the agent.",As,Pe,dn,Ls,vo,Bl="Returns the “raw” version of that object. It is a <code>torch.Tensor</code> object.",qs,Je,mn,js,bo,Vl=`Returns the stringified version of that object. In the case of an AgentAudio, it is a path to the serialized
version of the audio.`,ba,cn,_a,ko,$a;return T=new q({props:{title:"Agents & Tools",local:"agents--tools",headingTag:"h1"}}),C=new Ps({props:{warning:!0,$$slots:{default:[Ql]},$$scope:{ctx:j}}}),Ue=new q({props:{title:"Agents",local:"agents",headingTag:"h2"}}),Ve=new q({props:{title:"Agent",local:"transformers.Agent",headingTag:"h3"}}),Se=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 0x7f101877ddb0>"},{name:"system_prompt",val:" = 'You are an expert assistant who can solve any task using code blobs. You will be given a task to solve as best you can.\\nTo do so, you have been given access to a list of tools: these tools are basically Python functions which you can call with code.\\nTo solve the task, you must plan forward to proceed in a series of steps, in a cycle of \\'Thought:\\', \\'Code:\\', and \\'Observation:\\' sequences.\\n\\nAt each step, in the \\'Thought:\\' sequence, you should first explain your reasoning towards solving the task and the tools that you want to use.\\nThen in the \\'Code:\\' sequence, you should write the code in simple Python. The code sequence must end with \\'<end_action>\\' sequence.\\nDuring each intermediate step, you can use \\'print()\\' to save whatever important information you will then need.\\nThese print outputs will then appear in the \\'Observation:\\' field, which will be available as input for the next step.\\nIn the end you have to return a final answer using the `final_answer` tool.\\n\\nHere are a few examples using notional tools:\\n---\\nTask: \"Generate an image of the oldest person in this document.\"\\n\\nThought: I will proceed step by step and use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = document_qa(document=document, question=\"Who is the oldest person mentioned?\")\\nprint(answer)\\n```<end_action>\\nObservation: \"The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland.\"\\n\\nThought: I will now generate an image showcasing the oldest person.\\nCode:\\n```py\\nimage = image_generator(\"A portrait of John Doe, a 55-year-old man living in Canada.\")\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: \"What is the result of the following operation: 5 + 3 + 1294.678?\"\\n\\nThought: I will use python code to compute the result of the operation and then return the final answer using the `final_answer` tool\\nCode:\\n```py\\nresult = 5 + 3 + 1294.678\\nfinal_answer(result)\\n```<end_action>\\n\\n---\\nTask: \"Which city has the highest population: Guangzhou or Shanghai?\"\\n\\nThought: I need to get the populations for both cities and compare them: I will use the tool `search` to get the population of both cities.\\nCode:\\n```py\\npopulation_guangzhou = search(\"Guangzhou population\")\\nprint(\"Population Guangzhou:\", population_guangzhou)\\npopulation_shanghai = search(\"Shanghai population\")\\nprint(\"Population Shanghai:\", population_shanghai)\\n```<end_action>\\nObservation:\\nPopulation Guangzhou: [\\'Guangzhou has a population of 15 million inhabitants as of 2021.\\']\\nPopulation Shanghai: \\'26 million (2019)\\'\\n\\nThought: Now I know that Shanghai has the highest population.\\nCode:\\n```py\\nfinal_answer(\"Shanghai\")\\n```<end_action>\\n\\n---\\nTask: \"What is the current age of the pope, raised to the power 0.36?\"\\n\\nThought: I will use the tool `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\\'.\\n7. Never create any notional variables in our code, as having these in your logs might derail you from the true variables.\\n8. You can use imports in your code, but only from the following list of modules: <<authorized_imports>>\\n9. The state persists between code executions: so if in one step you\\'ve created variables or imported modules, these will all persist.\\n10. Don\\'t give up! You\\'re in charge of solving the task, not providing directions to solve it.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n'"},{name:"tool_description_template",val:" = None"},{name:"additional_args",val:" = {}"},{name:"max_iterations",val:": int = 6"},{name:"tool_parser",val:" = <function parse_json_tool_call at 0x7f1018776ef0>"},{name:"add_base_tools",val:": bool = False"},{name:"verbose",val:": int = 0"},{name:"memory_verbose",val:": bool = False"},{name:"grammar",val:": Dict = None"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L326"}}),ze=new $({props:{name:"execute_tool_call",anchor:"transformers.Agent.execute_tool_call",parameters:[{name:"tool_name",val:": str"},{name:"arguments",val:": Dict"}],parametersDescription:[{anchor:"transformers.Agent.execute_tool_call.tool_name",description:"<strong>tool_name</strong> (<code>str</code>) &#x2014; Name of the Tool to execute (should be one from self.toolbox).",name:"tool_name"},{anchor:"transformers.Agent.execute_tool_call.arguments",description:"<strong>arguments</strong> (Dict[str, str]) &#x2014; Arguments passed to the Tool.",name:"arguments"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L482"}}),Oe=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_31098/src/transformers/agents/agents.py#L461"}}),Ze=new $({props:{name:"run",anchor:"transformers.Agent.run",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L522"}}),Ge=new $({props:{name:"write_inner_memory_from_logs",anchor:"transformers.Agent.write_inner_memory_from_logs",parameters:[{name:"summary_mode",val:": Optional = False"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L401"}}),Ye=new q({props:{title:"CodeAgent",local:"transformers.CodeAgent",headingTag:"h3"}}),Fe=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 0x7f101877ded0>"},{name:"system_prompt",val:': str = \'You will be given a task to solve, your job is to come up with a series of simple commands in Python that will perform the task.\\nTo help you, I will give you access to a set of tools that you can use. Each tool is a Python function and has a description explaining the task it performs, the inputs it expects and the outputs it returns.\\nYou should first explain which tool you will use to perform the task and for what reason, then write the code in Python.\\nEach instruction in Python should be a simple assignment. You can print intermediate results if it makes sense to do so.\\nIn the end, use tool \\\'final_answer\\\' to return your answer, its argument will be what gets returned.\\nYou can use imports in your code, but only from the following list of modules: <<authorized_imports>>\\nBe sure to provide a \\\'Code:\\\' token, else the run will fail.\\n\\nTools:\\n<<tool_descriptions>>\\n\\nExamples:\\n---\\nTask: "Answer the question in the variable `question` about the image stored in the variable `image`. The question is in French."\\n\\nThought: I will use the following tools: `translator` to translate the question into English and then `image_qa` to answer the question on the input image.\\nCode:\\n```py\\ntranslated_question = translator(question=question, src_lang="French", tgt_lang="English")\\nprint(f"The translated question is {translated_question}.")\\nanswer = image_qa(image=image, question=translated_question)\\nfinal_answer(f"The answer is {answer}")\\n```<end_action>\\n\\n---\\nTask: "Identify the oldest person in the `document` and create an image showcasing the result."\\n\\nThought: I will use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = document_qa(document, question="What is the oldest person?")\\nprint(f"The answer is {answer}.")\\nimage = image_generator(answer)\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: "Generate an image using the text given in the variable `caption`."\\n\\nThought: I will use the following tool: `image_generator` to generate an image.\\nCode:\\n```py\\nimage = image_generator(prompt=caption)\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: "Summarize the text given in the variable `text` and read it out loud."\\n\\nThought: I will use the following tools: `summarizer` to create a summary of the input text, then `text_reader` to read it out loud.\\nCode:\\n```py\\nsummarized_text = summarizer(text)\\nprint(f"Summary: {summarized_text}")\\naudio_summary = text_reader(summarized_text)\\nfinal_answer(audio_summary)\\n```<end_action>\\n\\n---\\nTask: "Answer the question in the variable `question` about the text in the variable `text`. Use the answer to generate an image."\\n\\nThought: I will use the following tools: `text_qa` to create the answer, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = text_qa(text=text, question=question)\\nprint(f"The answer is {answer}.")\\nimage = image_generator(answer)\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: "Caption the following `image`."\\n\\nThought: I will use the following tool: `image_captioner` to generate a caption for the image.\\nCode:\\n```py\\ncaption = image_captioner(image)\\nfinal_answer(caption)\\n```<end_action>\\n\\n---\\nAbove example were using tools that might not exist for you. You only have acces to those Tools:\\n<<tool_names>>\\n\\nRemember to make sure that variables you use are all defined.\\nBe sure to provide a \\\'Code:\\n```\\\' sequence before the code and \\\'```<end_action>\\\' after, else you will get an error.\\nDO NOT pass the arguments as a dict as in \\\'answer = ask_search_agent({\\\'query\\\': "What is the place where James Bond lives?"})\\\', but use the arguments directly as in \\\'answer = ask_search_agent(query="What is the place where James Bond lives?")\\\'.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n\''},{name:"tool_description_template",val:": str = '\\n- {{ tool.name }}: {{ tool.description }}\\n    Takes inputs: {{tool.inputs}}\\n'"},{name:"grammar",val:": Dict = None"},{name:"additional_authorized_imports",val:": Optional = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L527"}}),Qe=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_31098/src/transformers/agents/agents.py#L563"}}),Xe=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_31098/src/transformers/agents/agents.py#L570"}}),se=new Za({props:{anchor:"transformers.CodeAgent.run.example",$$slots:{default:[Xl]},$$scope:{ctx:j}}}),Ke=new q({props:{title:"React agents",local:"transformers.ReactAgent",headingTag:"h3"}}),et=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 0x7f101877e1d0>"},{name:"system_prompt",val:": str = 'You are an expert assistant who can solve any task using code blobs. You will be given a task to solve as best you can.\\nTo do so, you have been given access to a list of tools: these tools are basically Python functions which you can call with code.\\nTo solve the task, you must plan forward to proceed in a series of steps, in a cycle of \\'Thought:\\', \\'Code:\\', and \\'Observation:\\' sequences.\\n\\nAt each step, in the \\'Thought:\\' sequence, you should first explain your reasoning towards solving the task and the tools that you want to use.\\nThen in the \\'Code:\\' sequence, you should write the code in simple Python. The code sequence must end with \\'<end_action>\\' sequence.\\nDuring each intermediate step, you can use \\'print()\\' to save whatever important information you will then need.\\nThese print outputs will then appear in the \\'Observation:\\' field, which will be available as input for the next step.\\nIn the end you have to return a final answer using the `final_answer` tool.\\n\\nHere are a few examples using notional tools:\\n---\\nTask: \"Generate an image of the oldest person in this document.\"\\n\\nThought: I will proceed step by step and use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = document_qa(document=document, question=\"Who is the oldest person mentioned?\")\\nprint(answer)\\n```<end_action>\\nObservation: \"The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland.\"\\n\\nThought: I will now generate an image showcasing the oldest person.\\nCode:\\n```py\\nimage = image_generator(\"A portrait of John Doe, a 55-year-old man living in Canada.\")\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: \"What is the result of the following operation: 5 + 3 + 1294.678?\"\\n\\nThought: I will use python code to compute the result of the operation and then return the final answer using the `final_answer` tool\\nCode:\\n```py\\nresult = 5 + 3 + 1294.678\\nfinal_answer(result)\\n```<end_action>\\n\\n---\\nTask: \"Which city has the highest population: Guangzhou or Shanghai?\"\\n\\nThought: I need to get the populations for both cities and compare them: I will use the tool `search` to get the population of both cities.\\nCode:\\n```py\\npopulation_guangzhou = search(\"Guangzhou population\")\\nprint(\"Population Guangzhou:\", population_guangzhou)\\npopulation_shanghai = search(\"Shanghai population\")\\nprint(\"Population Shanghai:\", population_shanghai)\\n```<end_action>\\nObservation:\\nPopulation Guangzhou: [\\'Guangzhou has a population of 15 million inhabitants as of 2021.\\']\\nPopulation Shanghai: \\'26 million (2019)\\'\\n\\nThought: Now I know that Shanghai has the highest population.\\nCode:\\n```py\\nfinal_answer(\"Shanghai\")\\n```<end_action>\\n\\n---\\nTask: \"What is the current age of the pope, raised to the power 0.36?\"\\n\\nThought: I will use the tool `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\\'.\\n7. Never create any notional variables in our code, as having these in your logs might derail you from the true variables.\\n8. You can use imports in your code, but only from the following list of modules: <<authorized_imports>>\\n9. The state persists between code executions: so if in one step you\\'ve created variables or imported modules, these will all persist.\\n10. Don\\'t give up! You\\'re in charge of solving the task, not providing directions to solve it.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n'"},{name:"tool_description_template",val:": str = '\\n- {{ tool.name }}: {{ tool.description }}\\n    Takes inputs: {{tool.inputs}}\\n'"},{name:"grammar",val:": Dict = None"},{name:"plan_type",val:": Literal = 'default'"},{name:"planning_interval",val:": Optional = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L648"}}),tt=new $({props:{name:"direct_run",anchor:"transformers.ReactAgent.direct_run",parameters:[{name:"task",val:": str"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L756"}}),nt=new $({props:{name:"planning_step",anchor:"transformers.ReactAgent.planning_step",parameters:[{name:"task",val:""},{name:"is_first_step",val:": bool = False"},{name:"iteration",val:": int = None"}],parametersDescription:[{anchor:"transformers.ReactAgent.planning_step.task",description:"<strong>task</strong> (<code>str</code>) &#x2014; The task to perform",name:"task"},{anchor:"transformers.ReactAgent.planning_step.is_first_step",description:"<strong>is_first_step</strong> (<code>bool</code>) &#x2014; If this step is not the first one, the plan should be an update over a previous plan.",name:"is_first_step"},{anchor:"transformers.ReactAgent.planning_step.iteration",description:"<strong>iteration</strong> (<code>int</code>) &#x2014; The number of the current step, used as an indication for the LLM.",name:"iteration"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L785"}}),ot=new $({props:{name:"provide_final_answer",anchor:"transformers.ReactAgent.provide_final_answer",parameters:[{name:"task",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L678"}}),at=new $({props:{name:"run",anchor:"transformers.ReactAgent.run",parameters:[{name:"task",val:": str"},{name:"stream",val:": bool = False"},{name:"reset",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ReactAgent.run.task",description:"<strong>task</strong> (<code>str</code>) &#x2014; The task to perform",name:"task"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L700"}}),me=new Za({props:{anchor:"transformers.ReactAgent.run.example",$$slots:{default:[Kl]},$$scope:{ctx:j}}}),rt=new $({props:{name:"stream_run",anchor:"transformers.ReactAgent.stream_run",parameters:[{name:"task",val:": str"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L727"}}),st=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 0x7f101877e380>"},{name:"system_prompt",val:`: str = 'You are an expert assistant who can solve any task using JSON tool calls. You will be given a task to solve as best you can.\\nTo do so, you have been given access to the following tools: <<tool_names>>\\nThe way you use the tools is by specifying a json blob, ending with \\'<end_action>\\'.\\nSpecifically, this json should have an \`action\` key (name of the tool to use) and an \`action_input\` key (input to the tool).\\n\\nThe $ACTION_JSON_BLOB should only contain a SINGLE action, do NOT return a list of multiple actions. It should be formatted in json. Do not try to escape special characters. Here is the template of a valid $ACTION_JSON_BLOB:\\n{\\n  "action": $TOOL_NAME,\\n  "action_input": $INPUT\\n}<end_action>\\n\\nMake sure to have the $INPUT as a dictionary in the right format for the tool you are using, and do not put variable names as input if you can find the right values.\\n\\nYou should ALWAYS use the following format:\\n\\nThought: you should always think about one action to take. Then use the action as follows:\\nAction:\\n$ACTION_JSON_BLOB\\nObservation: the result of the action\\n... (this Thought/Action/Observation can repeat N times, you should take several steps when needed. The $ACTION_JSON_BLOB must only use a SINGLE action at a time.)\\n\\nYou can use the result of the previous action as input for the next action.\\nThe observation will always be a string: it can represent a file, like "image_1.jpg".\\nThen you can use it as input for the next action. You can do it for instance as follows:\\n\\nObservation: "image_1.jpg"\\n\\nThought: I need to transform the image that I received in the previous observation to make it green.\\nAction:\\n{\\n  "action": "image_transformer",\\n  "action_input": {"image": "image_1.jpg"}\\n}<end_action>\\n\\nTo provide the final answer to the task, use an action blob with "action": "final_answer" tool. It is the only way to complete the task, else you will be stuck on a loop. So your final output should look like this:\\nAction:\\n{\\n  "action": "final_answer",\\n  "action_input": {"answer": "insert your final answer here"}\\n}<end_action>\\n\\n\\nHere are a few examples using notional tools:\\n---\\nTask: "Generate an image of the oldest person in this document."\\n\\nThought: I will proceed step by step and use the following tools: \`document_qa\` to find the oldest person in the document, then \`image_generator\` to generate an image according to the answer.\\nAction:\\n{\\n  "action": "document_qa",\\n  "action_input": {"document": "document.pdf", "question": "Who is the oldest person mentioned?"}\\n}<end_action>\\nObservation: "The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland."\\n\\n\\nThought: I will now generate an image showcasing the oldest person.\\nAction:\\n{\\n  "action": "image_generator",\\n  "action_input": {"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:"grammar",val:": Dict = None"},{name:"planning_interval",val:": Optional = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L879"}}),lt=new $({props:{name:"step",anchor:"transformers.ReactJsonAgent.step",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L906"}}),it=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 0x7f101877e500>"},{name:"system_prompt",val:": str = 'You are an expert assistant who can solve any task using code blobs. You will be given a task to solve as best you can.\\nTo do so, you have been given access to a list of tools: these tools are basically Python functions which you can call with code.\\nTo solve the task, you must plan forward to proceed in a series of steps, in a cycle of \\'Thought:\\', \\'Code:\\', and \\'Observation:\\' sequences.\\n\\nAt each step, in the \\'Thought:\\' sequence, you should first explain your reasoning towards solving the task and the tools that you want to use.\\nThen in the \\'Code:\\' sequence, you should write the code in simple Python. The code sequence must end with \\'<end_action>\\' sequence.\\nDuring each intermediate step, you can use \\'print()\\' to save whatever important information you will then need.\\nThese print outputs will then appear in the \\'Observation:\\' field, which will be available as input for the next step.\\nIn the end you have to return a final answer using the `final_answer` tool.\\n\\nHere are a few examples using notional tools:\\n---\\nTask: \"Generate an image of the oldest person in this document.\"\\n\\nThought: I will proceed step by step and use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\\nCode:\\n```py\\nanswer = document_qa(document=document, question=\"Who is the oldest person mentioned?\")\\nprint(answer)\\n```<end_action>\\nObservation: \"The oldest person in the document is John Doe, a 55 year old lumberjack living in Newfoundland.\"\\n\\nThought: I will now generate an image showcasing the oldest person.\\nCode:\\n```py\\nimage = image_generator(\"A portrait of John Doe, a 55-year-old man living in Canada.\")\\nfinal_answer(image)\\n```<end_action>\\n\\n---\\nTask: \"What is the result of the following operation: 5 + 3 + 1294.678?\"\\n\\nThought: I will use python code to compute the result of the operation and then return the final answer using the `final_answer` tool\\nCode:\\n```py\\nresult = 5 + 3 + 1294.678\\nfinal_answer(result)\\n```<end_action>\\n\\n---\\nTask: \"Which city has the highest population: Guangzhou or Shanghai?\"\\n\\nThought: I need to get the populations for both cities and compare them: I will use the tool `search` to get the population of both cities.\\nCode:\\n```py\\npopulation_guangzhou = search(\"Guangzhou population\")\\nprint(\"Population Guangzhou:\", population_guangzhou)\\npopulation_shanghai = search(\"Shanghai population\")\\nprint(\"Population Shanghai:\", population_shanghai)\\n```<end_action>\\nObservation:\\nPopulation Guangzhou: [\\'Guangzhou has a population of 15 million inhabitants as of 2021.\\']\\nPopulation Shanghai: \\'26 million (2019)\\'\\n\\nThought: Now I know that Shanghai has the highest population.\\nCode:\\n```py\\nfinal_answer(\"Shanghai\")\\n```<end_action>\\n\\n---\\nTask: \"What is the current age of the pope, raised to the power 0.36?\"\\n\\nThought: I will use the tool `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\\'.\\n7. Never create any notional variables in our code, as having these in your logs might derail you from the true variables.\\n8. You can use imports in your code, but only from the following list of modules: <<authorized_imports>>\\n9. The state persists between code executions: so if in one step you\\'ve created variables or imported modules, these will all persist.\\n10. Don\\'t give up! You\\'re in charge of solving the task, not providing directions to solve it.\\n\\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\\n'"},{name:"tool_description_template",val:": str = '\\n- {{ tool.name }}: {{ tool.description }}\\n    Takes inputs: {{tool.inputs}}\\n'"},{name:"grammar",val:": Dict = None"},{name:"additional_authorized_imports",val:": Optional = None"},{name:"planning_interval",val:": Optional = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L985"}}),dt=new $({props:{name:"step",anchor:"transformers.ReactCodeAgent.step",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L1026"}}),mt=new q({props:{title:"Tools",local:"tools",headingTag:"h2"}}),ct=new q({props:{title:"load_tool",local:"transformers.load_tool",headingTag:"h3"}}),ht=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_31098/src/transformers/agents/tools.py#L656"}}),ge=new Ps({props:{warning:!0,$$slots:{default:[ei]},$$scope:{ctx:j}}}),pt=new q({props:{title:"Tool",local:"transformers.Tool",headingTag:"h3"}}),gt=new $({props:{name:"class transformers.Tool",anchor:"transformers.Tool",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/tools.py#L87"}}),ut=new $({props:{name:"from_gradio",anchor:"transformers.Tool.from_gradio",parameters:[{name:"gradio_tool",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/tools.py#L373"}}),ft=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_31098/src/transformers/agents/tools.py#L204"}}),fe=new Ps({props:{warning:!0,$$slots:{default:[ti]},$$scope:{ctx:j}}}),vt=new $({props:{name:"from_langchain",anchor:"transformers.Tool.from_langchain",parameters:[{name:"langchain_tool",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/tools.py#L395"}}),bt=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_31098/src/transformers/agents/tools.py#L316"}}),be=new Za({props:{anchor:"transformers.Tool.push_to_hub.example",$$slots:{default:[ni]},$$scope:{ctx:j}}}),_t=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_31098/src/transformers/agents/tools.py#L144"}}),$t=new $({props:{name:"setup",anchor:"transformers.Tool.setup",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/tools.py#L137"}}),yt=new q({props:{title:"Toolbox",local:"transformers.Toolbox",headingTag:"h3"}}),wt=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_31098/src/transformers/agents/agents.py#L176"}}),Tt=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_31098/src/transformers/agents/agents.py#L222"}}),xt=new $({props:{name:"clear_toolbox",anchor:"transformers.Toolbox.clear_toolbox",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agents.py#L262"}}),kt=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_31098/src/transformers/agents/agents.py#L234"}}),Ct=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_31098/src/transformers/agents/agents.py#L210"}}),It=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_31098/src/transformers/agents/agents.py#L248"}}),Mt=new q({props:{title:"PipelineTool",local:"transformers.PipelineTool",headingTag:"h3"}}),At=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_31098/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_31098/src/transformers/agents/tools.py#L455"}}),Lt=new $({props:{name:"decode",anchor:"transformers.PipelineTool.decode",parameters:[{name:"outputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/tools.py#L578"}}),qt=new $({props:{name:"encode",anchor:"transformers.PipelineTool.encode",parameters:[{name:"raw_inputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/tools.py#L565"}}),jt=new $({props:{name:"forward",anchor:"transformers.PipelineTool.forward",parameters:[{name:"inputs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/tools.py#L571"}}),Pt=new $({props:{name:"setup",anchor:"transformers.PipelineTool.setup",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/tools.py#L539"}}),Jt=new q({props:{title:"launch_gradio_demo",local:"transformers.launch_gradio_demo",headingTag:"h3"}}),Dt=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_31098/src/transformers/agents/tools.py#L603"}}),Et=new q({props:{title:"stream_to_gradio",local:"transformers.stream_to_gradio",headingTag:"h3"}}),Ht=new $({props:{name:"transformers.stream_to_gradio",anchor:"transformers.stream_to_gradio",parameters:[{name:"agent",val:": ReactAgent"},{name:"task",val:": str"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/monitoring.py#L49"}}),Nt=new q({props:{title:"ToolCollection",local:"transformers.ToolCollection",headingTag:"h3"}}),Rt=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_31098/src/transformers/agents/tools.py#L780"}}),Ae=new Za({props:{anchor:"transformers.ToolCollection.example",$$slots:{default:[oi]},$$scope:{ctx:j}}}),Ut=new q({props:{title:"Engines",local:"engines",headingTag:"h2"}}),Vt=new q({props:{title:"HfEngine",local:"transformers.HfEngine",headingTag:"h3"}}),zt=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}}),Zt=new $({props:{name:"class transformers.HfEngine",anchor:"transformers.HfEngine",parameters:[{name:"model",val:": str = 'meta-llama/Meta-Llama-3.1-8B-Instruct'"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/llm_engine.py#L68"}}),Gt=new q({props:{title:"Agent Types",local:"agent-types",headingTag:"h2"}}),Kt=new q({props:{title:"AgentText",local:"transformers.agents.agent_types.AgentText",headingTag:"h3"}}),en=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_31098/src/transformers/agents/agent_types.py#L73"}}),tn=new q({props:{title:"AgentImage",local:"transformers.agents.agent_types.AgentImage",headingTag:"h3"}}),nn=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_31098/src/transformers/agents/agent_types.py#L85"}}),on=new $({props:{name:"save",anchor:"transformers.agents.agent_types.AgentImage.save",parameters:[{name:"output_bytes",val:""},{name:"format",val:""},{name:"**params",val:""}],parametersDescription:[{anchor:"transformers.agents.agent_types.AgentImage.save.output_bytes",description:"<strong>output_bytes</strong> (bytes) &#x2014; The output bytes to save the image to.",name:"output_bytes"},{anchor:"transformers.agents.agent_types.AgentImage.save.format",description:`<strong>format</strong> (str) &#x2014; The format to use for the output image. The format is the same as in PIL.Image.save.
**params &#x2014; Additional parameters to pass to PIL.Image.save.`,name:"format"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agent_types.py#L162"}}),an=new $({props:{name:"to_raw",anchor:"transformers.agents.agent_types.AgentImage.to_raw",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agent_types.py#L120"}}),rn=new $({props:{name:"to_string",anchor:"transformers.agents.agent_types.AgentImage.to_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agent_types.py#L135"}}),sn=new q({props:{title:"AgentAudio",local:"transformers.agents.agent_types.AgentAudio",headingTag:"h3"}}),ln=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_31098/src/transformers/agents/agent_types.py#L174"}}),dn=new $({props:{name:"to_raw",anchor:"transformers.agents.agent_types.AgentAudio.to_raw",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agent_types.py#L207"}}),mn=new $({props:{name:"to_string",anchor:"transformers.agents.agent_types.AgentAudio.to_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/agents/agent_types.py#L219"}}),cn=new Fl({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/main_classes/agent.md"}}),{c(){f=r("meta"),x=n(),y=r("p"),w=n(),d(T.$$.fragment),v=n(),d(C.$$.fragment),Io=n(),Re=r("p"),Re.innerHTML=Js,Mo=n(),d(Ue.$$.fragment),Ao=n(),We=r("p"),We.innerHTML=Ds,Lo=n(),Be=r("ul"),Be.innerHTML=Es,qo=n(),d(Ve.$$.fragment),jo=n(),P=r("div"),d(Se.$$.fragment),Ga=n(),te=r("div"),d(ze.$$.fragment),Ya=n(),bn=r("p"),bn.textContent=Hs,Fa=n(),ne=r("div"),d(Oe.$$.fragment),Qa=n(),_n=r("p"),_n.textContent=Ns,Xa=n(),oe=r("div"),d(Ze.$$.fragment),Ka=n(),$n=r("p"),$n.textContent=Rs,er=n(),ae=r("div"),d(Ge.$$.fragment),tr=n(),yn=r("p"),yn.textContent=Us,Po=n(),d(Ye.$$.fragment),Jo=n(),N=r("div"),d(Fe.$$.fragment),nr=n(),wn=r("p"),wn.textContent=Ws,or=n(),re=r("div"),d(Qe.$$.fragment),ar=n(),Tn=r("p"),Tn.innerHTML=Bs,rr=n(),G=r("div"),d(Xe.$$.fragment),sr=n(),xn=r("p"),xn.textContent=Vs,lr=n(),d(se.$$.fragment),Do=n(),d(Ke.$$.fragment),Eo=n(),M=r("div"),d(et.$$.fragment),ir=n(),kn=r("p"),kn.textContent=Ss,dr=n(),le=r("div"),d(tt.$$.fragment),mr=n(),Cn=r("p"),Cn.innerHTML=zs,cr=n(),ie=r("div"),d(nt.$$.fragment),hr=n(),In=r("p"),In.textContent=Os,pr=n(),de=r("div"),d(ot.$$.fragment),gr=n(),Mn=r("p"),Mn.textContent=Zs,ur=n(),Y=r("div"),d(at.$$.fragment),fr=n(),An=r("p"),An.textContent=Gs,vr=n(),d(me.$$.fragment),br=n(),ce=r("div"),d(rt.$$.fragment),_r=n(),Ln=r("p"),Ln.innerHTML=Ys,Ho=n(),S=r("div"),d(st.$$.fragment),$r=n(),qn=r("p"),qn.textContent=Fs,yr=n(),he=r("div"),d(lt.$$.fragment),wr=n(),jn=r("p"),jn.textContent=Qs,No=n(),z=r("div"),d(it.$$.fragment),Tr=n(),Pn=r("p"),Pn.textContent=Xs,xr=n(),pe=r("div"),d(dt.$$.fragment),kr=n(),Jn=r("p"),Jn.textContent=Ks,Ro=n(),d(mt.$$.fragment),Uo=n(),d(ct.$$.fragment),Wo=n(),O=r("div"),d(ht.$$.fragment),Cr=n(),Dn=r("p"),Dn.textContent=el,Ir=n(),d(ge.$$.fragment),Bo=n(),d(pt.$$.fragment),Vo=n(),k=r("div"),d(gt.$$.fragment),Mr=n(),En=r("p"),En.innerHTML=tl,Ar=n(),Hn=r("ul"),Hn.innerHTML=nl,Lr=n(),Nn=r("p"),Nn.innerHTML=ol,qr=n(),ue=r("div"),d(ut.$$.fragment),jr=n(),Rn=r("p"),Rn.innerHTML=al,Pr=n(),F=r("div"),d(ft.$$.fragment),Jr=n(),Un=r("p"),Un.textContent=rl,Dr=n(),d(fe.$$.fragment),Er=n(),ve=r("div"),d(vt.$$.fragment),Hr=n(),Wn=r("p"),Wn.innerHTML=sl,Nr=n(),B=r("div"),d(bt.$$.fragment),Rr=n(),Bn=r("p"),Bn.textContent=ll,Ur=n(),Vn=r("p"),Vn.innerHTML=il,Wr=n(),d(be.$$.fragment),Br=n(),V=r("div"),d(_t.$$.fragment),Vr=n(),Sn=r("p"),Sn.innerHTML=dl,Sr=n(),zn=r("ul"),zn.innerHTML=ml,zr=n(),On=r("p"),On.innerHTML=cl,Or=n(),_e=r("div"),d($t.$$.fragment),Zr=n(),Zn=r("p"),Zn.textContent=hl,So=n(),d(yt.$$.fragment),zo=n(),A=r("div"),d(wt.$$.fragment),Gr=n(),Gn=r("p"),Gn.textContent=pl,Yr=n(),$e=r("div"),d(Tt.$$.fragment),Fr=n(),Yn=r("p"),Yn.textContent=gl,Qr=n(),ye=r("div"),d(xt.$$.fragment),Xr=n(),Fn=r("p"),Fn.textContent=ul,Kr=n(),we=r("div"),d(kt.$$.fragment),es=n(),Qn=r("p"),Qn.textContent=fl,ts=n(),Te=r("div"),d(Ct.$$.fragment),ns=n(),Xn=r("p"),Xn.textContent=vl,os=n(),xe=r("div"),d(It.$$.fragment),as=n(),Kn=r("p"),Kn.textContent=bl,Oo=n(),d(Mt.$$.fragment),Zo=n(),L=r("div"),d(At.$$.fragment),rs=n(),eo=r("p"),eo.innerHTML=_l,ss=n(),to=r("ul"),to.innerHTML=$l,ls=n(),ke=r("div"),d(Lt.$$.fragment),is=n(),no=r("p"),no.innerHTML=yl,ds=n(),Ce=r("div"),d(qt.$$.fragment),ms=n(),oo=r("p"),oo.innerHTML=wl,cs=n(),Ie=r("div"),d(jt.$$.fragment),hs=n(),ao=r("p"),ao.innerHTML=Tl,ps=n(),Me=r("div"),d(Pt.$$.fragment),gs=n(),ro=r("p"),ro.innerHTML=xl,Go=n(),d(Jt.$$.fragment),Yo=n(),X=r("div"),d(Dt.$$.fragment),us=n(),so=r("p"),so.innerHTML=kl,Fo=n(),d(Et.$$.fragment),Qo=n(),K=r("div"),d(Ht.$$.fragment),fs=n(),lo=r("p"),lo.textContent=Cl,Xo=n(),d(Nt.$$.fragment),Ko=n(),R=r("div"),d(Rt.$$.fragment),vs=n(),io=r("p"),io.textContent=Il,bs=n(),mo=r("blockquote"),mo.innerHTML=Ml,_s=n(),d(Ae.$$.fragment),ea=n(),d(Ut.$$.fragment),ta=n(),Wt=r("p"),Wt.textContent=Al,na=n(),Bt=r("ol"),Bt.innerHTML=Ll,oa=n(),d(Vt.$$.fragment),aa=n(),St=r("p"),St.innerHTML=ql,ra=n(),d(zt.$$.fragment),sa=n(),Ot=r("div"),d(Zt.$$.fragment),la=n(),d(Gt.$$.fragment),ia=n(),Yt=r("p"),Yt.textContent=jl,da=n(),Ft=r("p"),Ft.innerHTML=Pl,ma=n(),Qt=r("p"),Qt.textContent=Jl,ca=n(),Xt=r("ul"),Xt.innerHTML=Dl,ha=n(),d(Kt.$$.fragment),pa=n(),ee=r("div"),d(en.$$.fragment),$s=n(),co=r("p"),co.textContent=El,ga=n(),d(tn.$$.fragment),ua=n(),J=r("div"),d(nn.$$.fragment),ys=n(),ho=r("p"),ho.textContent=Hl,ws=n(),Le=r("div"),d(on.$$.fragment),Ts=n(),po=r("p"),po.textContent=Nl,xs=n(),qe=r("div"),d(an.$$.fragment),ks=n(),go=r("p"),go.textContent=Rl,Cs=n(),je=r("div"),d(rn.$$.fragment),Is=n(),uo=r("p"),uo.textContent=Ul,fa=n(),d(sn.$$.fragment),va=n(),U=r("div"),d(ln.$$.fragment),Ms=n(),fo=r("p"),fo.textContent=Wl,As=n(),Pe=r("div"),d(dn.$$.fragment),Ls=n(),vo=r("p"),vo.innerHTML=Bl,qs=n(),Je=r("div"),d(mn.$$.fragment),js=n(),bo=r("p"),bo.textContent=Vl,ba=n(),d(cn.$$.fragment),_a=n(),ko=r("p"),this.h()},l(e){const l=Yl("svelte-u9bgzb",document.head);f=s(l,"META",{name:!0,content:!0}),l.forEach(a),x=o(e),y=s(e,"P",{}),b(y).forEach(a),w=o(e),m(T.$$.fragment,e),v=o(e),m(C.$$.fragment,e),Io=o(e),Re=s(e,"P",{"data-svelte-h":!0}),u(Re)!=="svelte-7mj07q"&&(Re.innerHTML=Js),Mo=o(e),m(Ue.$$.fragment,e),Ao=o(e),We=s(e,"P",{"data-svelte-h":!0}),u(We)!=="svelte-1cpidxc"&&(We.innerHTML=Ds),Lo=o(e),Be=s(e,"UL",{"data-svelte-h":!0}),u(Be)!=="svelte-1psnub8"&&(Be.innerHTML=Es),qo=o(e),m(Ve.$$.fragment,e),jo=o(e),P=s(e,"DIV",{class:!0});var W=b(P);m(Se.$$.fragment,W),Ga=o(W),te=s(W,"DIV",{class:!0});var hn=b(te);m(ze.$$.fragment,hn),Ya=o(hn),bn=s(hn,"P",{"data-svelte-h":!0}),u(bn)!=="svelte-a91m64"&&(bn.textContent=Hs),hn.forEach(a),Fa=o(W),ne=s(W,"DIV",{class:!0});var pn=b(ne);m(Oe.$$.fragment,pn),Qa=o(pn),_n=s(pn,"P",{"data-svelte-h":!0}),u(_n)!=="svelte-104knry"&&(_n.textContent=Ns),pn.forEach(a),Xa=o(W),oe=s(W,"DIV",{class:!0});var gn=b(oe);m(Ze.$$.fragment,gn),Ka=o(gn),$n=s(gn,"P",{"data-svelte-h":!0}),u($n)!=="svelte-wvvftk"&&($n.textContent=Rs),gn.forEach(a),er=o(W),ae=s(W,"DIV",{class:!0});var un=b(ae);m(Ge.$$.fragment,un),tr=o(un),yn=s(un,"P",{"data-svelte-h":!0}),u(yn)!=="svelte-1cw6633"&&(yn.textContent=Us),un.forEach(a),W.forEach(a),Po=o(e),m(Ye.$$.fragment,e),Jo=o(e),N=s(e,"DIV",{class:!0});var Z=b(N);m(Fe.$$.fragment,Z),nr=o(Z),wn=s(Z,"P",{"data-svelte-h":!0}),u(wn)!=="svelte-rq8zg0"&&(wn.textContent=Ws),or=o(Z),re=s(Z,"DIV",{class:!0});var fn=b(re);m(Qe.$$.fragment,fn),ar=o(fn),Tn=s(fn,"P",{"data-svelte-h":!0}),u(Tn)!=="svelte-tvi94l"&&(Tn.innerHTML=Bs),fn.forEach(a),rr=o(Z),G=s(Z,"DIV",{class:!0});var _o=b(G);m(Xe.$$.fragment,_o),sr=o(_o),xn=s(_o,"P",{"data-svelte-h":!0}),u(xn)!=="svelte-tbr5ck"&&(xn.textContent=Vs),lr=o(_o),m(se.$$.fragment,_o),_o.forEach(a),Z.forEach(a),Do=o(e),m(Ke.$$.fragment,e),Eo=o(e),M=s(e,"DIV",{class:!0});var D=b(M);m(et.$$.fragment,D),ir=o(D),kn=s(D,"P",{"data-svelte-h":!0}),u(kn)!=="svelte-c95fji"&&(kn.textContent=Ss),dr=o(D),le=s(D,"DIV",{class:!0});var ya=b(le);m(tt.$$.fragment,ya),mr=o(ya),Cn=s(ya,"P",{"data-svelte-h":!0}),u(Cn)!=="svelte-17ywxxr"&&(Cn.innerHTML=zs),ya.forEach(a),cr=o(D),ie=s(D,"DIV",{class:!0});var wa=b(ie);m(nt.$$.fragment,wa),hr=o(wa),In=s(wa,"P",{"data-svelte-h":!0}),u(In)!=="svelte-e54ku6"&&(In.textContent=Os),wa.forEach(a),pr=o(D),de=s(D,"DIV",{class:!0});var Ta=b(de);m(ot.$$.fragment,Ta),gr=o(Ta),Mn=s(Ta,"P",{"data-svelte-h":!0}),u(Mn)!=="svelte-1ii4mb"&&(Mn.textContent=Zs),Ta.forEach(a),ur=o(D),Y=s(D,"DIV",{class:!0});var $o=b(Y);m(at.$$.fragment,$o),fr=o($o),An=s($o,"P",{"data-svelte-h":!0}),u(An)!=="svelte-tbr5ck"&&(An.textContent=Gs),vr=o($o),m(me.$$.fragment,$o),$o.forEach(a),br=o(D),ce=s(D,"DIV",{class:!0});var xa=b(ce);m(rt.$$.fragment,xa),_r=o(xa),Ln=s(xa,"P",{"data-svelte-h":!0}),u(Ln)!=="svelte-nf9see"&&(Ln.innerHTML=Ys),xa.forEach(a),D.forEach(a),Ho=o(e),S=s(e,"DIV",{class:!0});var yo=b(S);m(st.$$.fragment,yo),$r=o(yo),qn=s(yo,"P",{"data-svelte-h":!0}),u(qn)!=="svelte-1ip7q5f"&&(qn.textContent=Fs),yr=o(yo),he=s(yo,"DIV",{class:!0});var ka=b(he);m(lt.$$.fragment,ka),wr=o(ka),jn=s(ka,"P",{"data-svelte-h":!0}),u(jn)!=="svelte-1bbx2c8"&&(jn.textContent=Qs),ka.forEach(a),yo.forEach(a),No=o(e),z=s(e,"DIV",{class:!0});var wo=b(z);m(it.$$.fragment,wo),Tr=o(wo),Pn=s(wo,"P",{"data-svelte-h":!0}),u(Pn)!=="svelte-1egm30q"&&(Pn.textContent=Xs),xr=o(wo),pe=s(wo,"DIV",{class:!0});var Ca=b(pe);m(dt.$$.fragment,Ca),kr=o(Ca),Jn=s(Ca,"P",{"data-svelte-h":!0}),u(Jn)!=="svelte-1bbx2c8"&&(Jn.textContent=Ks),Ca.forEach(a),wo.forEach(a),Ro=o(e),m(mt.$$.fragment,e),Uo=o(e),m(ct.$$.fragment,e),Wo=o(e),O=s(e,"DIV",{class:!0});var To=b(O);m(ht.$$.fragment,To),Cr=o(To),Dn=s(To,"P",{"data-svelte-h":!0}),u(Dn)!=="svelte-16uh3p8"&&(Dn.textContent=el),Ir=o(To),m(ge.$$.fragment,To),To.forEach(a),Bo=o(e),m(pt.$$.fragment,e),Vo=o(e),k=s(e,"DIV",{class:!0});var I=b(k);m(gt.$$.fragment,I),Mr=o(I),En=s(I,"P",{"data-svelte-h":!0}),u(En)!=="svelte-cca4c5"&&(En.innerHTML=tl),Ar=o(I),Hn=s(I,"UL",{"data-svelte-h":!0}),u(Hn)!=="svelte-1cvtzkm"&&(Hn.innerHTML=nl),Lr=o(I),Nn=s(I,"P",{"data-svelte-h":!0}),u(Nn)!=="svelte-18vdu1m"&&(Nn.innerHTML=ol),qr=o(I),ue=s(I,"DIV",{class:!0});var Ia=b(ue);m(ut.$$.fragment,Ia),jr=o(Ia),Rn=s(Ia,"P",{"data-svelte-h":!0}),u(Rn)!=="svelte-hst3q8"&&(Rn.innerHTML=al),Ia.forEach(a),Pr=o(I),F=s(I,"DIV",{class:!0});var xo=b(F);m(ft.$$.fragment,xo),Jr=o(xo),Un=s(xo,"P",{"data-svelte-h":!0}),u(Un)!=="svelte-yy7b2c"&&(Un.textContent=rl),Dr=o(xo),m(fe.$$.fragment,xo),xo.forEach(a),Er=o(I),ve=s(I,"DIV",{class:!0});var Ma=b(ve);m(vt.$$.fragment,Ma),Hr=o(Ma),Wn=s(Ma,"P",{"data-svelte-h":!0}),u(Wn)!=="svelte-rytxwn"&&(Wn.innerHTML=sl),Ma.forEach(a),Nr=o(I),B=s(I,"DIV",{class:!0});var De=b(B);m(bt.$$.fragment,De),Rr=o(De),Bn=s(De,"P",{"data-svelte-h":!0}),u(Bn)!=="svelte-1u3gku9"&&(Bn.textContent=ll),Ur=o(De),Vn=s(De,"P",{"data-svelte-h":!0}),u(Vn)!=="svelte-1yeagwn"&&(Vn.innerHTML=il),Wr=o(De),m(be.$$.fragment,De),De.forEach(a),Br=o(I),V=s(I,"DIV",{class:!0});var Ee=b(V);m(_t.$$.fragment,Ee),Vr=o(Ee),Sn=s(Ee,"P",{"data-svelte-h":!0}),u(Sn)!=="svelte-19evuwa"&&(Sn.innerHTML=dl),Sr=o(Ee),zn=s(Ee,"UL",{"data-svelte-h":!0}),u(zn)!=="svelte-15of9ze"&&(zn.innerHTML=ml),zr=o(Ee),On=s(Ee,"P",{"data-svelte-h":!0}),u(On)!=="svelte-msa4ge"&&(On.innerHTML=cl),Ee.forEach(a),Or=o(I),_e=s(I,"DIV",{class:!0});var Aa=b(_e);m($t.$$.fragment,Aa),Zr=o(Aa),Zn=s(Aa,"P",{"data-svelte-h":!0}),u(Zn)!=="svelte-63kthh"&&(Zn.textContent=hl),Aa.forEach(a),I.forEach(a),So=o(e),m(yt.$$.fragment,e),zo=o(e),A=s(e,"DIV",{class:!0});var E=b(A);m(wt.$$.fragment,E),Gr=o(E),Gn=s(E,"P",{"data-svelte-h":!0}),u(Gn)!=="svelte-1jgzyq0"&&(Gn.textContent=pl),Yr=o(E),$e=s(E,"DIV",{class:!0});var La=b($e);m(Tt.$$.fragment,La),Fr=o(La),Yn=s(La,"P",{"data-svelte-h":!0}),u(Yn)!=="svelte-g8q0nk"&&(Yn.textContent=gl),La.forEach(a),Qr=o(E),ye=s(E,"DIV",{class:!0});var qa=b(ye);m(xt.$$.fragment,qa),Xr=o(qa),Fn=s(qa,"P",{"data-svelte-h":!0}),u(Fn)!=="svelte-1l2znf2"&&(Fn.textContent=ul),qa.forEach(a),Kr=o(E),we=s(E,"DIV",{class:!0});var ja=b(we);m(kt.$$.fragment,ja),es=o(ja),Qn=s(ja,"P",{"data-svelte-h":!0}),u(Qn)!=="svelte-165lhg0"&&(Qn.textContent=fl),ja.forEach(a),ts=o(E),Te=s(E,"DIV",{class:!0});var Pa=b(Te);m(Ct.$$.fragment,Pa),ns=o(Pa),Xn=s(Pa,"P",{"data-svelte-h":!0}),u(Xn)!=="svelte-15vkk0u"&&(Xn.textContent=vl),Pa.forEach(a),os=o(E),xe=s(E,"DIV",{class:!0});var Ja=b(xe);m(It.$$.fragment,Ja),as=o(Ja),Kn=s(Ja,"P",{"data-svelte-h":!0}),u(Kn)!=="svelte-1p64qrs"&&(Kn.textContent=bl),Ja.forEach(a),E.forEach(a),Oo=o(e),m(Mt.$$.fragment,e),Zo=o(e),L=s(e,"DIV",{class:!0});var H=b(L);m(At.$$.fragment,H),rs=o(H),eo=s(H,"P",{"data-svelte-h":!0}),u(eo)!=="svelte-wcx9v9"&&(eo.innerHTML=_l),ss=o(H),to=s(H,"UL",{"data-svelte-h":!0}),u(to)!=="svelte-xcp9s"&&(to.innerHTML=$l),ls=o(H),ke=s(H,"DIV",{class:!0});var Da=b(ke);m(Lt.$$.fragment,Da),is=o(Da),no=s(Da,"P",{"data-svelte-h":!0}),u(no)!=="svelte-zkjq4t"&&(no.innerHTML=yl),Da.forEach(a),ds=o(H),Ce=s(H,"DIV",{class:!0});var Ea=b(Ce);m(qt.$$.fragment,Ea),ms=o(Ea),oo=s(Ea,"P",{"data-svelte-h":!0}),u(oo)!=="svelte-1vxzk80"&&(oo.innerHTML=wl),Ea.forEach(a),cs=o(H),Ie=s(H,"DIV",{class:!0});var Ha=b(Ie);m(jt.$$.fragment,Ha),hs=o(Ha),ao=s(Ha,"P",{"data-svelte-h":!0}),u(ao)!=="svelte-1qgsi13"&&(ao.innerHTML=Tl),Ha.forEach(a),ps=o(H),Me=s(H,"DIV",{class:!0});var Na=b(Me);m(Pt.$$.fragment,Na),gs=o(Na),ro=s(Na,"P",{"data-svelte-h":!0}),u(ro)!=="svelte-1ojxz66"&&(ro.innerHTML=xl),Na.forEach(a),H.forEach(a),Go=o(e),m(Jt.$$.fragment,e),Yo=o(e),X=s(e,"DIV",{class:!0});var Ra=b(X);m(Dt.$$.fragment,Ra),us=o(Ra),so=s(Ra,"P",{"data-svelte-h":!0}),u(so)!=="svelte-j4u4it"&&(so.innerHTML=kl),Ra.forEach(a),Fo=o(e),m(Et.$$.fragment,e),Qo=o(e),K=s(e,"DIV",{class:!0});var Ua=b(K);m(Ht.$$.fragment,Ua),fs=o(Ua),lo=s(Ua,"P",{"data-svelte-h":!0}),u(lo)!=="svelte-3yyclm"&&(lo.textContent=Cl),Ua.forEach(a),Xo=o(e),m(Nt.$$.fragment,e),Ko=o(e),R=s(e,"DIV",{class:!0});var He=b(R);m(Rt.$$.fragment,He),vs=o(He),io=s(He,"P",{"data-svelte-h":!0}),u(io)!=="svelte-n5kqzu"&&(io.textContent=Il),bs=o(He),mo=s(He,"BLOCKQUOTE",{"data-svelte-h":!0}),u(mo)!=="svelte-1ezz2hf"&&(mo.innerHTML=Ml),_s=o(He),m(Ae.$$.fragment,He),He.forEach(a),ea=o(e),m(Ut.$$.fragment,e),ta=o(e),Wt=s(e,"P",{"data-svelte-h":!0}),u(Wt)!=="svelte-oor881"&&(Wt.textContent=Al),na=o(e),Bt=s(e,"OL",{"data-svelte-h":!0}),u(Bt)!=="svelte-1fvckr8"&&(Bt.innerHTML=Ll),oa=o(e),m(Vt.$$.fragment,e),aa=o(e),St=s(e,"P",{"data-svelte-h":!0}),u(St)!=="svelte-1helv3l"&&(St.innerHTML=ql),ra=o(e),m(zt.$$.fragment,e),sa=o(e),Ot=s(e,"DIV",{class:!0});var Sl=b(Ot);m(Zt.$$.fragment,Sl),Sl.forEach(a),la=o(e),m(Gt.$$.fragment,e),ia=o(e),Yt=s(e,"P",{"data-svelte-h":!0}),u(Yt)!=="svelte-jsq4jz"&&(Yt.textContent=jl),da=o(e),Ft=s(e,"P",{"data-svelte-h":!0}),u(Ft)!=="svelte-1ixcu88"&&(Ft.innerHTML=Pl),ma=o(e),Qt=s(e,"P",{"data-svelte-h":!0}),u(Qt)!=="svelte-1nfvcwf"&&(Qt.textContent=Jl),ca=o(e),Xt=s(e,"UL",{"data-svelte-h":!0}),u(Xt)!=="svelte-ysem30"&&(Xt.innerHTML=Dl),ha=o(e),m(Kt.$$.fragment,e),pa=o(e),ee=s(e,"DIV",{class:!0});var Wa=b(ee);m(en.$$.fragment,Wa),$s=o(Wa),co=s(Wa,"P",{"data-svelte-h":!0}),u(co)!=="svelte-57fhj7"&&(co.textContent=El),Wa.forEach(a),ga=o(e),m(tn.$$.fragment,e),ua=o(e),J=s(e,"DIV",{class:!0});var Q=b(J);m(nn.$$.fragment,Q),ys=o(Q),ho=s(Q,"P",{"data-svelte-h":!0}),u(ho)!=="svelte-1hsb0qs"&&(ho.textContent=Hl),ws=o(Q),Le=s(Q,"DIV",{class:!0});var Ba=b(Le);m(on.$$.fragment,Ba),Ts=o(Ba),po=s(Ba,"P",{"data-svelte-h":!0}),u(po)!=="svelte-qix5eq"&&(po.textContent=Nl),Ba.forEach(a),xs=o(Q),qe=s(Q,"DIV",{class:!0});var Va=b(qe);m(an.$$.fragment,Va),ks=o(Va),go=s(Va,"P",{"data-svelte-h":!0}),u(go)!=="svelte-ybie7i"&&(go.textContent=Rl),Va.forEach(a),Cs=o(Q),je=s(Q,"DIV",{class:!0});var Sa=b(je);m(rn.$$.fragment,Sa),Is=o(Sa),uo=s(Sa,"P",{"data-svelte-h":!0}),u(uo)!=="svelte-chc6sp"&&(uo.textContent=Ul),Sa.forEach(a),Q.forEach(a),fa=o(e),m(sn.$$.fragment,e),va=o(e),U=s(e,"DIV",{class:!0});var Ne=b(U);m(ln.$$.fragment,Ne),Ms=o(Ne),fo=s(Ne,"P",{"data-svelte-h":!0}),u(fo)!=="svelte-ckiqb6"&&(fo.textContent=Wl),As=o(Ne),Pe=s(Ne,"DIV",{class:!0});var za=b(Pe);m(dn.$$.fragment,za),Ls=o(za),vo=s(za,"P",{"data-svelte-h":!0}),u(vo)!=="svelte-10rnn1x"&&(vo.innerHTML=Bl),za.forEach(a),qs=o(Ne),Je=s(Ne,"DIV",{class:!0});var Oa=b(Je);m(mn.$$.fragment,Oa),js=o(Oa),bo=s(Oa,"P",{"data-svelte-h":!0}),u(bo)!=="svelte-1xu9o93"&&(bo.textContent=Vl),Oa.forEach(a),Ne.forEach(a),ba=o(e),m(cn.$$.fragment,e),_a=o(e),ko=s(e,"P",{}),b(ko).forEach(a),this.h()},h(){_(f,"name","hf:doc:metadata"),_(f,"content",ri),_(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(U,"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,l){t(document.head,f),i(e,x,l),i(e,y,l),i(e,w,l),c(T,e,l),i(e,v,l),c(C,e,l),i(e,Io,l),i(e,Re,l),i(e,Mo,l),c(Ue,e,l),i(e,Ao,l),i(e,We,l),i(e,Lo,l),i(e,Be,l),i(e,qo,l),c(Ve,e,l),i(e,jo,l),i(e,P,l),c(Se,P,null),t(P,Ga),t(P,te),c(ze,te,null),t(te,Ya),t(te,bn),t(P,Fa),t(P,ne),c(Oe,ne,null),t(ne,Qa),t(ne,_n),t(P,Xa),t(P,oe),c(Ze,oe,null),t(oe,Ka),t(oe,$n),t(P,er),t(P,ae),c(Ge,ae,null),t(ae,tr),t(ae,yn),i(e,Po,l),c(Ye,e,l),i(e,Jo,l),i(e,N,l),c(Fe,N,null),t(N,nr),t(N,wn),t(N,or),t(N,re),c(Qe,re,null),t(re,ar),t(re,Tn),t(N,rr),t(N,G),c(Xe,G,null),t(G,sr),t(G,xn),t(G,lr),c(se,G,null),i(e,Do,l),c(Ke,e,l),i(e,Eo,l),i(e,M,l),c(et,M,null),t(M,ir),t(M,kn),t(M,dr),t(M,le),c(tt,le,null),t(le,mr),t(le,Cn),t(M,cr),t(M,ie),c(nt,ie,null),t(ie,hr),t(ie,In),t(M,pr),t(M,de),c(ot,de,null),t(de,gr),t(de,Mn),t(M,ur),t(M,Y),c(at,Y,null),t(Y,fr),t(Y,An),t(Y,vr),c(me,Y,null),t(M,br),t(M,ce),c(rt,ce,null),t(ce,_r),t(ce,Ln),i(e,Ho,l),i(e,S,l),c(st,S,null),t(S,$r),t(S,qn),t(S,yr),t(S,he),c(lt,he,null),t(he,wr),t(he,jn),i(e,No,l),i(e,z,l),c(it,z,null),t(z,Tr),t(z,Pn),t(z,xr),t(z,pe),c(dt,pe,null),t(pe,kr),t(pe,Jn),i(e,Ro,l),c(mt,e,l),i(e,Uo,l),c(ct,e,l),i(e,Wo,l),i(e,O,l),c(ht,O,null),t(O,Cr),t(O,Dn),t(O,Ir),c(ge,O,null),i(e,Bo,l),c(pt,e,l),i(e,Vo,l),i(e,k,l),c(gt,k,null),t(k,Mr),t(k,En),t(k,Ar),t(k,Hn),t(k,Lr),t(k,Nn),t(k,qr),t(k,ue),c(ut,ue,null),t(ue,jr),t(ue,Rn),t(k,Pr),t(k,F),c(ft,F,null),t(F,Jr),t(F,Un),t(F,Dr),c(fe,F,null),t(k,Er),t(k,ve),c(vt,ve,null),t(ve,Hr),t(ve,Wn),t(k,Nr),t(k,B),c(bt,B,null),t(B,Rr),t(B,Bn),t(B,Ur),t(B,Vn),t(B,Wr),c(be,B,null),t(k,Br),t(k,V),c(_t,V,null),t(V,Vr),t(V,Sn),t(V,Sr),t(V,zn),t(V,zr),t(V,On),t(k,Or),t(k,_e),c($t,_e,null),t(_e,Zr),t(_e,Zn),i(e,So,l),c(yt,e,l),i(e,zo,l),i(e,A,l),c(wt,A,null),t(A,Gr),t(A,Gn),t(A,Yr),t(A,$e),c(Tt,$e,null),t($e,Fr),t($e,Yn),t(A,Qr),t(A,ye),c(xt,ye,null),t(ye,Xr),t(ye,Fn),t(A,Kr),t(A,we),c(kt,we,null),t(we,es),t(we,Qn),t(A,ts),t(A,Te),c(Ct,Te,null),t(Te,ns),t(Te,Xn),t(A,os),t(A,xe),c(It,xe,null),t(xe,as),t(xe,Kn),i(e,Oo,l),c(Mt,e,l),i(e,Zo,l),i(e,L,l),c(At,L,null),t(L,rs),t(L,eo),t(L,ss),t(L,to),t(L,ls),t(L,ke),c(Lt,ke,null),t(ke,is),t(ke,no),t(L,ds),t(L,Ce),c(qt,Ce,null),t(Ce,ms),t(Ce,oo),t(L,cs),t(L,Ie),c(jt,Ie,null),t(Ie,hs),t(Ie,ao),t(L,ps),t(L,Me),c(Pt,Me,null),t(Me,gs),t(Me,ro),i(e,Go,l),c(Jt,e,l),i(e,Yo,l),i(e,X,l),c(Dt,X,null),t(X,us),t(X,so),i(e,Fo,l),c(Et,e,l),i(e,Qo,l),i(e,K,l),c(Ht,K,null),t(K,fs),t(K,lo),i(e,Xo,l),c(Nt,e,l),i(e,Ko,l),i(e,R,l),c(Rt,R,null),t(R,vs),t(R,io),t(R,bs),t(R,mo),t(R,_s),c(Ae,R,null),i(e,ea,l),c(Ut,e,l),i(e,ta,l),i(e,Wt,l),i(e,na,l),i(e,Bt,l),i(e,oa,l),c(Vt,e,l),i(e,aa,l),i(e,St,l),i(e,ra,l),c(zt,e,l),i(e,sa,l),i(e,Ot,l),c(Zt,Ot,null),i(e,la,l),c(Gt,e,l),i(e,ia,l),i(e,Yt,l),i(e,da,l),i(e,Ft,l),i(e,ma,l),i(e,Qt,l),i(e,ca,l),i(e,Xt,l),i(e,ha,l),c(Kt,e,l),i(e,pa,l),i(e,ee,l),c(en,ee,null),t(ee,$s),t(ee,co),i(e,ga,l),c(tn,e,l),i(e,ua,l),i(e,J,l),c(nn,J,null),t(J,ys),t(J,ho),t(J,ws),t(J,Le),c(on,Le,null),t(Le,Ts),t(Le,po),t(J,xs),t(J,qe),c(an,qe,null),t(qe,ks),t(qe,go),t(J,Cs),t(J,je),c(rn,je,null),t(je,Is),t(je,uo),i(e,fa,l),c(sn,e,l),i(e,va,l),i(e,U,l),c(ln,U,null),t(U,Ms),t(U,fo),t(U,As),t(U,Pe),c(dn,Pe,null),t(Pe,Ls),t(Pe,vo),t(U,qs),t(U,Je),c(mn,Je,null),t(Je,js),t(Je,bo),i(e,ba,l),c(cn,e,l),i(e,_a,l),i(e,ko,l),$a=!0},p(e,[l]){const W={};l&2&&(W.$$scope={dirty:l,ctx:e}),C.$set(W);const hn={};l&2&&(hn.$$scope={dirty:l,ctx:e}),se.$set(hn);const pn={};l&2&&(pn.$$scope={dirty:l,ctx:e}),me.$set(pn);const gn={};l&2&&(gn.$$scope={dirty:l,ctx:e}),ge.$set(gn);const un={};l&2&&(un.$$scope={dirty:l,ctx:e}),fe.$set(un);const Z={};l&2&&(Z.$$scope={dirty:l,ctx:e}),be.$set(Z);const fn={};l&2&&(fn.$$scope={dirty:l,ctx:e}),Ae.$set(fn)},i(e){$a||(h(T.$$.fragment,e),h(C.$$.fragment,e),h(Ue.$$.fragment,e),h(Ve.$$.fragment,e),h(Se.$$.fragment,e),h(ze.$$.fragment,e),h(Oe.$$.fragment,e),h(Ze.$$.fragment,e),h(Ge.$$.fragment,e),h(Ye.$$.fragment,e),h(Fe.$$.fragment,e),h(Qe.$$.fragment,e),h(Xe.$$.fragment,e),h(se.$$.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(me.$$.fragment,e),h(rt.$$.fragment,e),h(st.$$.fragment,e),h(lt.$$.fragment,e),h(it.$$.fragment,e),h(dt.$$.fragment,e),h(mt.$$.fragment,e),h(ct.$$.fragment,e),h(ht.$$.fragment,e),h(ge.$$.fragment,e),h(pt.$$.fragment,e),h(gt.$$.fragment,e),h(ut.$$.fragment,e),h(ft.$$.fragment,e),h(fe.$$.fragment,e),h(vt.$$.fragment,e),h(bt.$$.fragment,e),h(be.$$.fragment,e),h(_t.$$.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(Mt.$$.fragment,e),h(At.$$.fragment,e),h(Lt.$$.fragment,e),h(qt.$$.fragment,e),h(jt.$$.fragment,e),h(Pt.$$.fragment,e),h(Jt.$$.fragment,e),h(Dt.$$.fragment,e),h(Et.$$.fragment,e),h(Ht.$$.fragment,e),h(Nt.$$.fragment,e),h(Rt.$$.fragment,e),h(Ae.$$.fragment,e),h(Ut.$$.fragment,e),h(Vt.$$.fragment,e),h(zt.$$.fragment,e),h(Zt.$$.fragment,e),h(Gt.$$.fragment,e),h(Kt.$$.fragment,e),h(en.$$.fragment,e),h(tn.$$.fragment,e),h(nn.$$.fragment,e),h(on.$$.fragment,e),h(an.$$.fragment,e),h(rn.$$.fragment,e),h(sn.$$.fragment,e),h(ln.$$.fragment,e),h(dn.$$.fragment,e),h(mn.$$.fragment,e),h(cn.$$.fragment,e),$a=!0)},o(e){p(T.$$.fragment,e),p(C.$$.fragment,e),p(Ue.$$.fragment,e),p(Ve.$$.fragment,e),p(Se.$$.fragment,e),p(ze.$$.fragment,e),p(Oe.$$.fragment,e),p(Ze.$$.fragment,e),p(Ge.$$.fragment,e),p(Ye.$$.fragment,e),p(Fe.$$.fragment,e),p(Qe.$$.fragment,e),p(Xe.$$.fragment,e),p(se.$$.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(me.$$.fragment,e),p(rt.$$.fragment,e),p(st.$$.fragment,e),p(lt.$$.fragment,e),p(it.$$.fragment,e),p(dt.$$.fragment,e),p(mt.$$.fragment,e),p(ct.$$.fragment,e),p(ht.$$.fragment,e),p(ge.$$.fragment,e),p(pt.$$.fragment,e),p(gt.$$.fragment,e),p(ut.$$.fragment,e),p(ft.$$.fragment,e),p(fe.$$.fragment,e),p(vt.$$.fragment,e),p(bt.$$.fragment,e),p(be.$$.fragment,e),p(_t.$$.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(Mt.$$.fragment,e),p(At.$$.fragment,e),p(Lt.$$.fragment,e),p(qt.$$.fragment,e),p(jt.$$.fragment,e),p(Pt.$$.fragment,e),p(Jt.$$.fragment,e),p(Dt.$$.fragment,e),p(Et.$$.fragment,e),p(Ht.$$.fragment,e),p(Nt.$$.fragment,e),p(Rt.$$.fragment,e),p(Ae.$$.fragment,e),p(Ut.$$.fragment,e),p(Vt.$$.fragment,e),p(zt.$$.fragment,e),p(Zt.$$.fragment,e),p(Gt.$$.fragment,e),p(Kt.$$.fragment,e),p(en.$$.fragment,e),p(tn.$$.fragment,e),p(nn.$$.fragment,e),p(on.$$.fragment,e),p(an.$$.fragment,e),p(rn.$$.fragment,e),p(sn.$$.fragment,e),p(ln.$$.fragment,e),p(dn.$$.fragment,e),p(mn.$$.fragment,e),p(cn.$$.fragment,e),$a=!1},d(e){e&&(a(x),a(y),a(w),a(v),a(Io),a(Re),a(Mo),a(Ao),a(We),a(Lo),a(Be),a(qo),a(jo),a(P),a(Po),a(Jo),a(N),a(Do),a(Eo),a(M),a(Ho),a(S),a(No),a(z),a(Ro),a(Uo),a(Wo),a(O),a(Bo),a(Vo),a(k),a(So),a(zo),a(A),a(Oo),a(Zo),a(L),a(Go),a(Yo),a(X),a(Fo),a(Qo),a(K),a(Xo),a(Ko),a(R),a(ea),a(ta),a(Wt),a(na),a(Bt),a(oa),a(aa),a(St),a(ra),a(sa),a(Ot),a(la),a(ia),a(Yt),a(da),a(Ft),a(ma),a(Qt),a(ca),a(Xt),a(ha),a(pa),a(ee),a(ga),a(ua),a(J),a(fa),a(va),a(U),a(ba),a(_a),a(ko)),a(f),g(T,e),g(C,e),g(Ue,e),g(Ve,e),g(Se),g(ze),g(Oe),g(Ze),g(Ge),g(Ye,e),g(Fe),g(Qe),g(Xe),g(se),g(Ke,e),g(et),g(tt),g(nt),g(ot),g(at),g(me),g(rt),g(st),g(lt),g(it),g(dt),g(mt,e),g(ct,e),g(ht),g(ge),g(pt,e),g(gt),g(ut),g(ft),g(fe),g(vt),g(bt),g(be),g(_t),g($t),g(yt,e),g(wt),g(Tt),g(xt),g(kt),g(Ct),g(It),g(Mt,e),g(At),g(Lt),g(qt),g(jt),g(Pt),g(Jt,e),g(Dt),g(Et,e),g(Ht),g(Nt,e),g(Rt),g(Ae),g(Ut,e),g(Vt,e),g(zt,e),g(Zt),g(Gt,e),g(Kt,e),g(en),g(tn,e),g(nn),g(on),g(an),g(rn),g(sn,e),g(ln),g(dn),g(mn),g(cn,e)}}}const ri='{"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":"stream_to_gradio","local":"transformers.stream_to_gradio","sections":[],"depth":3},{"title":"ToolCollection","local":"transformers.ToolCollection","sections":[],"depth":3}],"depth":2},{"title":"Engines","local":"engines","sections":[{"title":"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 si(j){return Ol(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gi extends Zl{constructor(f){super(),Gl(this,f,si,ai,zl,{})}}export{gi as component};
