import{s as Ke,o as De,n as Re}from"../chunks/scheduler.889ebb13.js";import{S as Oe,i as et,g as m,s,r as f,m as D,A as tt,h as u,f as l,c as i,j as We,u as g,x as d,n as O,k as ee,y as Ie,a as n,v as y,d as b,t as w,w as M}from"../chunks/index.ca18042b.js";import{T as ke}from"../chunks/Tip.b8116e3c.js";import{C as ne}from"../chunks/CodeBlock.1db71023.js";import{H as oe}from"../chunks/Heading.3daa581c.js";import{E as lt}from"../chunks/EditOnGithub.2e95618d.js";function nt(Z){let r,o,h="this notebook",c;return{c(){r=D("You can follow the code in "),o=m("a"),o.textContent=h,c=D(" that you can run using Google Colab."),this.h()},l(a){r=O(a,"You can follow the code in "),o=u(a,"A",{href:!0,target:!0,"data-svelte-h":!0}),d(o)!=="svelte-1oi8dw1"&&(o.textContent=h),c=O(a," that you can run using Google Colab."),this.h()},h(){ee(o,"href","https://huggingface.co/agents-course/notebooks/blob/main/unit2/llama-index/tools.ipynb"),ee(o,"target","_blank")},m(a,$){n(a,r,$),n(a,o,$),n(a,c,$)},p:Re,d(a){a&&(l(r),l(o),l(c))}}}function ot(Z){let r,o,h="Function Calling Guide",c,a,$="Function Calling Learning Guide",T;return{c(){r=D("When using an agent or LLM with function calling, the tool selected (and the arguments written for that tool) rely strongly on the tool name and description of the purpose and arguments of the tool. Learn more about function calling in the "),o=m("a"),o.textContent=h,c=D(" and "),a=m("a"),a.textContent=$,T=D("."),this.h()},l(p){r=O(p,"When using an agent or LLM with function calling, the tool selected (and the arguments written for that tool) rely strongly on the tool name and description of the purpose and arguments of the tool. Learn more about function calling in the "),o=u(p,"A",{href:!0,"data-svelte-h":!0}),d(o)!=="svelte-kqlt1w"&&(o.textContent=h),c=O(p," and "),a=u(p,"A",{href:!0,"data-svelte-h":!0}),d(a)!=="svelte-4p3bp7"&&(a.textContent=$),T=O(p,"."),this.h()},h(){ee(o,"href","https://docs.llamaindex.ai/en/stable/module_guides/deploying/agents/modules/function_calling.html"),ee(a,"href","https://docs.llamaindex.ai/en/stable/understanding/agent/function_calling.html")},m(p,v){n(p,r,v),n(p,o,v),n(p,c,v),n(p,a,v),n(p,T,v)},p:Re,d(p){p&&(l(r),l(o),l(c),l(a),l(T))}}}function at(Z){let r,o,h="LlamaHub";return{c(){r=D("You can find toolspecs and utility tools on the "),o=m("a"),o.textContent=h,this.h()},l(c){r=O(c,"You can find toolspecs and utility tools on the "),o=u(c,"A",{href:!0,"data-svelte-h":!0}),d(o)!=="svelte-b92hie"&&(o.textContent=h),this.h()},h(){ee(o,"href","https://llamahub.ai/")},m(c,a){n(c,r,a),n(c,o,a)},p:Re,d(c){c&&(l(r),l(o))}}}function st(Z){let r,o,h,c,a,$,T,p=`<strong>Defining a clear set of Tools is crucial to performance.</strong> As we discussed in <a href="../../unit1/tools">unit 1</a>, clear tool interfaces are easier for LLMs to use.
Much like a software API interface for human engineers, they can get more out of the tool if it’s easy to understand how it works.`,v,G,Ve="There are <strong>four main types of tools in LlamaIndex</strong>:",ae,x,Le='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/tools.png" alt="Tools"/>',se,C,Be="<li><code>FunctionTool</code>: Convert any Python function into a tool that an agent can use. It automatically figures out how the function works.</li> <li><code>QueryEngineTool</code>: A tool that lets agents use query engines. Since agents are built on query engines, they can also use other agents as tools.</li> <li><code>Toolspecs</code>: Sets of tools created by the community, which often include tools for specific services like Gmail.</li> <li><code>Utility Tools</code>: Special tools that help handle large amounts of data from other tools.</li>",ie,W,Ee="We will go over each of them in more detail below.",re,I,ce,j,me,k,Se=`A FunctionTool provides a simple way to wrap any Python function and make it available to an agent.
You can pass either a synchronous or asynchronous function to the tool, along with optional <code>name</code> and <code>description</code> parameters.
The name and description are particularly important as they help the agent understand when and how to use the tool effectively.
Let’s look at how to create a FunctionTool below and then call it.`,ue,R,de,J,pe,V,he,L,Ne=`The <code>QueryEngine</code> we defined in the previous unit can be easily transformed into a tool using the <code>QueryEngineTool</code> class.
Let’s see how to create a <code>QueryEngineTool</code> from a <code>QueryEngine</code> in the example below.`,fe,B,ge,E,ye,S,He=`Think of <code>ToolSpecs</code> as collections of tools that work together harmoniously - like a well-organized professional toolkit.
Just as a mechanic’s toolkit contains complementary tools that work together for vehicle repairs, a <code>ToolSpec</code> combines related tools for specific purposes.
For example, an accounting agent’s <code>ToolSpec</code> might elegantly integrate spreadsheet capabilities, email functionality, and calculation tools to handle financial tasks with precision and efficiency.`,be,U,te,Xe="Install the Google Toolspec",Ce,N,we,H,Fe="And now we can load the toolspec and convert it to a list of tools.",Me,X,Te,F,Ye="To get a more detailed view of the tools, we can take a look at the <code>metadata</code> of each tool.",$e,Y,ve,Q,Ze,q,Qe=`Oftentimes, directly querying an API <strong>can return an excessive amount of data</strong>, some of which may be irrelevant, overflow the context window of the LLM, or unnecessarily increase the number of tokens that you are using.
Let’s walk through our two main utility tools below.`,je,A,qe="<li><code>OnDemandToolLoader</code>: This tool turns any existing LlamaIndex data loader (BaseReader class) into a tool that an agent can use. The tool can be called with all the parameters needed to trigger <code>load_data</code> from the data loader, along with a natural language query string. During execution, we first load data from the data loader, index it (for instance with a vector store), and then query it ‘on-demand’. All three of these steps happen in a single tool call.</li> <li><code>LoadAndSearchToolSpec</code>: The LoadAndSearchToolSpec takes in any existing Tool as input. As a tool spec, it implements <code>to_tool_list</code>, and when that function is called, two tools are returned: a loading tool and then a search tool. The load Tool execution would call the underlying Tool, and the index the output (by default with a vector index). The search Tool execution would take in a query string as input and call the underlying index.</li>",Je,_,Ue,z,Ae="Now that we understand the basics of agents and tools in LlamaIndex, let’s see how we can <strong>use LlamaIndex to create configurable and manageable workflows!</strong>",_e,P,Ge,le,xe;return a=new oe({props:{title:"Using Tools in LlamaIndex",local:"using-tools-in-llamaindex",headingTag:"h1"}}),I=new oe({props:{title:"Creating a FunctionTool",local:"creating-a-functiontool",headingTag:"h2"}}),j=new ke({props:{$$slots:{default:[nt]},$$scope:{ctx:Z}}}),R=new ne({props:{code:"ZnJvbSUyMGxsYW1hX2luZGV4LmNvcmUudG9vbHMlMjBpbXBvcnQlMjBGdW5jdGlvblRvb2wlMEElMEFkZWYlMjBnZXRfd2VhdGhlcihsb2NhdGlvbiUzQSUyMHN0ciklMjAtJTNFJTIwc3RyJTNBJTBBJTIwJTIwJTIwJTIwJTIyJTIyJTIyVXNlZnVsJTIwZm9yJTIwZ2V0dGluZyUyMHRoZSUyMHdlYXRoZXIlMjBmb3IlMjBhJTIwZ2l2ZW4lMjBsb2NhdGlvbi4lMjIlMjIlMjIlMEElMjAlMjAlMjAlMjBwcmludChmJTIyR2V0dGluZyUyMHdlYXRoZXIlMjBmb3IlMjAlN0Jsb2NhdGlvbiU3RCUyMiklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBmJTIyVGhlJTIwd2VhdGhlciUyMGluJTIwJTdCbG9jYXRpb24lN0QlMjBpcyUyMHN1bm55JTIyJTBBJTBBdG9vbCUyMCUzRCUyMEZ1bmN0aW9uVG9vbC5mcm9tX2RlZmF1bHRzKCUwQSUyMCUyMCUyMCUyMGdldF93ZWF0aGVyJTJDJTBBJTIwJTIwJTIwJTIwbmFtZSUzRCUyMm15X3dlYXRoZXJfdG9vbCUyMiUyQyUwQSUyMCUyMCUyMCUyMGRlc2NyaXB0aW9uJTNEJTIyVXNlZnVsJTIwZm9yJTIwZ2V0dGluZyUyMHRoZSUyMHdlYXRoZXIlMjBmb3IlMjBhJTIwZ2l2ZW4lMjBsb2NhdGlvbi4lMjIlMkMlMEEpJTBBdG9vbC5jYWxsKCUyMk5ldyUyMFlvcmslMjIp",highlighted:`<span class="hljs-keyword">from</span> llama_index.core.tools <span class="hljs-keyword">import</span> FunctionTool

<span class="hljs-keyword">def</span> <span class="hljs-title function_">get_weather</span>(<span class="hljs-params">location: <span class="hljs-built_in">str</span></span>) -&gt; <span class="hljs-built_in">str</span>:
    <span class="hljs-string">&quot;&quot;&quot;Useful for getting the weather for a given location.&quot;&quot;&quot;</span>
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Getting weather for <span class="hljs-subst">{location}</span>&quot;</span>)
    <span class="hljs-keyword">return</span> <span class="hljs-string">f&quot;The weather in <span class="hljs-subst">{location}</span> is sunny&quot;</span>

tool = FunctionTool.from_defaults(
    get_weather,
    name=<span class="hljs-string">&quot;my_weather_tool&quot;</span>,
    description=<span class="hljs-string">&quot;Useful for getting the weather for a given location.&quot;</span>,
)
tool.call(<span class="hljs-string">&quot;New York&quot;</span>)`,wrap:!1}}),J=new ke({props:{$$slots:{default:[ot]},$$scope:{ctx:Z}}}),V=new oe({props:{title:"Creating a QueryEngineTool",local:"creating-a-queryenginetool",headingTag:"h2"}}),B=new ne({props:{code:"ZnJvbSUyMGxsYW1hX2luZGV4LmNvcmUlMjBpbXBvcnQlMjBWZWN0b3JTdG9yZUluZGV4JTBBZnJvbSUyMGxsYW1hX2luZGV4LmNvcmUudG9vbHMlMjBpbXBvcnQlMjBRdWVyeUVuZ2luZVRvb2wlMEFmcm9tJTIwbGxhbWFfaW5kZXgubGxtcy5odWdnaW5nZmFjZV9hcGklMjBpbXBvcnQlMjBIdWdnaW5nRmFjZUluZmVyZW5jZUFQSSUwQWZyb20lMjBsbGFtYV9pbmRleC5lbWJlZGRpbmdzLmh1Z2dpbmdmYWNlX2FwaSUyMGltcG9ydCUyMEh1Z2dpbmdGYWNlSW5mZXJlbmNlQVBJRW1iZWRkaW5nJTBBZnJvbSUyMGxsYW1hX2luZGV4LnZlY3Rvcl9zdG9yZXMuY2hyb21hJTIwaW1wb3J0JTIwQ2hyb21hVmVjdG9yU3RvcmUlMEElMEFlbWJlZF9tb2RlbCUyMCUzRCUyMEh1Z2dpbmdGYWNlSW5mZXJlbmNlQVBJRW1iZWRkaW5nKCUyMkJBQUklMkZiZ2Utc21hbGwtZW4tdjEuNSUyMiklMEElMEFkYiUyMCUzRCUyMGNocm9tYWRiLlBlcnNpc3RlbnRDbGllbnQocGF0aCUzRCUyMi4lMkZhbGZyZWRfY2hyb21hX2RiJTIyKSUwQWNocm9tYV9jb2xsZWN0aW9uJTIwJTNEJTIwZGIuZ2V0X29yX2NyZWF0ZV9jb2xsZWN0aW9uKCUyMmFsZnJlZCUyMiklMEF2ZWN0b3Jfc3RvcmUlMjAlM0QlMjBDaHJvbWFWZWN0b3JTdG9yZShjaHJvbWFfY29sbGVjdGlvbiUzRGNocm9tYV9jb2xsZWN0aW9uKSUwQSUwQWluZGV4JTIwJTNEJTIwVmVjdG9yU3RvcmVJbmRleC5mcm9tX3ZlY3Rvcl9zdG9yZSh2ZWN0b3Jfc3RvcmUlMkMlMjBlbWJlZF9tb2RlbCUzRGVtYmVkX21vZGVsKSUwQSUwQWxsbSUyMCUzRCUyMEh1Z2dpbmdGYWNlSW5mZXJlbmNlQVBJKG1vZGVsX25hbWUlM0QlMjJRd2VuJTJGUXdlbjIuNS1Db2Rlci0zMkItSW5zdHJ1Y3QlMjIpJTBBcXVlcnlfZW5naW5lJTIwJTNEJTIwaW5kZXguYXNfcXVlcnlfZW5naW5lKGxsbSUzRGxsbSklMEF0b29sJTIwJTNEJTIwUXVlcnlFbmdpbmVUb29sLmZyb21fZGVmYXVsdHMocXVlcnlfZW5naW5lJTJDJTIwbmFtZSUzRCUyMnNvbWUlMjB1c2VmdWwlMjBuYW1lJTIyJTJDJTIwZGVzY3JpcHRpb24lM0QlMjJzb21lJTIwdXNlZnVsJTIwZGVzY3JpcHRpb24lMjIp",highlighted:`<span class="hljs-keyword">from</span> llama_index.core <span class="hljs-keyword">import</span> VectorStoreIndex
<span class="hljs-keyword">from</span> llama_index.core.tools <span class="hljs-keyword">import</span> QueryEngineTool
<span class="hljs-keyword">from</span> llama_index.llms.huggingface_api <span class="hljs-keyword">import</span> HuggingFaceInferenceAPI
<span class="hljs-keyword">from</span> llama_index.embeddings.huggingface_api <span class="hljs-keyword">import</span> HuggingFaceInferenceAPIEmbedding
<span class="hljs-keyword">from</span> llama_index.vector_stores.chroma <span class="hljs-keyword">import</span> ChromaVectorStore

embed_model = HuggingFaceInferenceAPIEmbedding(<span class="hljs-string">&quot;BAAI/bge-small-en-v1.5&quot;</span>)

db = chromadb.PersistentClient(path=<span class="hljs-string">&quot;./alfred_chroma_db&quot;</span>)
chroma_collection = db.get_or_create_collection(<span class="hljs-string">&quot;alfred&quot;</span>)
vector_store = ChromaVectorStore(chroma_collection=chroma_collection)

index = VectorStoreIndex.from_vector_store(vector_store, embed_model=embed_model)

llm = HuggingFaceInferenceAPI(model_name=<span class="hljs-string">&quot;Qwen/Qwen2.5-Coder-32B-Instruct&quot;</span>)
query_engine = index.as_query_engine(llm=llm)
tool = QueryEngineTool.from_defaults(query_engine, name=<span class="hljs-string">&quot;some useful name&quot;</span>, description=<span class="hljs-string">&quot;some useful description&quot;</span>)`,wrap:!1}}),E=new oe({props:{title:"Creating Toolspecs",local:"creating-toolspecs",headingTag:"h2"}}),N=new ne({props:{code:"cGlwJTIwaW5zdGFsbCUyMGxsYW1hLWluZGV4LXRvb2xzLWdvb2dsZQ==",highlighted:"pip install llama-index-tools-google",wrap:!1}}),X=new ne({props:{code:"ZnJvbSUyMGxsYW1hX2luZGV4LnRvb2xzLmdvb2dsZSUyMGltcG9ydCUyMEdtYWlsVG9vbFNwZWMlMEElMEF0b29sX3NwZWMlMjAlM0QlMjBHbWFpbFRvb2xTcGVjKCklMEF0b29sX3NwZWNfbGlzdCUyMCUzRCUyMHRvb2xfc3BlYy50b190b29sX2xpc3QoKQ==",highlighted:`<span class="hljs-keyword">from</span> llama_index.tools.google <span class="hljs-keyword">import</span> GmailToolSpec

tool_spec = GmailToolSpec()
tool_spec_list = tool_spec.to_tool_list()`,wrap:!1}}),Y=new ne({props:{code:"JTVCKHRvb2wubWV0YWRhdGEubmFtZSUyQyUyMHRvb2wubWV0YWRhdGEuZGVzY3JpcHRpb24pJTIwZm9yJTIwdG9vbCUyMGluJTIwdG9vbF9zcGVjX2xpc3QlNUQ=",highlighted:'[(tool.metadata.name, tool.metadata.description) <span class="hljs-keyword">for</span> tool <span class="hljs-keyword">in</span> tool_spec_list]',wrap:!1}}),Q=new oe({props:{title:"Utility Tools",local:"utility-tools",headingTag:"h2"}}),_=new ke({props:{$$slots:{default:[at]},$$scope:{ctx:Z}}}),P=new lt({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/en/unit2/llama-index/tools.mdx"}}),{c(){r=m("meta"),o=s(),h=m("p"),c=s(),f(a.$$.fragment),$=s(),T=m("p"),T.innerHTML=p,v=s(),G=m("p"),G.innerHTML=Ve,ae=s(),x=m("p"),x.innerHTML=Le,se=s(),C=m("ol"),C.innerHTML=Be,ie=s(),W=m("p"),W.textContent=Ee,re=s(),f(I.$$.fragment),ce=s(),f(j.$$.fragment),me=s(),k=m("p"),k.innerHTML=Se,ue=s(),f(R.$$.fragment),de=s(),f(J.$$.fragment),pe=s(),f(V.$$.fragment),he=s(),L=m("p"),L.innerHTML=Ne,fe=s(),f(B.$$.fragment),ge=s(),f(E.$$.fragment),ye=s(),S=m("p"),S.innerHTML=He,be=s(),U=m("details"),te=m("summary"),te.textContent=Xe,Ce=D(`
As introduced in the [section on the LlamaHub](llama-hub), we can install the Google toolspec with the following command:

	`),f(N.$$.fragment),we=s(),H=m("p"),H.textContent=Fe,Me=s(),f(X.$$.fragment),Te=s(),F=m("p"),F.innerHTML=Ye,$e=s(),f(Y.$$.fragment),ve=s(),f(Q.$$.fragment),Ze=s(),q=m("p"),q.innerHTML=Qe,je=s(),A=m("ol"),A.innerHTML=qe,Je=s(),f(_.$$.fragment),Ue=s(),z=m("p"),z.innerHTML=Ae,_e=s(),f(P.$$.fragment),Ge=s(),le=m("p"),this.h()},l(e){const t=tt("svelte-u9bgzb",document.head);r=u(t,"META",{name:!0,content:!0}),t.forEach(l),o=i(e),h=u(e,"P",{}),We(h).forEach(l),c=i(e),g(a.$$.fragment,e),$=i(e),T=u(e,"P",{"data-svelte-h":!0}),d(T)!=="svelte-1y4sc3l"&&(T.innerHTML=p),v=i(e),G=u(e,"P",{"data-svelte-h":!0}),d(G)!=="svelte-jgrrn"&&(G.innerHTML=Ve),ae=i(e),x=u(e,"P",{"data-svelte-h":!0}),d(x)!=="svelte-ir2ii4"&&(x.innerHTML=Le),se=i(e),C=u(e,"OL",{"data-svelte-h":!0}),d(C)!=="svelte-7bbi5a"&&(C.innerHTML=Be),ie=i(e),W=u(e,"P",{"data-svelte-h":!0}),d(W)!=="svelte-1hynje"&&(W.textContent=Ee),re=i(e),g(I.$$.fragment,e),ce=i(e),g(j.$$.fragment,e),me=i(e),k=u(e,"P",{"data-svelte-h":!0}),d(k)!=="svelte-1ij77fk"&&(k.innerHTML=Se),ue=i(e),g(R.$$.fragment,e),de=i(e),g(J.$$.fragment,e),pe=i(e),g(V.$$.fragment,e),he=i(e),L=u(e,"P",{"data-svelte-h":!0}),d(L)!=="svelte-wh1h60"&&(L.innerHTML=Ne),fe=i(e),g(B.$$.fragment,e),ge=i(e),g(E.$$.fragment,e),ye=i(e),S=u(e,"P",{"data-svelte-h":!0}),d(S)!=="svelte-1196szp"&&(S.innerHTML=He),be=i(e),U=u(e,"DETAILS",{});var K=We(U);te=u(K,"SUMMARY",{"data-svelte-h":!0}),d(te)!=="svelte-8tnjrg"&&(te.textContent=Xe),Ce=O(K,`
As introduced in the [section on the LlamaHub](llama-hub), we can install the Google toolspec with the following command:

	`),g(N.$$.fragment,K),K.forEach(l),we=i(e),H=u(e,"P",{"data-svelte-h":!0}),d(H)!=="svelte-a37nc2"&&(H.textContent=Fe),Me=i(e),g(X.$$.fragment,e),Te=i(e),F=u(e,"P",{"data-svelte-h":!0}),d(F)!=="svelte-piorhw"&&(F.innerHTML=Ye),$e=i(e),g(Y.$$.fragment,e),ve=i(e),g(Q.$$.fragment,e),Ze=i(e),q=u(e,"P",{"data-svelte-h":!0}),d(q)!=="svelte-1s3291r"&&(q.innerHTML=Qe),je=i(e),A=u(e,"OL",{"data-svelte-h":!0}),d(A)!=="svelte-1el281h"&&(A.innerHTML=qe),Je=i(e),g(_.$$.fragment,e),Ue=i(e),z=u(e,"P",{"data-svelte-h":!0}),d(z)!=="svelte-a13dju"&&(z.innerHTML=Ae),_e=i(e),g(P.$$.fragment,e),Ge=i(e),le=u(e,"P",{}),We(le).forEach(l),this.h()},h(){ee(r,"name","hf:doc:metadata"),ee(r,"content",it)},m(e,t){Ie(document.head,r),n(e,o,t),n(e,h,t),n(e,c,t),y(a,e,t),n(e,$,t),n(e,T,t),n(e,v,t),n(e,G,t),n(e,ae,t),n(e,x,t),n(e,se,t),n(e,C,t),n(e,ie,t),n(e,W,t),n(e,re,t),y(I,e,t),n(e,ce,t),y(j,e,t),n(e,me,t),n(e,k,t),n(e,ue,t),y(R,e,t),n(e,de,t),y(J,e,t),n(e,pe,t),y(V,e,t),n(e,he,t),n(e,L,t),n(e,fe,t),y(B,e,t),n(e,ge,t),y(E,e,t),n(e,ye,t),n(e,S,t),n(e,be,t),n(e,U,t),Ie(U,te),Ie(U,Ce),y(N,U,null),n(e,we,t),n(e,H,t),n(e,Me,t),y(X,e,t),n(e,Te,t),n(e,F,t),n(e,$e,t),y(Y,e,t),n(e,ve,t),y(Q,e,t),n(e,Ze,t),n(e,q,t),n(e,je,t),n(e,A,t),n(e,Je,t),y(_,e,t),n(e,Ue,t),n(e,z,t),n(e,_e,t),y(P,e,t),n(e,Ge,t),n(e,le,t),xe=!0},p(e,[t]){const K={};t&2&&(K.$$scope={dirty:t,ctx:e}),j.$set(K);const ze={};t&2&&(ze.$$scope={dirty:t,ctx:e}),J.$set(ze);const Pe={};t&2&&(Pe.$$scope={dirty:t,ctx:e}),_.$set(Pe)},i(e){xe||(b(a.$$.fragment,e),b(I.$$.fragment,e),b(j.$$.fragment,e),b(R.$$.fragment,e),b(J.$$.fragment,e),b(V.$$.fragment,e),b(B.$$.fragment,e),b(E.$$.fragment,e),b(N.$$.fragment,e),b(X.$$.fragment,e),b(Y.$$.fragment,e),b(Q.$$.fragment,e),b(_.$$.fragment,e),b(P.$$.fragment,e),xe=!0)},o(e){w(a.$$.fragment,e),w(I.$$.fragment,e),w(j.$$.fragment,e),w(R.$$.fragment,e),w(J.$$.fragment,e),w(V.$$.fragment,e),w(B.$$.fragment,e),w(E.$$.fragment,e),w(N.$$.fragment,e),w(X.$$.fragment,e),w(Y.$$.fragment,e),w(Q.$$.fragment,e),w(_.$$.fragment,e),w(P.$$.fragment,e),xe=!1},d(e){e&&(l(o),l(h),l(c),l($),l(T),l(v),l(G),l(ae),l(x),l(se),l(C),l(ie),l(W),l(re),l(ce),l(me),l(k),l(ue),l(de),l(pe),l(he),l(L),l(fe),l(ge),l(ye),l(S),l(be),l(U),l(we),l(H),l(Me),l(Te),l(F),l($e),l(ve),l(Ze),l(q),l(je),l(A),l(Je),l(Ue),l(z),l(_e),l(Ge),l(le)),l(r),M(a,e),M(I,e),M(j,e),M(R,e),M(J,e),M(V,e),M(B,e),M(E,e),M(N),M(X,e),M(Y,e),M(Q,e),M(_,e),M(P,e)}}}const it='{"title":"Using Tools in LlamaIndex","local":"using-tools-in-llamaindex","sections":[{"title":"Creating a FunctionTool","local":"creating-a-functiontool","sections":[],"depth":2},{"title":"Creating a QueryEngineTool","local":"creating-a-queryenginetool","sections":[],"depth":2},{"title":"Creating Toolspecs","local":"creating-toolspecs","sections":[],"depth":2},{"title":"Utility Tools","local":"utility-tools","sections":[],"depth":2}],"depth":1}';function rt(Z){return De(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ft extends Oe{constructor(r){super(),et(this,r,rt,st,Ke,{})}}export{ft as component};
