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