import{s as at,n as it,o as st}from"../chunks/scheduler.37c15a92.js";import{S as mt,i as rt,g as s,s as a,r as G,A as ot,h as m,f as n,c as i,j as et,u as N,x as o,k as nt,y as ut,a as l,v as O,d as R,t as B,w as D}from"../chunks/index.2bf4358c.js";import{H as lt}from"../chunks/Heading.8ada512a.js";import{E as pt}from"../chunks/getInferenceSnippets.d4d07d1e.js";function ft(F){let r,T,M,C,u,I,p,J='欢迎来到本模块，您将学习如何使用 <a href="https://www.llamaindex.ai/" rel="nofollow">LlamaIndex</a> 工具包构建基于大语言模型（LLM）的智能体。',P,f,K="LlamaIndex 是<strong>通过索引和工作流在您的数据上创建 LLM 驱动智能体的完整工具包</strong>。本课程我们将重点关注构建 LlamaIndex 智能体的三个核心部分：<strong>组件</strong>、<strong>智能体与工具</strong>以及<strong>工作流</strong>。",w,x,Q='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/thumbnail.png" alt="LlamaIndex"/>',b,L,V="让我们解析这些核心要素及其对智能体的支持：",y,g,W="<li><strong>组件</strong>是 LlamaIndex 中的基础构建模块，包括提示词、模型和数据库等。组件通常帮助 LlamaIndex 与其他工具和库进行集成。</li> <li><strong>工具</strong>：提供特定功能的组件，如搜索、计算或访问外部服务。它们是支撑智能体执行任务的基础模块。</li> <li><strong>智能体</strong>：能够自主使用工具并做出决策的独立组件，通过协调工具使用来实现复杂目标。</li> <li><strong>工作流</strong>：按步骤处理逻辑的流程。智能体工作流是一种无需显式使用智能体即可构建智能行为的方式。</li>",E,d,j,$,X="虽然LlamaIndex与其他框架（如 smolagents）有相似之处，但具备以下关键优势：",z,_,Y="<li><strong>清晰的工作流系统</strong>。通过事件驱动和异步优先的语法，工作流帮助您逐步分解智能体的决策过程，实现逻辑的清晰组合与组织。</li> <li><strong>基于 LlamaParse 的高级文档解析</strong> 专为 LlamaIndex 打造的文档解析工具，尽管是付费功能，但提供无缝集成体验。</li> <li><strong>丰富的即用组件</strong> 凭借长期的技术积累，LlamaIndex 与众多框架兼容，提供大量经过验证的可靠组件（如 LLM、检索器、索引等）。</li> <li><strong>LlamaHub</strong> 提供了数百个此类组件、智能体和工具的注册中心，方便您在 LlamaIndex 中直接使用。</li>",A,v,Z=`这些概念在不同场景中都是创建实用智能体的必要元素。
后续章节我们将深入解析每个概念。
掌握这些知识后，我们将运用所学<strong>通过 Alfred 智能体创建实际应用案例</strong>！`,S,c,tt="准备好探索 LlamaIndex 的精彩世界了吗？让我们立即启程，<strong>通过 LlamaHub 查找并安装所需集成吧！🚀</strong>",U,h,q,H,k;return u=new lt({props:{title:"LlamaIndex 简介",local:"llamaindex-简介",headingTag:"h1"}}),d=new lt({props:{title:"LlamaIndex 的独特之处",local:"llamaindex-的独特之处",headingTag:"h2"}}),h=new pt({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/unit2/llama-index/introduction.mdx"}}),{c(){r=s("meta"),T=a(),M=s("p"),C=a(),G(u.$$.fragment),I=a(),p=s("p"),p.innerHTML=J,P=a(),f=s("p"),f.innerHTML=K,w=a(),x=s("p"),x.innerHTML=Q,b=a(),L=s("p"),L.textContent=V,y=a(),g=s("ul"),g.innerHTML=W,E=a(),G(d.$$.fragment),j=a(),$=s("p"),$.textContent=X,z=a(),_=s("ul"),_.innerHTML=Y,A=a(),v=s("p"),v.innerHTML=Z,S=a(),c=s("p"),c.innerHTML=tt,U=a(),G(h.$$.fragment),q=a(),H=s("p"),this.h()},l(t){const e=ot("svelte-u9bgzb",document.head);r=m(e,"META",{name:!0,content:!0}),e.forEach(n),T=i(t),M=m(t,"P",{}),et(M).forEach(n),C=i(t),N(u.$$.fragment,t),I=i(t),p=m(t,"P",{"data-svelte-h":!0}),o(p)!=="svelte-1suqns8"&&(p.innerHTML=J),P=i(t),f=m(t,"P",{"data-svelte-h":!0}),o(f)!=="svelte-9ypya6"&&(f.innerHTML=K),w=i(t),x=m(t,"P",{"data-svelte-h":!0}),o(x)!=="svelte-xchtbh"&&(x.innerHTML=Q),b=i(t),L=m(t,"P",{"data-svelte-h":!0}),o(L)!=="svelte-oxe8wc"&&(L.textContent=V),y=i(t),g=m(t,"UL",{"data-svelte-h":!0}),o(g)!=="svelte-18zodej"&&(g.innerHTML=W),E=i(t),N(d.$$.fragment,t),j=i(t),$=m(t,"P",{"data-svelte-h":!0}),o($)!=="svelte-52xj0u"&&($.textContent=X),z=i(t),_=m(t,"UL",{"data-svelte-h":!0}),o(_)!=="svelte-yryj1r"&&(_.innerHTML=Y),A=i(t),v=m(t,"P",{"data-svelte-h":!0}),o(v)!=="svelte-zavhpm"&&(v.innerHTML=Z),S=i(t),c=m(t,"P",{"data-svelte-h":!0}),o(c)!=="svelte-14i64am"&&(c.innerHTML=tt),U=i(t),N(h.$$.fragment,t),q=i(t),H=m(t,"P",{}),et(H).forEach(n),this.h()},h(){nt(r,"name","hf:doc:metadata"),nt(r,"content",xt)},m(t,e){ut(document.head,r),l(t,T,e),l(t,M,e),l(t,C,e),O(u,t,e),l(t,I,e),l(t,p,e),l(t,P,e),l(t,f,e),l(t,w,e),l(t,x,e),l(t,b,e),l(t,L,e),l(t,y,e),l(t,g,e),l(t,E,e),O(d,t,e),l(t,j,e),l(t,$,e),l(t,z,e),l(t,_,e),l(t,A,e),l(t,v,e),l(t,S,e),l(t,c,e),l(t,U,e),O(h,t,e),l(t,q,e),l(t,H,e),k=!0},p:it,i(t){k||(R(u.$$.fragment,t),R(d.$$.fragment,t),R(h.$$.fragment,t),k=!0)},o(t){B(u.$$.fragment,t),B(d.$$.fragment,t),B(h.$$.fragment,t),k=!1},d(t){t&&(n(T),n(M),n(C),n(I),n(p),n(P),n(f),n(w),n(x),n(b),n(L),n(y),n(g),n(E),n(j),n($),n(z),n(_),n(A),n(v),n(S),n(c),n(U),n(q),n(H)),n(r),D(u,t),D(d,t),D(h,t)}}}const xt='{"title":"LlamaIndex 简介","local":"llamaindex-简介","sections":[{"title":"LlamaIndex 的独特之处","local":"llamaindex-的独特之处","sections":[],"depth":2}],"depth":1}';function Lt(F){return st(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vt extends mt{constructor(r){super(),rt(this,r,Lt,ft,at,{})}}export{vt as component};
