import{s as MU,o as pU,n as B}from"../chunks/scheduler.37c15a92.js";import{S as QU,i as oU,g as m,s as p,r as o,A as yU,h as f,f as a,c as Q,j as iU,u as y,x as S,k as Dl,y as rU,a as C,v as r,d as R,t as N,w as F,m as xl,n as Wl}from"../chunks/index.2bf4358c.js";import{T as RU}from"../chunks/Tip.363c041f.js";import{C as g}from"../chunks/CodeBlock.4e987730.js";import{H as h}from"../chunks/Heading.8ada512a.js";import{H as nl,a as $}from"../chunks/HfOption.02c8e375.js";import{E as NU}from"../chunks/getInferenceSnippets.42ccd5ac.js";function FU(c){let J,n,s="工具",i,T,t="检索器",U;return{c(){J=xl("如果你尚未实现这些工具，请返回"),n=m("a"),n.textContent=s,i=xl("和"),T=m("a"),T.textContent=t,U=xl("章节进行实现，并将它们添加到`tools.py`和`retriever.py`文件中。"),this.h()},l(l){J=Wl(l,"如果你尚未实现这些工具，请返回"),n=f(l,"A",{href:!0,"data-svelte-h":!0}),S(n)!=="svelte-1982uno"&&(n.textContent=s),i=Wl(l,"和"),T=f(l,"A",{href:!0,"data-svelte-h":!0}),S(T)!=="svelte-1p5wfy6"&&(T.textContent=t),U=Wl(l,"章节进行实现，并将它们添加到`tools.py`和`retriever.py`文件中。"),this.h()},h(){Dl(n,"href","./tools"),Dl(T,"href","./invitees")},m(l,V){C(l,J,V),C(l,n,V),C(l,i,V),C(l,T,V),C(l,U,V)},p:B,d(l){l&&(a(J),a(n),a(i),a(T),a(U))}}}function cU(c){let J,n,s,i="现在让我们将所有工具组合成一个智能体：",T,t,U;return J=new g({props:{code:"JTIzJTIwJTIwJUU1JUFGJUJDJUU1JTg1JUE1JUU1JUJGJTg1JUU4JUE2JTgxJUU3JTlBJTg0JUU1JUJBJTkzJTBBaW1wb3J0JTIwcmFuZG9tJTBBZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUwQSUwQSUyMyUyMCVFNCVCQiU4RSVFOCU4NyVBQSVFNSVBRSU5QSVFNCVCOSU4OSVFNiVBOCVBMSVFNSU5RCU5NyVFNSVBRiVCQyVFNSU4NSVBNSVFNSVCNyVBNSVFNSU4NSVCNyUwQWZyb20lMjB0b29scyUyMGltcG9ydCUyMER1Y2tEdWNrR29TZWFyY2hUb29sJTJDJTIwV2VhdGhlckluZm9Ub29sJTJDJTIwSHViU3RhdHNUb29sJTBBZnJvbSUyMHJldHJpZXZlciUyMGltcG9ydCUyMGxvYWRfZ3Vlc3RfZGF0YXNldA==",highlighted:`<span class="hljs-comment">#  导入必要的库</span>
<span class="hljs-keyword">import</span> random
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, InferenceClientModel

<span class="hljs-comment"># 从自定义模块导入工具</span>
<span class="hljs-keyword">from</span> tools <span class="hljs-keyword">import</span> DuckDuckGoSearchTool, WeatherInfoTool, HubStatsTool
<span class="hljs-keyword">from</span> retriever <span class="hljs-keyword">import</span> load_guest_dataset`,wrap:!1}}),t=new g({props:{code:"JTIzJTIwJUU1JTg4JTlEJUU1JUE3JThCJUU1JThDJTk2JTIwSHVnZ2luZyUyMEZhY2UlMjAlRTYlQTglQTElRTUlOUUlOEIlMEFtb2RlbCUyMCUzRCUyMEluZmVyZW5jZUNsaWVudE1vZGVsKCklMEElMEElMjMlMjAlRTUlODglOUQlRTUlQTclOEIlRTUlOEMlOTYlRTclQkQlOTElRTclQkIlOUMlRTYlOTAlOUMlRTclQjQlQTIlRTUlQjclQTUlRTUlODUlQjclMEFzZWFyY2hfdG9vbCUyMCUzRCUyMER1Y2tEdWNrR29TZWFyY2hUb29sKCklMEElMEElMjMlMjAlMjAlRTUlODglOUQlRTUlQTclOEIlRTUlOEMlOTYlRTUlQTQlQTklRTYlQjAlOTQlRTUlQjclQTUlRTUlODUlQjclMEF3ZWF0aGVyX2luZm9fdG9vbCUyMCUzRCUyMFdlYXRoZXJJbmZvVG9vbCgpJTBBJTBBJTIzJTIwJUU1J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yMyUyMCVFNiVBRiU4RiUyMDMlMjAlRTYlQUQlQTUlRTUlOTAlQUYlRTclOTQlQTglRTglQTclODQlRTUlODglOTIlMEEp",highlighted:`<span class="hljs-comment"># 初始化 Hugging Face 模型</span>
model = InferenceClientModel()

<span class="hljs-comment"># 初始化网络搜索工具</span>
search_tool = DuckDuckGoSearchTool()

<span class="hljs-comment">#  初始化天气工具</span>
weather_info_tool = WeatherInfoTool()

<span class="hljs-comment"># 初始化 Hub 统计工具</span>
hub_stats_tool = HubStatsTool()

<span class="hljs-comment"># 加载宾客数据集并初始化宾客信息工具</span>
guest_info_tool = load_guest_dataset()

<span class="hljs-comment"># 创建包含所有工具的 Alfred</span>
alfred = CodeAgent(
    tools=[guest_info_tool, weather_info_tool, hub_stats_tool, search_tool], 
    model=model,
    add_base_tools=<span class="hljs-literal">True</span>,  <span class="hljs-comment"># 添加额外的基础工具</span>
    planning_interval=<span class="hljs-number">3</span>    <span class="hljs-comment"># 每 3 步启用规划</span>
)`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-1e5mhsr"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function mU(c){let J,n,s,i="Now, let’s combine all these tools into a single agent:",T,t,U;return J=new g({props:{code:"JTIzJTIwJUU1JUFGJUJDJUU1JTg1JUE1JUU1JUJGJTg1JUU4JUE2JTgxJUU1JUJBJTkzJTBBZnJvbSUyMGxsYW1hX2luZGV4LmNvcmUuYWdlbnQud29ya2Zsb3clMjBpbXBvcnQlMjBBZ2VudFdvcmtmbG93JTBBZnJvbSUyMGxsYW1hX2luZGV4LmxsbXMuaHVnZ2luZ2ZhY2VfYXBpJTIwaW1wb3J0JTIwSHVnZ2luZ0ZhY2VJbmZlcmVuY2VBUEklMEElMEFmcm9tJTIwdG9vbHMlMjBpbXBvcnQlMjBzZWFyY2hfdG9vbCUyQyUyMHdlYXRoZXJfaW5mb190b29sJTJDJTIwaHViX3N0YXRzX3Rvb2wlMEFmcm9tJTIwcmV0cmlldmVyJTIwaW1wb3J0JTIwZ3Vlc3RfaW5mb190b29s",highlighted:`<span class="hljs-comment"># 导入必要库</span>
<span class="hljs-keyword">from</span> llama_index.core.agent.workflow <span class="hljs-keyword">import</span> AgentWorkflow
<span class="hljs-keyword">from</span> llama_index.llms.huggingface_api <span class="hljs-keyword">import</span> HuggingFaceInferenceAPI

<span class="hljs-keyword">from</span> tools <span class="hljs-keyword">import</span> search_tool, weather_info_tool, hub_stats_tool
<span class="hljs-keyword">from</span> retriever <span class="hljs-keyword">import</span> guest_info_tool`,wrap:!1}}),t=new g({props:{code:"JTIzJTIwJUU1JTg4JTlEJUU1JUE3JThCJUU1JThDJTk2JTIwSHVnZ2luZyUyMEZhY2UlMjAlRTYlQTglQTElRTUlOUUlOEIlMEFsbG0lMjAlM0QlMjBIdWdnaW5nRmFjZUluZmVyZW5jZUFQSShtb2RlbF9uYW1lJTNEJTIyUXdlbiUyRlF3ZW4yLjUtQ29kZXItMzJCLUluc3RydWN0JTIyKSUwQSUwQSUyMyUyMCVFNSU4OCU5QiVFNSVCQiVCQSVFNSU4QyU4NSVFNSU5MCVBQiVFNiU4OSU4MCVFNiU5QyU4OSVFNSVCNyVBNSVFNSU4NSVCNyVFNyU5QSU4NCUyMEFsZnJlZCUwQWFsZnJlZCUyMCUzRCUyMEFnZW50V29ya2Zsb3cuZnJvbV90b29sc19vcl9mdW5jdGlvbnMoJTBBJTIwJTIwJTIwJTIwJTVCZ3Vlc3RfaW5mb190b29sJTJDJTIwc2VhcmNoX3Rvb2wlMkMlMjB3ZWF0aGVyX2luZm9fdG9vbCUyQyUyMGh1Yl9zdGF0c190b29sJTVEJTJDJTBBJTIwJTIwJTIwJTIwbGxtJTNEbGxtJTJDJTBBKQ==",highlighted:`<span class="hljs-comment"># 初始化 Hugging Face 模型</span>
llm = HuggingFaceInferenceAPI(model_name=<span class="hljs-string">&quot;Qwen/Qwen2.5-Coder-32B-Instruct&quot;</span>)

<span class="hljs-comment"># 创建包含所有工具的 Alfred</span>
alfred = AgentWorkflow.from_tools_or_functions(
    [guest_info_tool, search_tool, weather_info_tool, hub_stats_tool],
    llm=llm,
)`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-9b56u9"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function fU(c){let J,n,s,i="现在将所有工具整合到单一智能体：",T,t,U;return J=new g({props:{code:"ZnJvbSUyMHR5cGluZyUyMGltcG9ydCUyMFR5cGVkRGljdCUyQyUyMEFubm90YXRlZCUwQWZyb20lMjBsYW5nZ3JhcGguZ3JhcGgubWVzc2FnZSUyMGltcG9ydCUyMGFkZF9tZXNzYWdlcyUwQWZyb20lMjBsYW5nY2hhaW5fY29yZS5tZXNzYWdlcyUyMGltcG9ydCUyMEFueU1lc3NhZ2UlMkMlMjBIdW1hbk1lc3NhZ2UlMkMlMjBBSU1lc3NhZ2UlMEFmcm9tJTIwbGFuZ2dyYXBoLnByZWJ1aWx0JTIwaW1wb3J0JTIwVG9vbE5vZGUlMEFmcm9tJTIwbGFuZ2dyYXBoLmdyYXBoJTIwaW1wb3J0JTIwU1RBUlQlMkMlMjBTdGF0ZUdyYXBoJTBBZnJvbSUyMGxhbmdncmFwaC5wcmVidWlsdCUyMGltcG9ydCUyMHRvb2xzX2NvbmRpdGlvbiUwQWZyb20lMjBsYW5nY2hhaW5faHVnZ2luZ2ZhY2UlMjBpbXBvcnQlMjBIdWdnaW5nRmFjZUVuZHBvaW50JTJDJTIwQ2hhdEh1Z2dpbmdGYWNlJTBBJTBBZnJvbSUyMHRvb2xzJTIwaW1wb3J0JTIwRHVja0R1Y2tHb1NlYXJjaFJ1biUyQyUyMHdlYXRoZXJfaW5mb190b29sJTJDJTIwaHViX3N0YXRzX3Rvb2wlMEFmcm9tJTIwcmV0cmlldmVyJTIwaW1wb3J0JTIwZ3Vlc3RfaW5mb190b29s",highlighted:`<span class="hljs-keyword">from</span> typing <span class="hljs-keyword">import</span> TypedDict, Annotated
<span class="hljs-keyword">from</span> langgraph.graph.message <span class="hljs-keyword">import</span> add_messages
<span class="hljs-keyword">from</span> langchain_core.messages <span class="hljs-keyword">import</span> AnyMessage, HumanMessage, AIMessage
<span class="hljs-keyword">from</span> langgraph.prebuilt <span class="hljs-keyword">import</span> ToolNode
<span class="hljs-keyword">from</span> langgraph.graph <span class="hljs-keyword">import</span> START, StateGraph
<span class="hljs-keyword">from</span> langgraph.prebuilt <span class="hljs-keyword">import</span> tools_condition
<span class="hljs-keyword">from</span> langchain_huggingface <span class="hljs-keyword">import</span> HuggingFaceEndpoint, ChatHuggingFace

<span class="hljs-keyword">from</span> tools <span class="hljs-keyword">import</span> DuckDuckGoSearchRun, weather_info_tool, hub_stats_tool
<span class="hljs-keyword">from</span> retriever <span class="hljs-keyword">import</span> guest_info_tool`,wrap:!1}}),t=new g({props:{code:"JTIzJTIwJUU1JTg4JTlEJUU1JUE3JThCJUU1JThDJTk2JUU3JUJEJTkxJUU3JUJCJTlDJUU2JTkwJTlDJUU3JUI0JUEyJUU1JUI3JUE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CMCU4MyVFNyU5NCVBOCVFRiVCQyU4QyVFNSU4OCU5OSVFOCVCNyVBRiVFNyU5NCVCMSVFNSU4OCVCMCUyMHRvb2xzJTIwJUU4JThBJTgyJUU3JTgyJUI5JTBBJTIwJTIwJTIwJTIwJTIzJTIwJUU1JTkwJUE2JUU1JTg4JTk5JUU3JTlCJUI0JUU2JThFJUE1JUU1JTkzJThEJUU1JUJBJTk0JTBBJTIwJTIwJTIwJTIwdG9vbHNfY29uZGl0aW9uJTJDJTBBKSUwQWJ1aWxkZXIuYWRkX2VkZ2UoJTIydG9vbHMlMjIlMkMlMjAlMjJhc3Npc3RhbnQlMjIpJTBBYWxmcmVkJTIwJTNEJTIwYnVpbGRlci5jb21waWxlKCk=",highlighted:`<span class="hljs-comment"># 初始化网络搜索工具</span>
search_tool = DuckDuckGoSearchRun()

<span class="hljs-comment"># 生成包含工具的聊天接口</span>
llm = HuggingFaceEndpoint(
    repo_id=<span class="hljs-string">&quot;Qwen/Qwen2.5-Coder-32B-Instruct&quot;</span>,
    huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
)

chat = ChatHuggingFace(llm=llm, verbose=<span class="hljs-literal">True</span>)
tools = [guest_info_tool, search_tool, weather_info_tool, hub_stats_tool]
chat_with_tools = chat.bind_tools(tools)

<span class="hljs-comment"># 生成 AgentState 和 Agent 图</span>
<span class="hljs-keyword">class</span> <span class="hljs-title class_">AgentState</span>(<span class="hljs-title class_ inherited__">TypedDict</span>):
    messages: Annotated[<span class="hljs-built_in">list</span>[AnyMessage], add_messages]

<span class="hljs-keyword">def</span> <span class="hljs-title function_">assistant</span>(<span class="hljs-params">state: AgentState</span>):
    <span class="hljs-keyword">return</span> {
        <span class="hljs-string">&quot;messages&quot;</span>: [chat_with_tools.invoke(state[<span class="hljs-string">&quot;messages&quot;</span>])],
    }

<span class="hljs-comment">##  构建流程图</span>
builder = StateGraph(AgentState)

<span class="hljs-comment"># 定义节点：执行具体工作</span>
builder.add_node(<span class="hljs-string">&quot;assistant&quot;</span>, assistant)
builder.add_node(<span class="hljs-string">&quot;tools&quot;</span>, ToolNode(tools))

<span class="hljs-comment"># 定义边：控制流程走向</span>
builder.add_edge(START, <span class="hljs-string">&quot;assistant&quot;</span>)
builder.add_conditional_edges(
    <span class="hljs-string">&quot;assistant&quot;</span>,
    <span class="hljs-comment"># 如果最新消息需要工具调用，则路由到 tools 节点</span>
    <span class="hljs-comment"># 否则直接响应</span>
    tools_condition,
)
builder.add_edge(<span class="hljs-string">&quot;tools&quot;</span>, <span class="hljs-string">&quot;assistant&quot;</span>)
alfred = builder.<span class="hljs-built_in">compile</span>()`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-13tlzvy"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function SU(c){let J,n,s,i,T,t;return J=new $({props:{id:"agents-frameworks",option:"smolagents",$$slots:{default:[cU]},$$scope:{ctx:c}}}),s=new $({props:{id:"agents-frameworks",option:"llama-index",$$slots:{default:[mU]},$$scope:{ctx:c}}}),T=new $({props:{id:"agents-frameworks",option:"langgraph",$$slots:{default:[fU]},$$scope:{ctx:c}}}),{c(){o(J.$$.fragment),n=p(),o(s.$$.fragment),i=p(),o(T.$$.fragment)},l(U){y(J.$$.fragment,U),n=Q(U),y(s.$$.fragment,U),i=Q(U),y(T.$$.fragment,U)},m(U,l){r(J,U,l),C(U,n,l),r(s,U,l),C(U,i,l),r(T,U,l),t=!0},p(U,l){const V={};l&2&&(V.$$scope={dirty:l,ctx:U}),J.$set(V);const O={};l&2&&(O.$$scope={dirty:l,ctx:U}),s.$set(O);const u={};l&2&&(u.$$scope={dirty:l,ctx:U}),T.$set(u)},i(U){t||(R(J.$$.fragment,U),R(s.$$.fragment,U),R(T.$$.fragment,U),t=!0)},o(U){N(J.$$.fragment,U),N(s.$$.fragment,U),N(T.$$.fragment,U),t=!1},d(U){U&&(a(n),a(i)),F(J,U),F(s,U),F(T,U)}}}function gU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cXVlcnklMjAlM0QlMjAlMjJUZWxsJTIwbWUlMjBhYm91dCUyMCdMYWR5JTIwQWRhJTIwTG92ZWxhY2UnJTIyJTBBcmVzcG9uc2UlMjAlM0QlMjBhbGZyZWQucnVuKHF1ZXJ5KSUwQSUwQXByaW50KCUyMiVGMCU5RiU4RSVBOSUyMEFsZnJlZCdzJTIwUmVzcG9uc2UlM0ElMjIpJTBBcHJpbnQocmVzcG9uc2Up",highlighted:`query = <span class="hljs-string">&quot;Tell me about &#x27;Lady Ada Lovelace&#x27;&quot;</span>
response = alfred.run(query)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQSVFNiVBMCVCOSVFNiU4RCVBRSVFNiVBMyU4MCVFNyVCNCVBMiVFNSU4OCVCMCVFNyU5QSU4NCVFNCVCRiVBMSVFNiU4MSVBRiVFRiVCQyU4Q0FkYSUyMExvdmVsYWNlJTIwJUU1JUE1JUIzJUU1JUEzJUFCJUU2JTk4JUFGJUU0JUJEJThEJUU1JUE0JTg3JUU1JThGJTk3JUU1JUIwJThBJUU2JTk1JUFDJUU3JTlBJTg0JUU2JTk1JUIwJUU1JUFEJUE2JUU1JUFFJUI2JUU1JTg1JUJDJUU1JUE1JUJEJUU1JThGJThCJUUzJTgwJTgyJUU1JUE1JUI5JUU1JTlCJUEwJUU1JTlDJUE4JUU2JTk1JUIwJUU1JUFEJUE2JUU1JTkyJThDJUU4JUFFJUExJUU3JUFFJTk3JUU5JUEyJTg2JUU1JTlGJTlGJUU3JTlBJTg0JUU1JUJDJTgwJUU1JTg4JTlCJUU2JTgwJUE3JUU1JUI3JUE1JUU0JUJEJTlDJUU4JTgwJThDJUU5JTk3JUJCJUU1JTkwJThEJUVGJUJDJThDJUU1JUI4JUI4JUU1JTlCJUEwJUU1JTg1JUI2JUU1JTlDJUE4JTIwQ2hhcmxlcyUyMEJhYmJhZ2UlMjAlRTUlODglODYlRTYlOUUlOTAlRTYlOUMlQkElRTYlOTYlQjklRTklOUQlQTIlRTclOUElODQlRTUlQjclQTUlRTQlQkQlOUMlRTglQTIlQUIlRTglQUElODklRTQlQjglQkElRTclQUMlQUMlRTQlQjglODAlRTQlQkQlOEQlRTglQUUlQTElRTclQUUlOTclRTYlOUMlQkElRTclQTglOEIlRTUlQkElOEYlRTUlOTElOTglRTMlODAlODIlRTUlQTUlQjklRTclOUElODQlRTclOTQlQjUlRTUlQUQlOTAlRTklODIlQUUlRTclQUUlQjElRTYlOTglQUYlMjBhZGEubG92ZWxhY2UlNDBleGFtcGxlLmNvbSVFMyU4MCU4Mg==",highlighted:`🎩 Alfred<span class="hljs-symbol">&#x27;s</span> Response:
根据检索到的信息，Ada Lovelace 女士是位备受尊敬的数学家兼好友。她因在数学和计算领域的开创性工作而闻名，常因其在 Charles Babbage 分析机方面的工作被誉为第一位计算机程序员。她的电子邮箱是 ada.lovelace@example.com。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function OU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cXVlcnklMjAlM0QlMjAlMjJUZWxsJTIwbWUlMjBhYm91dCUyMExhZHklMjBBZGElMjBMb3ZlbGFjZS4lMjBXaGF0J3MlMjBoZXIlMjBiYWNrZ3JvdW5kJTNGJTIyJTBBcmVzcG9uc2UlMjAlM0QlMjBhd2FpdCUyMGFsZnJlZC5ydW4ocXVlcnkpJTBBJTBBcHJpbnQoJTIyJUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUyMiklMEFwcmludChyZXNwb25zZS5yZXNwb25zZS5ibG9ja3MlNUIwJTVELnRleHQp",highlighted:`query = <span class="hljs-string">&quot;Tell me about Lady Ada Lovelace. What&#x27;s her background?&quot;</span>
response = <span class="hljs-keyword">await</span> alfred.run(query)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response.response.blocks[<span class="hljs-number">0</span>].text)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQUFkYSUyMExvdmVsYWNlJTIwJUU1JUE1JUIzJUU1JUEzJUFCJUU2JTk4JUFGJUU4JThCJUIxJUU1JTlCJUJEJUU2JTk1JUIwJUU1JUFEJUE2JUU1JUFFJUI2JUU1JTkyJThDJUU0JUJEJTlDJUU1JUFFJUI2JUVGJUJDJThDJUU0JUJCJUE1JUU1JUE1JUI5JUU1JTlDJUE4JTIwQ2hhcmxlcyUyMEJhYmJhZ2UlMjAlRTUlODglODYlRTYlOUUlOTAlRTYlOUMlQkElRTYlOTYlQjklRTklOUQlQTIlRTclOUElODQlRTUlQjclQTUlRTQlQkQlOUMlRTklOTclQkIlRTUlOTAlOEQlRTMlODAlODIlRTUlQTUlQjklRTYlOTglQUYlRTclQUMlQUMlRTQlQjglODAlRTQlQjglQUElRTglQUUlQTQlRTglQUYlODYlRTUlODglQjAlRTglQUYlQTUlRTYlOUMlQkElRTUlOTklQTglRTUlODUlQjclRTYlOUMlODklRTclQkElQUYlRTglQUUlQTElRTclQUUlOTclRTQlQjklOEIlRTUlQTQlOTYlRTUlQkElOTQlRTclOTQlQTglRTYlQkQlOUMlRTUlOEElOUIlRTclOUElODQlRTQlQkElQkElRTMlODAlODI=",highlighted:`🎩 Alfred<span class="hljs-symbol">&#x27;s</span> Response:
Ada Lovelace 女士是英国数学家和作家，以她在 Charles Babbage 分析机方面的工作闻名。她是第一个认识到该机器具有纯计算之外应用潜力的人。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function uU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cmVzcG9uc2UlMjAlM0QlMjBhbGZyZWQuaW52b2tlKCU3QiUyMm1lc3NhZ2VzJTIyJTNBJTIwJTIyVGVsbCUyMG1lJTIwYWJvdXQlMjAnTGFkeSUyMEFkYSUyMExvdmVsYWNlJyUyMiU3RCklMEElMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMFJlc3BvbnNlJTNBJTIyKSUwQXByaW50KHJlc3BvbnNlJTVCJ21lc3NhZ2VzJyU1RCU1Qi0xJTVELmNvbnRlbnQp",highlighted:`response = alfred.invoke({<span class="hljs-string">&quot;messages&quot;</span>: <span class="hljs-string">&quot;Tell me about &#x27;Lady Ada Lovelace&#x27;&quot;</span>})

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response[<span class="hljs-string">&#x27;messages&#x27;</span>][-<span class="hljs-number">1</span>].content)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQUFkYSUyMExvdmVsYWNlJUVGJUJDJThDJUU1JTg1JUE4JUU1JTkwJThEJTIwQXVndXN0YSUyMEFkYSUyMEtpbmclRUYlQkMlOEMlRTYlQjQlOUIlRTUlQTQlQUIlRTglOEUlQjElRTYlOTYlQUYlRTQlQkMlQUYlRTclODglQjUlRTUlQTQlQUIlRTQlQkElQkElRUYlQkMlOEMlRTYlOTglQUYlRTglOEIlQjElRTUlOUIlQkQlRTYlOTUlQjAlRTUlQUQlQTYlRTUlQUUlQjYlRTUlOTIlOEMlRTQlQkQlOUMlRTUlQUUlQjYlRTMlODAlODIlRTUlODclQkElRTclOTQlOUYlRTQlQkElOEUlMjAxODE1JTIwJUU1JUI5JUI0JTIwMTIlMjAlRTYlOUMlODglMjAxMCUyMCVFNiU5NyVBNSVFRiVCQyU4QyVFOSU4MCU5RCVFNCVCOCU5NiVFNCVCQSU4RSUyMDE4NTIlMjAlRTUlQjklQjQlMjAxMSUyMCVFNiU5QyU4OCUyMDI3JTIwJUU2JTk3JUE1JUVGJUJDJThDJUU1JUE1JUI5JUU1JTlCJUEwJUU1JTlDJUE4JTIwQ2hhcmxlcyUyMEJhYmJhZ2UlMjAlRTYlOEYlOTAlRTUlODclQkElRTclOUElODQlRTYlOUMlQkElRTYlQTIlQjAlRTklODAlOUElRTclOTQlQTglRTglQUUlQTElRTclQUUlOTclRTYlOUMlQkElRTUlODglODYlRTYlOUUlOTAlRTYlOUMlQkElRTYlOTYlQjklRTklOUQlQTIlRTclOUElODQlRTUlQjclQTUlRTQlQkQlOUMlRTglODAlOEMlRTklOTclQkIlRTUlOTAlOEQlRTMlODAlODJBZGElMjBMb3ZlbGFjZSUyMCVFOCVBMiVBQiVFOCVBQSU4OSVFNCVCOCVCQSVFNyVBQyVBQyVFNCVCOCU4MCVFNCVCRCU4RCVFOCVBRSVBMSVFNyVBRSU5NyVFNiU5QyVCQSVFNyVBOCU4QiVFNSVCQSU4RiVFNSU5MSU5OCVFRiVCQyU4QyVFNSU5QiVBMCVFNCVCOCVCQSVFNSVBNSVCOSVFNCVCQSU4RSUyMDE4NDMlMjAlRTUlQjklQjQlRTQlQjglQkElRTUlODglODYlRTYlOUUlOTAlRTYlOUMlQkElRTUlODglOUIlRTUlQkIlQkElRTQlQkElODYlRTclQTglOEIlRTUlQkElOEYlRTMlODAlODIlRTUlQTUlQjklRTglQUUlQTQlRTglQUYlODYlRTUlODglQjAlRTglQUYlQTUlRTYlOUMlQkElRTUlOTklQTglRTclOUElODQlRTclOTQlQTglRTklODAlOTQlRTQlQjglOEQlRTQlQkIlODUlRTklOTklOTAlRTQlQkElOEUlRTglQUUlQTElRTclQUUlOTclRUYlQkMlOEMlRTglQkYlOTklRTclQTclOEQlRTglQkYlOUMlRTglQTclODElRTUlOUMlQTglRTUlQkQlOTMlRTYlOTclQjYlRTYlOUUlODElRTQlQjglQkElRTclQkQlOTUlRTglQTclODElRTMlODAlODIlRTUlQTUlQjklRTUlQUYlQjklRTglQUUlQTElRTclQUUlOTclRTYlOUMlQkElRTclQTclOTElRTUlQUQlQTYlRTklQTIlODYlRTUlOUYlOUYlRTclOUElODQlRTglQjQlQTElRTclOEMlQUUlRTQlQjglQkElRTYlOUMlQUElRTYlOUQlQTUlRTUlOEYlOTElRTUlQjElOTUlRTUlQTUlQTAlRTUlQUUlOUElRTQlQkElODYlRTUlOUYlQkElRTclQTElODAlRTMlODAlODIlRTYlQUYlOEYlRTUlQjklQjQlRTUlOEQlODElRTYlOUMlODglRTglQUUlQkUlRTclQUIlOEIlRTclOUElODQlMjBBZGElMjBMb3ZlbGFjZSUyMCVFNiU5NyVBNSVFNiVBRCVBMyVFNiU5OCVBRiVFNCVCOCVCQSVFNCVCQSU4NiVFNyVCQSVBQSVFNSVCRiVCNSVFNSVBNSVCOSVFNSU5QyVBOCVFNyVBNyU5MSVFNiU4QSU4MCVFOSVBMiU4NiVFNSU5RiU5RiVFNyU5QSU4NCVFNSVCQyU4MCVFNSU4OCU5QiVFNiU4MCVBNyVFNSVCNyVBNSVFNCVCRCU5QyVFRiVCQyU4QyVFNiVCRiU4MCVFNSU4QSVCMSVFNSVBNSVCMyVFNiU4MCVBNyVFNSU5QyVBOCUyMFNURU0lMjAlRTklQTIlODYlRTUlOUYlOUYlRTclOUElODQlRTUlOEYlOTElRTUlQjElOTUlRTMlODAlODI=",highlighted:`🎩 Alfred&#x27;s Response:
Ada Lovelace，全名 Augusta Ada King，洛夫莱斯伯爵夫人，是英国数学家和作家。出生于<span class="hljs-number"> 1815 </span>年<span class="hljs-number"> 12 </span>月<span class="hljs-number"> 10 </span>日，逝世于<span class="hljs-number"> 1852 </span>年<span class="hljs-number"> 11 </span>月<span class="hljs-number"> 27 </span>日，她因在 Charles Babbage 提出的机械通用计算机分析机方面的工作而闻名。Ada Lovelace 被誉为第一位计算机程序员，因为她于<span class="hljs-number"> 1843 </span>年为分析机创建了程序。她认识到该机器的用途不仅限于计算，这种远见在当时极为罕见。她对计算机科学领域的贡献为未来发展奠定了基础。每年十月设立的 Ada Lovelace 日正是为了纪念她在科技领域的开创性工作，激励女性在 STEM 领域的发展。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function BU(c){let J,n,s,i,T,t;return J=new $({props:{id:"agents-frameworks",option:"smolagents",$$slots:{default:[gU]},$$scope:{ctx:c}}}),s=new $({props:{id:"agents-frameworks",option:"llama-index",$$slots:{default:[OU]},$$scope:{ctx:c}}}),T=new $({props:{id:"agents-frameworks",option:"langgraph",$$slots:{default:[uU]},$$scope:{ctx:c}}}),{c(){o(J.$$.fragment),n=p(),o(s.$$.fragment),i=p(),o(T.$$.fragment)},l(U){y(J.$$.fragment,U),n=Q(U),y(s.$$.fragment,U),i=Q(U),y(T.$$.fragment,U)},m(U,l){r(J,U,l),C(U,n,l),r(s,U,l),C(U,i,l),r(T,U,l),t=!0},p(U,l){const V={};l&2&&(V.$$scope={dirty:l,ctx:U}),J.$set(V);const O={};l&2&&(O.$$scope={dirty:l,ctx:U}),s.$set(O);const u={};l&2&&(u.$$scope={dirty:l,ctx:U}),T.$set(u)},i(U){t||(R(J.$$.fragment,U),R(s.$$.fragment,U),R(T.$$.fragment,U),t=!0)},o(U){N(J.$$.fragment,U),N(s.$$.fragment,U),N(T.$$.fragment,U),t=!1},d(U){U&&(a(n),a(i)),F(J,U),F(s,U),F(T,U)}}}function $U(c){let J,n,s,i="预期输出（存在随机性差异）：",T,t,U;return J=new g({props:{code:"cXVlcnklMjAlM0QlMjAlMjJXaGF0J3MlMjB0aGUlMjB3ZWF0aGVyJTIwbGlrZSUyMGluJTIwUGFyaXMlMjB0b25pZ2h0JTNGJTIwV2lsbCUyMGl0JTIwYmUlMjBzdWl0YWJsZSUyMGZvciUyMG91ciUyMGZpcmV3b3JrcyUyMGRpc3BsYXklM0YlMjIlMEFyZXNwb25zZSUyMCUzRCUyMGFsZnJlZC5ydW4ocXVlcnkpJTBBJTBBcHJpbnQoJTIyJUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUyMiklMEFwcmludChyZXNwb25zZSk=",highlighted:`query = <span class="hljs-string">&quot;What&#x27;s the weather like in Paris tonight? Will it be suitable for our fireworks display?&quot;</span>
response = alfred.run(query)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQSVFNSVCNyVCMiVFNCVCOCVCQSVFNiU4MiVBOCVFNiU5RiVBNSVFOCVBRiVBMiVFNSVCNyVCNCVFOSVCQiU4RSVFNSVBNCVBOSVFNiVCMCU5NCVFMyU4MCU4MiVFNSVCRCU5MyVFNSU4OSU4RCVFNSVBNCVBOSVFNiVCMCU5NCVFNiU5OSVCNCVFNiU5QyU5NyVFRiVCQyU4QyVFNiVCMCU5NCVFNiVCOCVBOSUyMDI1JUMyJUIwQyVFMyU4MCU4MiVFOCVCRiU5OSVFNiVBMCVCNyVFNyU5QSU4NCVFNiU5RCVBMSVFNCVCQiVCNiVFOSU5RCU5RSVFNSVCOCVCOCVFOSU4MCU4MiVFNSU5MCU4OCVFNCVCQiU4QSVFNiU5OSU5QSVFNyU5QSU4NCVFNyU4MyU5RiVFOCU4QSVCMSVFOCVBMSVBOCVFNiVCQyU5NCVFMyU4MCU4MiVFNiU5OSVCNCVFNiU5QyU5NyVFNyU5QSU4NCVFNSVBNCU5QyVFNyVBOSVCQSVFNSVCMCU4NiVFNCVCOCVCQSVFNSVBMyVBRSVFOCVBNyU4MiVFOCVBMSVBOCVFNiVCQyU5NCVFNiU4RiU5MCVFNCVCRSU5QiVFNyVCQiU5RCVFNCVCRCVCMyVFOCU4MyVCRCVFOCVBNyU4MSVFNSVCQSVBNiVFRiVCQyU4QyVFOCU4OCU5MiVFOSU4MCU4MiVFNyU5QSU4NCVFNiVCOCVBOSVFNSVCQSVBNiVFNCVCOSU5RiVFOCU4MyVCRCVFNyVBMSVBRSVFNCVCRiU5RCVFNSVBRSVCRSVFNSVBRSVBMiVFNCVCQiVBQyVFNiU4NCU4OSVFNSVCRiVBQiVFNCVCQSVBQiVFNSU4RiU5NyVFNiU4OCVCNyVFNSVBNCU5NiVFNiVCNCVCQiVFNSU4QSVBOCVFMyU4MCU4Mg==",highlighted:`🎩 Alfred<span class="hljs-symbol">&#x27;s</span> Response:
已为您查询巴黎天气。当前天气晴朗，气温 <span class="hljs-number">25</span>°C。这样的条件非常适合今晚的烟花表演。晴朗的夜空将为壮观表演提供绝佳能见度，舒适的温度也能确保宾客们愉快享受户外活动。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-1sqgwij"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function hU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cXVlcnklMjAlM0QlMjAlMjJXaGF0J3MlMjB0aGUlMjB3ZWF0aGVyJTIwbGlrZSUyMGluJTIwUGFyaXMlMjB0b25pZ2h0JTNGJTIwV2lsbCUyMGl0JTIwYmUlMjBzdWl0YWJsZSUyMGZvciUyMG91ciUyMGZpcmV3b3JrcyUyMGRpc3BsYXklM0YlMjIlMEFyZXNwb25zZSUyMCUzRCUyMGF3YWl0JTIwYWxmcmVkLnJ1bihxdWVyeSklMEElMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMFJlc3BvbnNlJTNBJTIyKSUwQXByaW50KHJlc3BvbnNlKQ==",highlighted:`query = <span class="hljs-string">&quot;What&#x27;s the weather like in Paris tonight? Will it be suitable for our fireworks display?&quot;</span>
response = <span class="hljs-keyword">await</span> alfred.run(query)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQSVFNSVCNyVCNCVFOSVCQiU4RSVFNCVCQiU4QSVFNSVBNCU5QyVFNiU5QyU4OSVFOSU5QiVBOCVFRiVCQyU4QyVFNiVCMCU5NCVFNiVCOCVBOSUyMDE1JUMyJUIwQyVFMyU4MCU4MiVFOCU4MCU4MyVFOCU5OSU5MSVFNSU4OCVCMCVFOSU5OSU4RCVFOSU5QiVBOCVFNiU4MyU4NSVFNSU4NiVCNSVFRiVCQyU4QyVFNSU4RiVBRiVFOCU4MyVCRCVFNCVCOCU4RCVFOSU4MCU4MiVFNSVBRSU5QyVFOCVCRiU5QiVFOCVBMSU4QyVFNyU4MyU5RiVFOCU4QSVCMSVFOCVBMSVBOCVFNiVCQyU5NCVFMyU4MCU4Mg==",highlighted:`🎩 Alfred<span class="hljs-symbol">&#x27;s</span> Response:
巴黎今夜有雨，气温 <span class="hljs-number">15</span>°C。考虑到降雨情况，可能不适宜进行烟花表演。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function wU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cmVzcG9uc2UlMjAlM0QlMjBhbGZyZWQuaW52b2tlKCU3QiUyMm1lc3NhZ2VzJTIyJTNBJTIwJTIyV2hhdCdzJTIwdGhlJTIwd2VhdGhlciUyMGxpa2UlMjBpbiUyMFBhcmlzJTIwdG9uaWdodCUzRiUyMFdpbGwlMjBpdCUyMGJlJTIwc3VpdGFibGUlMjBmb3IlMjBvdXIlMjBmaXJld29ya3MlMjBkaXNwbGF5JTNGJTIyJTdEKSUwQSUwQXByaW50KCUyMiVGMCU5RiU4RSVBOSUyMEFsZnJlZCdzJTIwUmVzcG9uc2UlM0ElMjIpJTBBcHJpbnQocmVzcG9uc2UlNUInbWVzc2FnZXMnJTVEJTVCLTElNUQuY29udGVudCk=",highlighted:`response = alfred.invoke({<span class="hljs-string">&quot;messages&quot;</span>: <span class="hljs-string">&quot;What&#x27;s the weather like in Paris tonight? Will it be suitable for our fireworks display?&quot;</span>})

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response[<span class="hljs-string">&#x27;messages&#x27;</span>][-<span class="hljs-number">1</span>].content)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQSVFNSVCNyVCNCVFOSVCQiU4RSVFNCVCQiU4QSVFNSVBNCU5QyVFNiU5QyU4OSVFOSU5QiVBOCVFNCVCOCU5NCVFNiVCMCU5NCVFNiVCOCVBOSUyMDE1JUMyJUIwQyVFRiVCQyU4QyVFNSU4RiVBRiVFOCU4MyVCRCVFNCVCOCU4RCVFOSU4MCU4MiVFNSVBRSU5QyVFNiU4MiVBOCVFNyU5QSU4NCVFNyU4MyU5RiVFOCU4QSVCMSVFOCVBMSVBOCVFNiVCQyU5NCVFOCVBRSVBMSVFNSU4OCU5MiVFMyU4MCU4Mg==",highlighted:`🎩 Alfred<span class="hljs-symbol">&#x27;s</span> Response:
巴黎今夜有雨且气温 <span class="hljs-number">15</span>°C，可能不适宜您的烟花表演计划。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function jU(c){let J,n,s,i,T,t;return J=new $({props:{id:"agents-frameworks",option:"smolagents",$$slots:{default:[$U]},$$scope:{ctx:c}}}),s=new $({props:{id:"agents-frameworks",option:"llama-index",$$slots:{default:[hU]},$$scope:{ctx:c}}}),T=new $({props:{id:"agents-frameworks",option:"langgraph",$$slots:{default:[wU]},$$scope:{ctx:c}}}),{c(){o(J.$$.fragment),n=p(),o(s.$$.fragment),i=p(),o(T.$$.fragment)},l(U){y(J.$$.fragment,U),n=Q(U),y(s.$$.fragment,U),i=Q(U),y(T.$$.fragment,U)},m(U,l){r(J,U,l),C(U,n,l),r(s,U,l),C(U,i,l),r(T,U,l),t=!0},p(U,l){const V={};l&2&&(V.$$scope={dirty:l,ctx:U}),J.$set(V);const O={};l&2&&(O.$$scope={dirty:l,ctx:U}),s.$set(O);const u={};l&2&&(u.$$scope={dirty:l,ctx:U}),T.$set(u)},i(U){t||(R(J.$$.fragment,U),R(s.$$.fragment,U),R(T.$$.fragment,U),t=!0)},o(U){N(J.$$.fragment,U),N(s.$$.fragment,U),N(T.$$.fragment,U),t=!1},d(U){U&&(a(n),a(i)),F(J,U),F(s,U),F(T,U)}}}function EU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cXVlcnklMjAlM0QlMjAlMjJPbmUlMjBvZiUyMG91ciUyMGd1ZXN0cyUyMGlzJTIwZnJvbSUyMFF3ZW4uJTIwV2hhdCUyMGNhbiUyMHlvdSUyMHRlbGwlMjBtZSUyMGFib3V0JTIwdGhlaXIlMjBtb3N0JTIwcG9wdWxhciUyMG1vZGVsJTNGJTIyJTBBcmVzcG9uc2UlMjAlM0QlMjBhbGZyZWQucnVuKHF1ZXJ5KSUwQSUwQXByaW50KCUyMiVGMCU5RiU4RSVBOSUyMEFsZnJlZCdzJTIwUmVzcG9uc2UlM0ElMjIpJTBBcHJpbnQocmVzcG9uc2Up",highlighted:`query = <span class="hljs-string">&quot;One of our guests is from Qwen. What can you tell me about their most popular model?&quot;</span>
response = alfred.run(query)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQVF3ZW4lMjAlRTYlOUMlODAlRTUlOEYlOTclRTYlQUMlQTIlRTglQkYlOEUlRTclOUElODQlRTYlQTglQTElRTUlOUUlOEIlRTYlOTglQUYlMjBRd2VuJTJGUXdlbjIuNS1WTC03Qi1JbnN0cnVjdCVFRiVCQyU4QyVFNCVCOCU4QiVFOCVCRCVCRCVFOSU4NyU4RiVFOCVCRSVCRSUyMDMlMkMzMTMlMkMzNDUlMjAlRTYlQUMlQTElRTMlODAlODI=",highlighted:`🎩 Alfred<span class="hljs-symbol">&#x27;s</span> Response:
Qwen 最受欢迎的模型是 Qwen/Qwen2.<span class="hljs-number">5</span>-VL-<span class="hljs-number">7</span>B-Instruct，下载量达 <span class="hljs-number">3</span>,<span class="hljs-number">313</span>,<span class="hljs-number">345</span> 次。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function kU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cXVlcnklMjAlM0QlMjAlMjJPbmUlMjBvZiUyMG91ciUyMGd1ZXN0cyUyMGlzJTIwZnJvbSUyMEdvb2dsZS4lMjBXaGF0JTIwY2FuJTIweW91JTIwdGVsbCUyMG1lJTIwYWJvdXQlMjB0aGVpciUyMG1vc3QlMjBwb3B1bGFyJTIwbW9kZWwlM0YlMjIlMEFyZXNwb25zZSUyMCUzRCUyMGF3YWl0JTIwYWxmcmVkLnJ1bihxdWVyeSklMEElMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMFJlc3BvbnNlJTNBJTIyKSUwQXByaW50KHJlc3BvbnNlKQ==",highlighted:`query = <span class="hljs-string">&quot;One of our guests is from Google. What can you tell me about their most popular model?&quot;</span>
response = <span class="hljs-keyword">await</span> alfred.run(query)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQUh1Z2dpbmclMjBGYWNlJTIwSHViJTIwJUU0JUI4JThBJTIwR29vZ2xlJTIwJUU2JTlDJTgwJUU1JThGJTk3JUU2JUFDJUEyJUU4JUJGJThFJUU3JTlBJTg0JUU2JUE4JUExJUU1JTlFJThCJUU2JTk4JUFGJTIwZ29vZ2xlJTJGZWxlY3RyYS1iYXNlLWRpc2NyaW1pbmF0b3IlRUYlQkMlOEMlRTQlQjglOEIlRTglQkQlQkQlRTklODclOEYlRTglQkUlQkUlMjAyOCUyQzU0NiUyQzc1MiUyMCVFNiVBQyVBMSVFMyU4MCU4Mg==",highlighted:`🎩 Alfred<span class="hljs-symbol">&#x27;s</span> Response:
Hugging Face Hub 上 Google 最受欢迎的模型是 google/electra-base-discriminator，下载量达 <span class="hljs-number">28</span>,<span class="hljs-number">546</span>,<span class="hljs-number">752</span> 次。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function bU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cmVzcG9uc2UlMjAlM0QlMjBhbGZyZWQuaW52b2tlKCU3QiUyMm1lc3NhZ2VzJTIyJTNBJTIwJTIyT25lJTIwb2YlMjBvdXIlMjBndWVzdHMlMjBpcyUyMGZyb20lMjBRd2VuLiUyMFdoYXQlMjBjYW4lMjB5b3UlMjB0ZWxsJTIwbWUlMjBhYm91dCUyMHRoZWlyJTIwbW9zdCUyMHBvcHVsYXIlMjBtb2RlbCUzRiUyMiU3RCklMEElMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMFJlc3BvbnNlJTNBJTIyKSUwQXByaW50KHJlc3BvbnNlJTVCJ21lc3NhZ2VzJyU1RCU1Qi0xJTVELmNvbnRlbnQp",highlighted:`response = alfred.invoke({<span class="hljs-string">&quot;messages&quot;</span>: <span class="hljs-string">&quot;One of our guests is from Qwen. What can you tell me about their most popular model?&quot;</span>})

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response[<span class="hljs-string">&#x27;messages&#x27;</span>][-<span class="hljs-number">1</span>].content)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQVF3ZW4lMjAlRTQlQjglOEIlRTglQkQlQkQlRTklODclOEYlRTYlOUMlODAlRTklQUIlOTglRTclOUElODQlRTYlQTglQTElRTUlOUUlOEIlRTYlOTglQUYlMjBRd2VuJTJGUXdlbjIuNS1WTC03Qi1JbnN0cnVjdCVFRiVCQyU4QyVFNCVCOCU4QiVFOCVCRCVCRCVFOSU4NyU4RiVFOCVCRSVCRSUyMDMlMkMzMTMlMkMzNDUlMjAlRTYlQUMlQTElRTMlODAlODI=",highlighted:`🎩 Alfred<span class="hljs-symbol">&#x27;s</span> Response:
Qwen 下载量最高的模型是 Qwen/Qwen2.<span class="hljs-number">5</span>-VL-<span class="hljs-number">7</span>B-Instruct，下载量达 <span class="hljs-number">3</span>,<span class="hljs-number">313</span>,<span class="hljs-number">345</span> 次。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function IU(c){let J,n,s,i,T,t;return J=new $({props:{id:"agents-frameworks",option:"smolagents",$$slots:{default:[EU]},$$scope:{ctx:c}}}),s=new $({props:{id:"agents-frameworks",option:"llama-index",$$slots:{default:[kU]},$$scope:{ctx:c}}}),T=new $({props:{id:"agents-frameworks",option:"langgraph",$$slots:{default:[bU]},$$scope:{ctx:c}}}),{c(){o(J.$$.fragment),n=p(),o(s.$$.fragment),i=p(),o(T.$$.fragment)},l(U){y(J.$$.fragment,U),n=Q(U),y(s.$$.fragment,U),i=Q(U),y(T.$$.fragment,U)},m(U,l){r(J,U,l),C(U,n,l),r(s,U,l),C(U,i,l),r(T,U,l),t=!0},p(U,l){const V={};l&2&&(V.$$scope={dirty:l,ctx:U}),J.$set(V);const O={};l&2&&(O.$$scope={dirty:l,ctx:U}),s.$set(O);const u={};l&2&&(u.$$scope={dirty:l,ctx:U}),T.$set(u)},i(U){t||(R(J.$$.fragment,U),R(s.$$.fragment,U),R(T.$$.fragment,U),t=!0)},o(U){N(J.$$.fragment,U),N(s.$$.fragment,U),N(T.$$.fragment,U),t=!1},d(U){U&&(a(n),a(i)),F(J,U),F(s,U),F(T,U)}}}function dU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cXVlcnklMjAlM0QlMjAlMjJJJTIwbmVlZCUyMHRvJTIwc3BlYWslMjB3aXRoJTIwRHIuJTIwTmlrb2xhJTIwVGVzbGElMjBhYm91dCUyMHJlY2VudCUyMGFkdmFuY2VtZW50cyUyMGluJTIwd2lyZWxlc3MlMjBlbmVyZ3kuJTIwQ2FuJTIweW91JTIwaGVscCUyMG1lJTIwcHJlcGFyZSUyMGZvciUyMHRoaXMlMjBjb252ZXJzYXRpb24lM0YlMjIlMEFyZXNwb25zZSUyMCUzRCUyMGFsZnJlZC5ydW4ocXVlcnkpJTBBJTBBcHJpbnQoJTIyJUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUyMiklMEFwcmludChyZXNwb25zZSk=",highlighted:`query = <span class="hljs-string">&quot;I need to speak with Dr. Nikola Tesla about recent advancements in wireless energy. Can you help me prepare for this conversation?&quot;</span>
response = alfred.run(query)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),t=new g({props:{code:" ",highlighted:`🎩 Alfred&#x27;s Response:
我已收集信息帮助您准备与 Nikola Tesla 博士的对话。

嘉宾信息：
姓名：Dr. Nikola Tesla
关系：大学时期的老友
描述：他是您大学时期的老友，最近刚获得新型无线能量传输系统的专利，非常乐意与您讨论。请记住他对鸽子情有独钟，这可能是很好的闲聊话题。
邮箱：nikola.tesla@gmail.com

无线能源最新进展：
根据网络搜索，以下是无线能量传输领域的最新发展：
<span class="hljs-bullet">1.</span> 研究人员在使用聚焦电磁波进行远距离无线输电方面取得进展
<span class="hljs-bullet">2.</span> 多家公司正在开发用于消费电子的谐振感应耦合技术 
<span class="hljs-bullet">3.</span> 无物理连接的电动汽车充电新应用

对话切入点：
<span class="hljs-bullet">1.</span> &quot;我很想听听您关于无线能量传输新专利的情况，与大学时期的原始概念相比有何改进？&quot;
<span class="hljs-bullet">2.</span> &quot;您是否关注近期消费电子谐振感应耦合技术的发展？对他们的方法有何看法？&quot;
<span class="hljs-bullet">3.</span> &quot;您的鸽子最近好吗？我记得您对它们特别着迷&quot;

这些内容将为您与 Tesla 博士的对话提供充足话题，同时展现您对他兴趣领域和专业发展的了解。`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function YU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cXVlcnklMjAlM0QlMjAlMjJJJTIwbmVlZCUyMHRvJTIwc3BlYWslMjB3aXRoJTIwRHIuJTIwTmlrb2xhJTIwVGVzbGElMjBhYm91dCUyMHJlY2VudCUyMGFkdmFuY2VtZW50cyUyMGluJTIwd2lyZWxlc3MlMjBlbmVyZ3kuJTIwQ2FuJTIweW91JTIwaGVscCUyMG1lJTIwcHJlcGFyZSUyMGZvciUyMHRoaXMlMjBjb252ZXJzYXRpb24lM0YlMjIlMEFyZXNwb25zZSUyMCUzRCUyMGF3YWl0JTIwYWxmcmVkLnJ1bihxdWVyeSklMEElMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMFJlc3BvbnNlJTNBJTIyKSUwQXByaW50KHJlc3BvbnNlKQ==",highlighted:`query = <span class="hljs-string">&quot;I need to speak with Dr. Nikola Tesla about recent advancements in wireless energy. Can you help me prepare for this conversation?&quot;</span>
response = <span class="hljs-keyword">await</span> alfred.run(query)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),t=new g({props:{code:"JUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUwQSVFNCVCQiVBNSVFNCVCOCU4QiVFNiU5OCVBRiVFNiU4MiVBOCVFNCVCOCU4RSUyME5pa29sYSUyMFRlc2xhJTIwJUU1JThEJTlBJUU1JUEzJUFCJUU4JUFFJUE4JUU4JUFFJUJBJUU2JTk3JUEwJUU3JUJBJUJGJUU4JTgzJ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yVBQSVFNiU5RCVBNSVFOCVCNiU4QiVFNSU4QSVCRioqJUVGJUJDJTlBJUU2JUE2JTgyJUU4JUJGJUIwJUU2JTk3JUEwJUU3JUJBJUJGJUU0JUJFJTlCJUU4JTgzJUJEJUU2JTk2JUI5JUU2JUIzJTk1JUU3JTlBJTg0JUU2JTlDJTgwJUU2JTk2JUIwJUU4JUJGJTlCJUU1JUIxJTk1JUVGJUJDJThDJUU1JThDJTg1JUU2JThCJUFDJUU4JTgzJUJEJUU5JTg3JThGJUU2JTk0JUI2JUU5JTlCJTg2JUU1JTkyJThDJUU2JTk3JUEwJUU3JUJBJUJGJUU4JUJFJTkzJUU3JTk0JUI1JUU2JThBJTgwJUU2JTlDJUFGJUVGJUJDJThDJUU1JUIxJTk1JUU3JUE0JUJBJUU1JUE0JTlBJUU0JUI4JUFBJUU1JTg5JThEJUU2JTk5JUFGJUU1JUJBJTk0JUU3JTk0JUE4JUU1JUI5JUI2JUU2JThFJUEyJUU4JUFFJUE4JUU5JUEyJTg2JUU1JTlGJTlGJUU2JTlDJUFBJUU2JTlEJUE1JUU4JUI2JThCJUU1JThBJUJGJUUzJTgwJTgyJTBBJTBBNC4lMjAqKiVFNiU5NyVBMCVFNyVCQSVCRiVFNyU5NCVCNSVFNSU4QSU5QiVFNCVCQyVBMCVFOCVCRSU5MyVFRiVCQyU5QSVFNSVCQSU5NCVFNyU5NCVBOCVFMyU4MCU4MSVFNiU4QyU5MSVFNiU4OCU5OCVFNCVCOCU4RSVFOSU5QSU5QyVFNyVBMiU4RCoq",highlighted:`🎩 Alfred&#x27;s Response:
以下是您与 Nikola Tesla 博士讨论无线能源时可能有用的最新进展：

<span class="hljs-bullet">1.</span> <span class="hljs-strong">**无线电力传输的进展与挑战**</span>：本文讨论无线电力传输（WPT）从传统有线方式到现代应用（包括太空太阳能电站）的演变，重点介绍微波技术的初期应用及当前电子设备兴起带来的需求。

<span class="hljs-bullet">2.</span> <span class="hljs-strong">**面向体表电子设备的无线能量传输技术新进展**</span>：探索无线能量传输（WET）作为无电池/导线供电方案的潜力，讨论其优势及潜在应用场景。

<span class="hljs-bullet">3.</span> <span class="hljs-strong">**无线电力传输与能量收集：现状与未来趋势**</span>：概述无线供能方法的最新进展，包括能量收集和无线输电技术，展示多个前景应用并探讨领域未来趋势。

<span class="hljs-bullet">4.</span> <span class="hljs-strong">**无线电力传输：应用、挑战与障碍**</span>`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function GU(c){let J,n,s,i="预期输出：",T,t,U;return J=new g({props:{code:"cmVzcG9uc2UlMjAlM0QlMjBhbGZyZWQuaW52b2tlKCU3QiUyMm1lc3NhZ2VzJTIyJTNBJTIySSUyMG5lZWQlMjB0byUyMHNwZWFrJTIwd2l0aCUyMCdEci4lMjBOaWtvbGElMjBUZXNsYSclMjBhYm91dCUyMHJlY2VudCUyMGFkdmFuY2VtZW50cyUyMGluJTIwd2lyZWxlc3MlMjBlbmVyZ3kuJTIwQ2FuJTIweW91JTIwaGVscCUyMG1lJTIwcHJlcGFyZSUyMGZvciUyMHRoaXMlMjBjb252ZXJzYXRpb24lM0YlMjIlN0QpJTBBJTBBcHJpbnQoJTIyJUYwJTlGJThFJUE5JTIwQWxmcmVkJ3MlMjBSZXNwb25zZSUzQSUyMiklMEFwcmludChyZXNwb25zZSU1QidtZXNzYWdlcyclNUQlNUItMSU1RC5jb250ZW50KQ==",highlighted:`response = alfred.invoke({<span class="hljs-string">&quot;messages&quot;</span>:<span class="hljs-string">&quot;I need to speak with &#x27;Dr. Nikola Tesla&#x27; about recent advancements in wireless energy. Can you help me prepare for this conversation?&quot;</span>})

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response[<span class="hljs-string">&#x27;messages&#x27;</span>][-<span class="hljs-number">1</span>].content)`,wrap:!1}}),t=new g({props:{code:"JUU2JUEwJUI5JUU2JThEJUFFJUU2JThGJTkwJUU0JUJFJTlCJUU3JTlBJTg0JUU0JUJGJUExJUU2JTgxJUFGJUVGJUJDJThDJUU0JUJCJUE1JUU0JUI4JThCJUU2JTk4JUFGJUU1JTg3JTg2JUU1JUE0JTg3JUU0JUI4JThFJTIwJ0RyLiUyME5pa29sYSUyMFRlc2xhJyUyMCVFOCVBRSVBOCVFOCVBRSVCQSVFNiU5NyVBMCVFNyVCQSVCRiVFOCU4MyVCRCVFNiVCQSU5MCVFNiU5QyU4MCVFNiU5NiVCMCVFOCVCRiU5QiVFNSVCMSU5NSVFNyU5QSU4NCVFNSU4NSVCMyVFOSU5NCVBRSVFOCVBNiU4MSVFNyU4MiVCOSVFRiVCQyU5QSUwQTEuJTIwKiolRTYlOTclQTAlRTclQkElQkYlRTclOTQlQjUlRTUlOEElOUIlRTQlQkMlQTAlRTglQkUlOTMlMjAoV1BUKSoqJUVGJUJDJTlBJUU2JThFJUEyJUU4JUFFJUE4JUU1JUE2JTgyJUU0JUJEJTk1JUU5JTgwJTlBJUU4JUJGJTg3JUU2JUI2JTg4JUU5JTk5JUE0JUU3JUJBJUJGJUU3JUJDJTg2JUU5JTlDJTgwJUU2JUIxJTgyJUU1JUI5JUI2JUU1JTg4JUE5JUU3JTk0JUE4JUU2JTg0JTlGJUU1JUJBJTk0JUU1JTkyJThDJUU4JUIwJTkwJUU2JThDJUFGJUU4JTgwJUE2JUU1JTkwJTg4JUU2JTlDJUJBJUU1JTg4JUI2JUU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VCMCVFNyVBMCU5NCVFNyVBOSVCNiVFNiU4OCU5MCVFNiU5RSU5Qw==",highlighted:`根据提供的信息，以下是准备与 &#x27;Dr. Nikola Tesla&#x27; 讨论无线能源最新进展的关键要点：
<span class="hljs-bullet">1.</span> <span class="hljs-strong">**无线电力传输 (WPT)**</span>：探讨如何通过消除线缆需求并利用感应和谐振耦合机制革新能量传输
<span class="hljs-bullet">2.</span> <span class="hljs-strong">**无线充电进展**</span>：强调效率提升、更快充电速度及 Qi/Qi2 认证解决方案的兴起
<span class="hljs-bullet">3.</span> <span class="hljs-strong">**5G-Advanced 创新与 NearLink 协议**</span>：作为提升无线网络速度、安全性和效率的技术，可支持先进无线能源应用
<span class="hljs-bullet">4.</span> <span class="hljs-strong">**边缘 AI/ML**</span>：讨论人工智能如何依赖无线网络实现边缘智能化，提升智能家居自动化水平
<span class="hljs-bullet">5.</span> <span class="hljs-strong">**Matter 标准与安全增强**</span>：作为推动 IoT 设备连接效率和安全性提升的关键创新
<span class="hljs-bullet">6.</span> <span class="hljs-strong">**无线充电技术突破**</span>：包括仁川国立大学等机构的最新研究成果`,wrap:!1}}),{c(){o(J.$$.fragment),n=p(),s=m("p"),s.textContent=i,T=p(),o(t.$$.fragment)},l(l){y(J.$$.fragment,l),n=Q(l),s=f(l,"P",{"data-svelte-h":!0}),S(s)!=="svelte-vb4qji"&&(s.textContent=i),T=Q(l),y(t.$$.fragment,l)},m(l,V){r(J,l,V),C(l,n,V),C(l,s,V),C(l,T,V),r(t,l,V),U=!0},p:B,i(l){U||(R(J.$$.fragment,l),R(t.$$.fragment,l),U=!0)},o(l){N(J.$$.fragment,l),N(t.$$.fragment,l),U=!1},d(l){l&&(a(n),a(s),a(T)),F(J,l),F(t,l)}}}function ZU(c){let J,n,s,i,T,t;return J=new $({props:{id:"agents-frameworks",option:"smolagents",$$slots:{default:[dU]},$$scope:{ctx:c}}}),s=new $({props:{id:"agents-frameworks",option:"llama-index",$$slots:{default:[YU]},$$scope:{ctx:c}}}),T=new $({props:{id:"agents-frameworks",option:"langgraph",$$slots:{default:[GU]},$$scope:{ctx:c}}}),{c(){o(J.$$.fragment),n=p(),o(s.$$.fragment),i=p(),o(T.$$.fragment)},l(U){y(J.$$.fragment,U),n=Q(U),y(s.$$.fragment,U),i=Q(U),y(T.$$.fragment,U)},m(U,l){r(J,U,l),C(U,n,l),r(s,U,l),C(U,i,l),r(T,U,l),t=!0},p(U,l){const V={};l&2&&(V.$$scope={dirty:l,ctx:U}),J.$set(V);const O={};l&2&&(O.$$scope={dirty:l,ctx:U}),s.$set(O);const u={};l&2&&(u.$$scope={dirty:l,ctx:U}),T.$set(u)},i(U){t||(R(J.$$.fragment,U),R(s.$$.fragment,U),R(T.$$.fragment,U),t=!0)},o(U){N(J.$$.fragment,U),N(s.$$.fragment,U),N(T.$$.fragment,U),t=!1},d(U){U&&(a(n),a(i)),F(J,U),F(s,U),F(T,U)}}}function DU(c){let J,n;return J=new g({props:{code:"JTIzJTIwJUU1JTg4JTlCJUU1JUJCJUJBJUU1JUI4JUE2JUU4JUFFJUIwJUU1JUJGJTg2JUU3JTlBJTg0JTIwQWxmcmVkJTBBYWxmcmVkX3dpdGhfbWVtb3J5JTIwJTNEJTIwQ29kZUFnZW50KCUwQSUyMCUyMCUyMCUyMHRvb2xzJTNEJTVCZ3Vlc3RfaW5mb190b29sJTJDJTIwd2VhdGhlcl9pbmZvX3Rvb2wlMkMlMjBodWJfc3RhdHNfdG9vbCUyQyUyMHNlYXJjaF90b29sJTVEJTJDJTIwJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0Rtb2RlbCUyQyUwQSUyMCUyMCUyMCUyMGFkZF9iYXNlX3Rvb2xzJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHBsYW5uaW5nX2ludGVydmFsJTNEMyUwQSklMEElMEElMjMlMjAlRTklQTYlOTYlRTYlQUMlQTElRTQlQkElQTQlRTQlQkElOTIlMEFyZXNwb25zZTElMjAlM0QlMjBhbGZyZWRfd2l0aF9tZW1vcnkucnVuKCUyMlRlbGwlMjBtZSUyMGFib3V0JTIwTGFkeSUyMEFkYSUyMExvdmVsYWNlLiUyMiklMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMEZpcnN0JTIwUmVzcG9uc2UlM0ElMjIpJTBBcHJpbnQocmVzcG9uc2UxKSUwQSUwQSUyMyUyMCVFNCVCQSU4QyVFNiVBQyVBMSVFNCVCQSVBNCVFNCVCQSU5MiVFRiVCQyU4OCVFNSVCQyU5NSVFNyU5NCVBOCVFOSVBNiU5NiVFNiVBQyVBMSVFNSU4NiU4NSVFNSVBRSVCOSVFRiVCQyU4OSUwQXJlc3BvbnNlMiUyMCUzRCUyMGFsZnJlZF93aXRoX21lbW9yeS5ydW4oJTIyV2hhdCUyMHByb2plY3RzJTIwaXMlMjBzaGUlMjBjdXJyZW50bHklMjB3b3JraW5nJTIwb24lM0YlMjIlMkMlMjByZXNldCUzREZhbHNlKSUwQXByaW50KCUyMiVGMCU5RiU4RSVBOSUyMEFsZnJlZCdzJTIwU2Vjb25kJTIwUmVzcG9uc2UlM0ElMjIpJTBBcHJpbnQocmVzcG9uc2UyKQ==",highlighted:`<span class="hljs-comment"># 创建带记忆的 Alfred</span>
alfred_with_memory = CodeAgent(
    tools=[guest_info_tool, weather_info_tool, hub_stats_tool, search_tool], 
    model=model,
    add_base_tools=<span class="hljs-literal">True</span>,
    planning_interval=<span class="hljs-number">3</span>
)

<span class="hljs-comment"># 首次交互</span>
response1 = alfred_with_memory.run(<span class="hljs-string">&quot;Tell me about Lady Ada Lovelace.&quot;</span>)
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s First Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response1)

<span class="hljs-comment"># 二次交互（引用首次内容）</span>
response2 = alfred_with_memory.run(<span class="hljs-string">&quot;What projects is she currently working on?&quot;</span>, reset=<span class="hljs-literal">False</span>)
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Second Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response2)`,wrap:!1}}),{c(){o(J.$$.fragment)},l(s){y(J.$$.fragment,s)},m(s,i){r(J,s,i),n=!0},p:B,i(s){n||(R(J.$$.fragment,s),n=!0)},o(s){N(J.$$.fragment,s),n=!1},d(s){F(J,s)}}}function xU(c){let J,n;return J=new g({props:{code:"ZnJvbSUyMGxsYW1hX2luZGV4LmNvcmUud29ya2Zsb3clMjBpbXBvcnQlMjBDb250ZXh0JTBBJTBBYWxmcmVkJTIwJTNEJTIwQWdlbnRXb3JrZmxvdy5mcm9tX3Rvb2xzX29yX2Z1bmN0aW9ucyglMEElMjAlMjAlMjAlMjAlNUJndWVzdF9pbmZvX3Rvb2wlMkMlMjBzZWFyY2hfdG9vbCUyQyUyMHdlYXRoZXJfaW5mb190b29sJTJDJTIwaHViX3N0YXRzX3Rvb2wlNUQlMkMlMEElMjAlMjAlMjAlMjBsbG0lM0RsbG0lMEEpJTBBJTBBJTIzJTIwJUU4JUFFJUIwJUU1JUJGJTg2JUU3JThBJUI2JUU2JTgwJTgxJTBBY3R4JTIwJTNEJTIwQ29udGV4dChhbGZyZWQpJTBBJTBBJTIzJTIwJUU5JUE2JTk2JUU2JUFDJUExJUU0JUJBJUE0JUU0JUJBJTkyJTBBcmVzcG9uc2UxJTIwJTNEJTIwYXdhaXQlMjBhbGZyZWQucnVuKCUyMlRlbGwlMjBtZSUyMGFib3V0JTIwTGFkeSUyMEFkYSUyMExvdmVsYWNlLiUyMiUyQyUyMGN0eCUzRGN0eCklMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMEZpcnN0JTIwUmVzcG9uc2UlM0ElMjIpJTBBcHJpbnQocmVzcG9uc2UxKSUwQSUwQSUyMyUyMCVFNCVCQSU4QyVFNiVBQyVBMSVFNCVCQSVBNCVFNCVCQSU5MiVFRiVCQyU4OCVFNSVCQyU5NSVFNyU5NCVBOCVFOSVBNiU5NiVFNiVBQyVBMSVFNSU4NiU4NSVFNSVBRSVCOSVFRiVCQyU4OSUwQXJlc3BvbnNlMiUyMCUzRCUyMGF3YWl0JTIwYWxmcmVkLnJ1biglMjJXaGF0JTIwcHJvamVjdHMlMjBpcyUyMHNoZSUyMGN1cnJlbnRseSUyMHdvcmtpbmclMjBvbiUzRiUyMiUyQyUyMGN0eCUzRGN0eCklMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMFNlY29uZCUyMFJlc3BvbnNlJTNBJTIyKSUwQXByaW50KHJlc3BvbnNlMik=",highlighted:`<span class="hljs-keyword">from</span> llama_index.core.workflow <span class="hljs-keyword">import</span> Context

alfred = AgentWorkflow.from_tools_or_functions(
    [guest_info_tool, search_tool, weather_info_tool, hub_stats_tool],
    llm=llm
)

<span class="hljs-comment"># 记忆状态</span>
ctx = Context(alfred)

<span class="hljs-comment"># 首次交互</span>
response1 = <span class="hljs-keyword">await</span> alfred.run(<span class="hljs-string">&quot;Tell me about Lady Ada Lovelace.&quot;</span>, ctx=ctx)
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s First Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response1)

<span class="hljs-comment"># 二次交互（引用首次内容）</span>
response2 = <span class="hljs-keyword">await</span> alfred.run(<span class="hljs-string">&quot;What projects is she currently working on?&quot;</span>, ctx=ctx)
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Second Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response2)`,wrap:!1}}),{c(){o(J.$$.fragment)},l(s){y(J.$$.fragment,s)},m(s,i){r(J,s,i),n=!0},p:B,i(s){n||(R(J.$$.fragment,s),n=!0)},o(s){N(J.$$.fragment,s),n=!1},d(s){F(J,s)}}}function WU(c){let J,n;return J=new g({props:{code:"JTIzJTIwJUU5JUE2JTk2JUU2JUFDJUExJUU0JUJBJUE0JUU0JUJBJTkyJTBBcmVzcG9uc2UlMjAlM0QlMjBhbGZyZWQuaW52b2tlKCU3QiUyMm1lc3NhZ2VzJTIyJTNBJTIwJTVCSHVtYW5NZXNzYWdlKGNvbnRlbnQlM0QlMjJUZWxsJTIwbWUlMjBhYm91dCUyMCdMYWR5JTIwQWRhJTIwTG92ZWxhY2UnLiUyMFdoYXQncyUyMGhlciUyMGJhY2tncm91bmQlMjBhbmQlMjBob3clMjBpcyUyMHNoZSUyMHJlbGF0ZWQlMjB0byUyMG1lJTNGJTIyKSU1RCU3RCklMEElMEElMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMFJlc3BvbnNlJTNBJTIyKSUwQXByaW50KHJlc3BvbnNlJTVCJ21lc3NhZ2VzJyU1RCU1Qi0xJTVELmNvbnRlbnQpJTBBcHJpbnQoKSUwQSUwQSUyMyUyMCVFNCVCQSU4QyVFNiVBQyVBMSVFNCVCQSVBNCVFNCVCQSU5MiVFRiVCQyU4OCVFNSVCQyU5NSVFNyU5NCVBOCVFOSVBNiU5NiVFNiVBQyVBMSVFNSU4NiU4NSVFNSVBRSVCOSVFRiVCQyU4OSUwQXJlc3BvbnNlJTIwJTNEJTIwYWxmcmVkLmludm9rZSglN0IlMjJtZXNzYWdlcyUyMiUzQSUyMHJlc3BvbnNlJTVCJTIybWVzc2FnZXMlMjIlNUQlMjAlMkIlMjAlNUJIdW1hbk1lc3NhZ2UoY29udGVudCUzRCUyMldoYXQlMjBwcm9qZWN0cyUyMGlzJTIwc2hlJTIwY3VycmVudGx5JTIwd29ya2luZyUyMG9uJTNGJTIyKSU1RCU3RCklMEElMEFwcmludCglMjIlRjAlOUYlOEUlQTklMjBBbGZyZWQncyUyMFJlc3BvbnNlJTNBJTIyKSUwQXByaW50KHJlc3BvbnNlJTVCJ21lc3NhZ2VzJyU1RCU1Qi0xJTVELmNvbnRlbnQp",highlighted:`<span class="hljs-comment"># 首次交互</span>
response = alfred.invoke({<span class="hljs-string">&quot;messages&quot;</span>: [HumanMessage(content=<span class="hljs-string">&quot;Tell me about &#x27;Lady Ada Lovelace&#x27;. What&#x27;s her background and how is she related to me?&quot;</span>)]})


<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response[<span class="hljs-string">&#x27;messages&#x27;</span>][-<span class="hljs-number">1</span>].content)
<span class="hljs-built_in">print</span>()

<span class="hljs-comment"># 二次交互（引用首次内容）</span>
response = alfred.invoke({<span class="hljs-string">&quot;messages&quot;</span>: response[<span class="hljs-string">&quot;messages&quot;</span>] + [HumanMessage(content=<span class="hljs-string">&quot;What projects is she currently working on?&quot;</span>)]})

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;🎩 Alfred&#x27;s Response:&quot;</span>)
<span class="hljs-built_in">print</span>(response[<span class="hljs-string">&#x27;messages&#x27;</span>][-<span class="hljs-number">1</span>].content)`,wrap:!1}}),{c(){o(J.$$.fragment)},l(s){y(J.$$.fragment,s)},m(s,i){r(J,s,i),n=!0},p:B,i(s){n||(R(J.$$.fragment,s),n=!0)},o(s){N(J.$$.fragment,s),n=!1},d(s){F(J,s)}}}function _U(c){let J,n,s,i,T,t;return J=new $({props:{id:"agents-frameworks",option:"smolagents",$$slots:{default:[DU]},$$scope:{ctx:c}}}),s=new $({props:{id:"agents-frameworks",option:"llama-index",$$slots:{default:[xU]},$$scope:{ctx:c}}}),T=new $({props:{id:"agents-frameworks",option:"langgraph",$$slots:{default:[WU]},$$scope:{ctx:c}}}),{c(){o(J.$$.fragment),n=p(),o(s.$$.fragment),i=p(),o(T.$$.fragment)},l(U){y(J.$$.fragment,U),n=Q(U),y(s.$$.fragment,U),i=Q(U),y(T.$$.fragment,U)},m(U,l){r(J,U,l),C(U,n,l),r(s,U,l),C(U,i,l),r(T,U,l),t=!0},p(U,l){const V={};l&2&&(V.$$scope={dirty:l,ctx:U}),J.$set(V);const O={};l&2&&(O.$$scope={dirty:l,ctx:U}),s.$set(O);const u={};l&2&&(u.$$scope={dirty:l,ctx:U}),T.$set(u)},i(U){t||(R(J.$$.fragment,U),R(s.$$.fragment,U),R(T.$$.fragment,U),t=!0)},o(U){N(J.$$.fragment,U),N(s.$$.fragment,U),N(T.$$.fragment,U),t=!1},d(U){U&&(a(n),a(i)),F(J,U),F(s,U),F(T,U)}}}function AU(c){let J,n,s,i,T,t,U,l="现在我们已经为 Alfred 构建了所有必要组件，是时候将它们整合成一个完整的智能体来协助举办我们的奢华盛会了。",V,O,u="在本节中，我们将把宾客信息检索、网络搜索、天气信息和 Hub 统计工具整合成一个强大的智能体。",Vl,Y,Cl,G,_l="我们不需要重新实现之前章节创建的所有工具，只需从保存的tools.py和retriever.py模块中导入它们即可。",il,w,Ml,Z,Al="让我们从之前章节导入必要的库和工具：",pl,j,Ql,D,vl="您的智能体现已准备就绪！",ol,x,yl,W,zl="现在 Alfred 已配备所有必要工具，让我们看看他如何协助处理晚会中的各种任务。",rl,_,Rl,A,Xl="展示 Alfred 如何协助获取嘉宾信息：",Nl,E,Fl,v,cl,z,ql="展示 Alfred 如何协助天气查询：",ml,k,fl,X,Sl,q,Hl="展示 Alfred 如何协助与 AI 研究者互动：",gl,b,Ol,H,ul,K,Kl="展示 Alfred 如何协助准备与 Nikola Tesla 博士的对话：",Bl,I,$l,L,hl,P,Ll="为了让 Alfred 在晚会中更智能，我们可以启用对话记忆功能使其记住先前交流：",wl,d,jl,ll,Pl="注意到这三种智能体框架都没有直接集成记忆模块，这种设计有何特殊考量？🧐",El,Ul,lU='<li>smolagents：记忆在不同执行周期中不保留，需通过 reset=False 显式声明</li> <li>LlamaIndex: 需显式添加 context 对象进行运行周期内的记忆管理</li> <li>LangGraph: 提供检索历史消息选项或专用 <a href="https://langchain-ai.github.io/langgraph/tutorials/introduction/#part-3-adding-memory-to-the-chatbot" rel="nofollow">MemorySaver</a> 组件</li>',kl,Jl,bl,sl,UU="恭喜！您已成功构建 Alfred——配备多种工具的智能体助手，可协助举办本世纪最盛大的晚会。Alfred 现在能够：",Il,el,JU="<li>检索嘉宾详细信息</li> <li>核查天气条件规划户外活动</li> <li>提供顶尖 AI 开发者及其模型洞察</li> <li>网络搜索最新资讯</li> <li>通过记忆维持对话上下文</li>",dl,tl,sU="凭借这些能力，Alfred 已准备就绪，确保您的晚会取得圆满成功，通过个性化服务和实时信息给宾客留下深刻印象。",Yl,Tl,Gl,al,Zl;return T=new h({props:{title:"创建你的 Gala 智能体",local:"创建你的-gala-智能体",headingTag:"h1"}}),Y=new h({props:{title:"组装 Alfred：完整智能体",local:"组装-alfred完整智能体",headingTag:"h2"}}),w=new RU({props:{$$slots:{default:[FU]},$$scope:{ctx:c}}}),j=new nl({props:{id:"agents-frameworks",options:["smolagents","llama-index","langgraph"],$$slots:{default:[SU]},$$scope:{ctx:c}}}),x=new h({props:{title:"使用 Alfred：端到端示例",local:"使用-alfred端到端示例",headingTag:"h2"}}),_=new h({props:{title:"示例 1：查找嘉宾信息",local:"示例-1查找嘉宾信息",headingTag:"h3"}}),E=new nl({props:{id:"agents-frameworks",options:["smolagents","llama-index","langgraph"],$$slots:{default:[BU]},$$scope:{ctx:c}}}),v=new h({props:{title:"示例 2：烟花天气核查",local:"示例-2烟花天气核查",headingTag:"h3"}}),k=new nl({props:{id:"agents-frameworks",options:["smolagents","llama-index","langgraph"],$$slots:{default:[jU]},$$scope:{ctx:c}}}),X=new h({props:{title:"示例 3：给 AI 研究者留下深刻印象",local:"示例-3给-ai-研究者留下深刻印象",headingTag:"h3"}}),b=new nl({props:{id:"agents-frameworks",options:["smolagents","llama-index","langgraph"],$$slots:{default:[IU]},$$scope:{ctx:c}}}),H=new h({props:{title:"示例 4：组合多工具应用",local:"示例-4组合多工具应用",headingTag:"h3"}}),I=new nl({props:{id:"agents-frameworks",options:["smolagents","llama-index","langgraph"],$$slots:{default:[ZU]},$$scope:{ctx:c}}}),L=new h({props:{title:"高级功能：对话记忆",local:"高级功能对话记忆",headingTag:"h2"}}),d=new nl({props:{id:"agents-frameworks",options:["smolagents","llama-index","langgraph"],$$slots:{default:[_U]},$$scope:{ctx:c}}}),Jl=new h({props:{title:"结语",local:"结语",headingTag:"h2"}}),Tl=new NU({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/unit3/agentic-rag/agent.mdx"}}),{c(){J=m("meta"),n=p(),s=m("p"),i=p(),o(T.$$.fragment),t=p(),U=m("p"),U.textContent=l,V=p(),O=m("p"),O.textContent=u,Vl=p(),o(Y.$$.fragment),Cl=p(),G=m("p"),G.textContent=_l,il=p(),o(w.$$.fragment),Ml=p(),Z=m("p"),Z.textContent=Al,pl=p(),o(j.$$.fragment),Ql=p(),D=m("p"),D.textContent=vl,ol=p(),o(x.$$.fragment),yl=p(),W=m("p"),W.textContent=zl,rl=p(),o(_.$$.fragment),Rl=p(),A=m("p"),A.textContent=Xl,Nl=p(),o(E.$$.fragment),Fl=p(),o(v.$$.fragment),cl=p(),z=m("p"),z.textContent=ql,ml=p(),o(k.$$.fragment),fl=p(),o(X.$$.fragment),Sl=p(),q=m("p"),q.textContent=Hl,gl=p(),o(b.$$.fragment),Ol=p(),o(H.$$.fragment),ul=p(),K=m("p"),K.textContent=Kl,Bl=p(),o(I.$$.fragment),$l=p(),o(L.$$.fragment),hl=p(),P=m("p"),P.textContent=Ll,wl=p(),o(d.$$.fragment),jl=p(),ll=m("p"),ll.textContent=Pl,El=p(),Ul=m("ul"),Ul.innerHTML=lU,kl=p(),o(Jl.$$.fragment),bl=p(),sl=m("p"),sl.textContent=UU,Il=p(),el=m("ol"),el.innerHTML=JU,dl=p(),tl=m("p"),tl.textContent=sU,Yl=p(),o(Tl.$$.fragment),Gl=p(),al=m("p"),this.h()},l(e){const M=yU("svelte-u9bgzb",document.head);J=f(M,"META",{name:!0,content:!0}),M.forEach(a),n=Q(e),s=f(e,"P",{}),iU(s).forEach(a),i=Q(e),y(T.$$.fragment,e),t=Q(e),U=f(e,"P",{"data-svelte-h":!0}),S(U)!=="svelte-nh7x61"&&(U.textContent=l),V=Q(e),O=f(e,"P",{"data-svelte-h":!0}),S(O)!=="svelte-1jctvfw"&&(O.textContent=u),Vl=Q(e),y(Y.$$.fragment,e),Cl=Q(e),G=f(e,"P",{"data-svelte-h":!0}),S(G)!=="svelte-1ohry3r"&&(G.textContent=_l),il=Q(e),y(w.$$.fragment,e),Ml=Q(e),Z=f(e,"P",{"data-svelte-h":!0}),S(Z)!=="svelte-1qbrbdk"&&(Z.textContent=Al),pl=Q(e),y(j.$$.fragment,e),Ql=Q(e),D=f(e,"P",{"data-svelte-h":!0}),S(D)!=="svelte-y9maz9"&&(D.textContent=vl),ol=Q(e),y(x.$$.fragment,e),yl=Q(e),W=f(e,"P",{"data-svelte-h":!0}),S(W)!=="svelte-18yitsc"&&(W.textContent=zl),rl=Q(e),y(_.$$.fragment,e),Rl=Q(e),A=f(e,"P",{"data-svelte-h":!0}),S(A)!=="svelte-1wyx9jy"&&(A.textContent=Xl),Nl=Q(e),y(E.$$.fragment,e),Fl=Q(e),y(v.$$.fragment,e),cl=Q(e),z=f(e,"P",{"data-svelte-h":!0}),S(z)!=="svelte-rdaf0q"&&(z.textContent=ql),ml=Q(e),y(k.$$.fragment,e),fl=Q(e),y(X.$$.fragment,e),Sl=Q(e),q=f(e,"P",{"data-svelte-h":!0}),S(q)!=="svelte-khi2x1"&&(q.textContent=Hl),gl=Q(e),y(b.$$.fragment,e),Ol=Q(e),y(H.$$.fragment,e),ul=Q(e),K=f(e,"P",{"data-svelte-h":!0}),S(K)!=="svelte-asdesf"&&(K.textContent=Kl),Bl=Q(e),y(I.$$.fragment,e),$l=Q(e),y(L.$$.fragment,e),hl=Q(e),P=f(e,"P",{"data-svelte-h":!0}),S(P)!=="svelte-4ttu8j"&&(P.textContent=Ll),wl=Q(e),y(d.$$.fragment,e),jl=Q(e),ll=f(e,"P",{"data-svelte-h":!0}),S(ll)!=="svelte-1rewqtd"&&(ll.textContent=Pl),El=Q(e),Ul=f(e,"UL",{"data-svelte-h":!0}),S(Ul)!=="svelte-ugvt2r"&&(Ul.innerHTML=lU),kl=Q(e),y(Jl.$$.fragment,e),bl=Q(e),sl=f(e,"P",{"data-svelte-h":!0}),S(sl)!=="svelte-13byigh"&&(sl.textContent=UU),Il=Q(e),el=f(e,"OL",{"data-svelte-h":!0}),S(el)!=="svelte-6agjh1"&&(el.innerHTML=JU),dl=Q(e),tl=f(e,"P",{"data-svelte-h":!0}),S(tl)!=="svelte-ufinki"&&(tl.textContent=sU),Yl=Q(e),y(Tl.$$.fragment,e),Gl=Q(e),al=f(e,"P",{}),iU(al).forEach(a),this.h()},h(){Dl(J,"name","hf:doc:metadata"),Dl(J,"content",vU)},m(e,M){rU(document.head,J),C(e,n,M),C(e,s,M),C(e,i,M),r(T,e,M),C(e,t,M),C(e,U,M),C(e,V,M),C(e,O,M),C(e,Vl,M),r(Y,e,M),C(e,Cl,M),C(e,G,M),C(e,il,M),r(w,e,M),C(e,Ml,M),C(e,Z,M),C(e,pl,M),r(j,e,M),C(e,Ql,M),C(e,D,M),C(e,ol,M),r(x,e,M),C(e,yl,M),C(e,W,M),C(e,rl,M),r(_,e,M),C(e,Rl,M),C(e,A,M),C(e,Nl,M),r(E,e,M),C(e,Fl,M),r(v,e,M),C(e,cl,M),C(e,z,M),C(e,ml,M),r(k,e,M),C(e,fl,M),r(X,e,M),C(e,Sl,M),C(e,q,M),C(e,gl,M),r(b,e,M),C(e,Ol,M),r(H,e,M),C(e,ul,M),C(e,K,M),C(e,Bl,M),r(I,e,M),C(e,$l,M),r(L,e,M),C(e,hl,M),C(e,P,M),C(e,wl,M),r(d,e,M),C(e,jl,M),C(e,ll,M),C(e,El,M),C(e,Ul,M),C(e,kl,M),r(Jl,e,M),C(e,bl,M),C(e,sl,M),C(e,Il,M),C(e,el,M),C(e,dl,M),C(e,tl,M),C(e,Yl,M),r(Tl,e,M),C(e,Gl,M),C(e,al,M),Zl=!0},p(e,[M]){const eU={};M&2&&(eU.$$scope={dirty:M,ctx:e}),w.$set(eU);const tU={};M&2&&(tU.$$scope={dirty:M,ctx:e}),j.$set(tU);const TU={};M&2&&(TU.$$scope={dirty:M,ctx:e}),E.$set(TU);const nU={};M&2&&(nU.$$scope={dirty:M,ctx:e}),k.$set(nU);const aU={};M&2&&(aU.$$scope={dirty:M,ctx:e}),b.$set(aU);const VU={};M&2&&(VU.$$scope={dirty:M,ctx:e}),I.$set(VU);const CU={};M&2&&(CU.$$scope={dirty:M,ctx:e}),d.$set(CU)},i(e){Zl||(R(T.$$.fragment,e),R(Y.$$.fragment,e),R(w.$$.fragment,e),R(j.$$.fragment,e),R(x.$$.fragment,e),R(_.$$.fragment,e),R(E.$$.fragment,e),R(v.$$.fragment,e),R(k.$$.fragment,e),R(X.$$.fragment,e),R(b.$$.fragment,e),R(H.$$.fragment,e),R(I.$$.fragment,e),R(L.$$.fragment,e),R(d.$$.fragment,e),R(Jl.$$.fragment,e),R(Tl.$$.fragment,e),Zl=!0)},o(e){N(T.$$.fragment,e),N(Y.$$.fragment,e),N(w.$$.fragment,e),N(j.$$.fragment,e),N(x.$$.fragment,e),N(_.$$.fragment,e),N(E.$$.fragment,e),N(v.$$.fragment,e),N(k.$$.fragment,e),N(X.$$.fragment,e),N(b.$$.fragment,e),N(H.$$.fragment,e),N(I.$$.fragment,e),N(L.$$.fragment,e),N(d.$$.fragment,e),N(Jl.$$.fragment,e),N(Tl.$$.fragment,e),Zl=!1},d(e){e&&(a(n),a(s),a(i),a(t),a(U),a(V),a(O),a(Vl),a(Cl),a(G),a(il),a(Ml),a(Z),a(pl),a(Ql),a(D),a(ol),a(yl),a(W),a(rl),a(Rl),a(A),a(Nl),a(Fl),a(cl),a(z),a(ml),a(fl),a(Sl),a(q),a(gl),a(Ol),a(ul),a(K),a(Bl),a($l),a(hl),a(P),a(wl),a(jl),a(ll),a(El),a(Ul),a(kl),a(bl),a(sl),a(Il),a(el),a(dl),a(tl),a(Yl),a(Gl),a(al)),a(J),F(T,e),F(Y,e),F(w,e),F(j,e),F(x,e),F(_,e),F(E,e),F(v,e),F(k,e),F(X,e),F(b,e),F(H,e),F(I,e),F(L,e),F(d,e),F(Jl,e),F(Tl,e)}}}const vU='{"title":"创建你的 Gala 智能体","local":"创建你的-gala-智能体","sections":[{"title":"组装 Alfred：完整智能体","local":"组装-alfred完整智能体","sections":[],"depth":2},{"title":"使用 Alfred：端到端示例","local":"使用-alfred端到端示例","sections":[{"title":"示例 1：查找嘉宾信息","local":"示例-1查找嘉宾信息","sections":[],"depth":3},{"title":"示例 2：烟花天气核查","local":"示例-2烟花天气核查","sections":[],"depth":3},{"title":"示例 3：给 AI 研究者留下深刻印象","local":"示例-3给-ai-研究者留下深刻印象","sections":[],"depth":3},{"title":"示例 4：组合多工具应用","local":"示例-4组合多工具应用","sections":[],"depth":3}],"depth":2},{"title":"高级功能：对话记忆","local":"高级功能对话记忆","sections":[],"depth":2},{"title":"结语","local":"结语","sections":[],"depth":2}],"depth":1}';function zU(c){return pU(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class UJ extends QU{constructor(J){super(),oU(this,J,zU,AU,MU,{})}}export{UJ as component};
