import{s as dl,o as vl,n as _l}from"../chunks/scheduler.37c15a92.js";import{S as Zl,i as Nl,g as s,s as J,r as M,A as Gl,h as A,f as t,c as U,j as hl,u as y,x as g,k as wl,y as Hl,a as e,v as o,d as i,t as w,w as j,m as Cl,n as bl}from"../chunks/index.2bf4358c.js";import{T as xl}from"../chunks/Tip.363c041f.js";import{C as ol}from"../chunks/CodeBlock.4e987730.js";import{C as Bl}from"../chunks/CourseFloatingBanner.6add7356.js";import{H as il}from"../chunks/Heading.8ada512a.js";import{E as ql}from"../chunks/getInferenceSnippets.d4d07d1e.js";function Sl(E){let O,a,p="此 Notebook",I;return{c(){O=Cl("您可以通过 "),a=s("a"),a.textContent=p,I=Cl(" 跟随代码实践，该文件支持在 Google Colab 中运行。"),this.h()},l(n){O=bl(n,"您可以通过 "),a=A(n,"A",{href:!0,target:!0,"data-svelte-h":!0}),g(a)!=="svelte-amc7jx"&&(a.textContent=p),I=bl(n," 跟随代码实践，该文件支持在 Google Colab 中运行。"),this.h()},h(){wl(a,"href","https://huggingface.co/agents-course/notebooks/blob/main/unit2/smolagents/tool_calling_agents.ipynb"),wl(a,"target","_blank")},m(n,k){e(n,O,k),e(n,a,k),e(n,I,k)},p:_l,d(n){n&&(t(O),t(a),t(I))}}}function El(E){let O,a,p,I,n,k,m,F,r,V,Q,jl="工具调用智能体（Tool Calling Agents）是 <code>smolagents</code> 中提供的第二种智能体类型。与使用 Python 代码片段的代码智能体（Code Agents）不同，这类智能体<strong>利用 LLM 提供商的内置工具调用能力</strong>来生成 <strong>JSON 结构</strong>的工具调用指令。这是 OpenAI、Anthropic 等主流提供商采用的标准方法。",W,R,Il="当 Alfred 想要搜索餐饮服务和派对创意时，<code>CodeAgent</code> 会生成并运行如下 Python 代码：",L,u,X,D,pl="而 <code>ToolCallingAgent</code> 则会创建 JSON 结构：",Y,f,P,c,kl="该 JSON 结构随后会被用于执行工具调用。",z,$,rl='尽管 <code>smolagents</code> 主要专注于 <code>CodeAgents</code>（因为<a href="https://huggingface.co/papers/2402.01030" rel="nofollow">它们整体表现更好</a>），但对于不需要变量处理或复杂工具调用的简单系统，<code>ToolCallingAgents</code> 仍然可以高效工作。',K,h,ml='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/code_vs_json_actions.png" alt="代码操作与 JSON 操作对比"/>',ll,C,Tl,b,Ql='工具调用智能体遵循与代码智能体相同的多步骤工作流程（详见<a href="./code_agents">前一章节</a>）。关键区别在于<strong>操作结构方式</strong>：智能体不再生成可执行代码，而是<strong>生成指定工具名称和参数的 JSON 对象</strong>，系统随后<strong>解析这些指令</strong>来执行相应工具。',tl,d,el,v,Rl="让我们重新审视 Alfred 开始筹备派对的示例，这次使用 <code>ToolCallingAgent</code> 来展示区别。我们将构建一个能够使用 DuckDuckGo 进行网页搜索的智能体，与代码智能体示例的唯一区别在于智能体类型——框架会处理其他所有细节：",Jl,_,Ul,Z,ul="当查看智能体的执行跟踪时，您将看到类似以下内容而非 <code>Executing parsed code:</code>：",nl,N,sl,G,Dl="智能体生成结构化的工具调用指令，系统通过处理这些指令来生成输出，而非像 <code>CodeAgent</code> 那样直接执行代码。",Al,H,fl="现在我们已经了解两种智能体类型，可以根据需求选择合适的一种。让我们继续探索 <code>smolagents</code>，让 Alfred 的派对大获成功！🎉",Ol,x,al,B,cl='<li><a href="https://huggingface.co/docs/smolagents/v1.8.1/en/reference/agents#smolagents.ToolCallingAgent" rel="nofollow">ToolCallingAgent 文档</a> - ToolCallingAgent 的官方文档</li>',gl,q,Ml,S,yl;return n=new Bl({props:{chapter:2,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/#fileId=https://huggingface.co/agents-course/notebooks/blob/main/unit2/smolagents/tool_calling_agents.ipynb"}]}}),m=new il({props:{title:"将操作编写为代码片段或 JSON 结构",local:"将操作编写为代码片段或-json-结构",headingTag:"h1"}}),r=new xl({props:{$$slots:{default:[Sl]},$$scope:{ctx:E}}}),u=new ol({props:{code:"Zm9yJTIwcXVlcnklMjBpbiUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkJlc3QlMjBjYXRlcmluZyUyMHNlcnZpY2VzJTIwaW4lMjBHb3RoYW0lMjBDaXR5JTIyJTJDJTIwJTBBJTIwJTIwJTIwJTIwJTIyUGFydHklMjB0aGVtZSUyMGlkZWFzJTIwZm9yJTIwc3VwZXJoZXJvZXMlMjIlMEElNUQlM0ElMEElMjAlMjAlMjAlMjBwcmludCh3ZWJfc2VhcmNoKGYlMjJTZWFyY2glMjBmb3IlM0ElMjAlN0JxdWVyeSU3RCUyMikp",highlighted:`<span class="hljs-keyword">for</span> query <span class="hljs-keyword">in</span> [
    <span class="hljs-string">&quot;Best catering services in Gotham City&quot;</span>, 
    <span class="hljs-string">&quot;Party theme ideas for superheroes&quot;</span>
]:
    <span class="hljs-built_in">print</span>(web_search(<span class="hljs-string">f&quot;Search for: <span class="hljs-subst">{query}</span>&quot;</span>))`,wrap:!1}}),f=new ol({props:{code:"JTVCJTBBJTIwJTIwJTIwJTIwJTdCJTIybmFtZSUyMiUzQSUyMCUyMndlYl9zZWFyY2glMjIlMkMlMjAlMjJhcmd1bWVudHMlMjIlM0ElMjAlMjJCZXN0JTIwY2F0ZXJpbmclMjBzZXJ2aWNlcyUyMGluJTIwR290aGFtJTIwQ2l0eSUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCU3QiUyMm5hbWUlMjIlM0ElMjAlMjJ3ZWJfc2VhcmNoJTIyJTJDJTIwJTIyYXJndW1lbnRzJTIyJTNBJTIwJTIyUGFydHklMjB0aGVtZSUyMGlkZWFzJTIwZm9yJTIwc3VwZXJoZXJvZXMlMjIlN0QlMEElNUQ=",highlighted:`[
    {<span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;web_search&quot;</span>, <span class="hljs-string">&quot;arguments&quot;</span>: <span class="hljs-string">&quot;Best catering services in Gotham City&quot;</span>},
    {<span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;web_search&quot;</span>, <span class="hljs-string">&quot;arguments&quot;</span>: <span class="hljs-string">&quot;Party theme ideas for superheroes&quot;</span>}
]`,wrap:!1}}),C=new il({props:{title:"工具调用智能体的工作原理",local:"工具调用智能体的工作原理",headingTag:"h2"}}),d=new il({props:{title:"示例：运行工具调用智能体",local:"示例运行工具调用智能体",headingTag:"h2"}}),_=new ol({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBUb29sQ2FsbGluZ0FnZW50JTJDJTIwRHVja0R1Y2tHb1NlYXJjaFRvb2wlMkMlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUwQSUwQWFnZW50JTIwJTNEJTIwVG9vbENhbGxpbmdBZ2VudCh0b29scyUzRCU1QkR1Y2tEdWNrR29TZWFyY2hUb29sKCklNUQlMkMlMjBtb2RlbCUzREluZmVyZW5jZUNsaWVudE1vZGVsKCkpJTBBJTBBYWdlbnQucnVuKCUyMlNlYXJjaCUyMGZvciUyMHRoZSUyMGJlc3QlMjBtdXNpYyUyMHJlY29tbWVuZGF0aW9ucyUyMGZvciUyMGElMjBwYXJ0eSUyMGF0JTIwdGhlJTIwV2F5bmUncyUyMG1hbnNpb24uJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> ToolCallingAgent, DuckDuckGoSearchTool, InferenceClientModel

agent = ToolCallingAgent(tools=[DuckDuckGoSearchTool()], model=InferenceClientModel())

agent.run(<span class="hljs-string">&quot;Search for the best music recommendations for a party at the Wayne&#x27;s mansion.&quot;</span>)`,wrap:!1}}),N=new ol({props:{code:"JUUyJTk1JUFEJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJTk0JTgwJUUyJT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ODAlRTIlOTQlODAlRTIlOTQlODAlRTIlOTQlODAlRTIlOTQlODAlRTIlOTQlODAlRTIlOTQlODAlRTIlOTQlODAlRTIlOTUlQUY=",highlighted:`╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Calling tool: &#x27;web_search&#x27; with arguments: {&#x27;query&#x27;: &quot;best music recommendations for a party at Wayne&#x27;s         │
│ mansion&quot;}                                                                                                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯`,wrap:!1}}),x=new il({props:{title:"资源",local:"资源",headingTag:"h2"}}),q=new ql({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/unit2/smolagents/tool_calling_agents.mdx"}}),{c(){O=s("meta"),a=J(),p=s("p"),I=J(),M(n.$$.fragment),k=J(),M(m.$$.fragment),F=J(),M(r.$$.fragment),V=J(),Q=s("p"),Q.innerHTML=jl,W=J(),R=s("p"),R.innerHTML=Il,L=J(),M(u.$$.fragment),X=J(),D=s("p"),D.innerHTML=pl,Y=J(),M(f.$$.fragment),P=J(),c=s("p"),c.textContent=kl,z=J(),$=s("p"),$.innerHTML=rl,K=J(),h=s("p"),h.innerHTML=ml,ll=J(),M(C.$$.fragment),Tl=J(),b=s("p"),b.innerHTML=Ql,tl=J(),M(d.$$.fragment),el=J(),v=s("p"),v.innerHTML=Rl,Jl=J(),M(_.$$.fragment),Ul=J(),Z=s("p"),Z.innerHTML=ul,nl=J(),M(N.$$.fragment),sl=J(),G=s("p"),G.innerHTML=Dl,Al=J(),H=s("p"),H.innerHTML=fl,Ol=J(),M(x.$$.fragment),al=J(),B=s("ul"),B.innerHTML=cl,gl=J(),M(q.$$.fragment),Ml=J(),S=s("p"),this.h()},l(l){const T=Gl("svelte-u9bgzb",document.head);O=A(T,"META",{name:!0,content:!0}),T.forEach(t),a=U(l),p=A(l,"P",{}),hl(p).forEach(t),I=U(l),y(n.$$.fragment,l),k=U(l),y(m.$$.fragment,l),F=U(l),y(r.$$.fragment,l),V=U(l),Q=A(l,"P",{"data-svelte-h":!0}),g(Q)!=="svelte-4h5a59"&&(Q.innerHTML=jl),W=U(l),R=A(l,"P",{"data-svelte-h":!0}),g(R)!=="svelte-1uk3til"&&(R.innerHTML=Il),L=U(l),y(u.$$.fragment,l),X=U(l),D=A(l,"P",{"data-svelte-h":!0}),g(D)!=="svelte-1ly2vr7"&&(D.innerHTML=pl),Y=U(l),y(f.$$.fragment,l),P=U(l),c=A(l,"P",{"data-svelte-h":!0}),g(c)!=="svelte-2w7dg0"&&(c.textContent=kl),z=U(l),$=A(l,"P",{"data-svelte-h":!0}),g($)!=="svelte-1dhxpic"&&($.innerHTML=rl),K=U(l),h=A(l,"P",{"data-svelte-h":!0}),g(h)!=="svelte-kkam5r"&&(h.innerHTML=ml),ll=U(l),y(C.$$.fragment,l),Tl=U(l),b=A(l,"P",{"data-svelte-h":!0}),g(b)!=="svelte-1k6u3aa"&&(b.innerHTML=Ql),tl=U(l),y(d.$$.fragment,l),el=U(l),v=A(l,"P",{"data-svelte-h":!0}),g(v)!=="svelte-1mi69km"&&(v.innerHTML=Rl),Jl=U(l),y(_.$$.fragment,l),Ul=U(l),Z=A(l,"P",{"data-svelte-h":!0}),g(Z)!=="svelte-11effay"&&(Z.innerHTML=ul),nl=U(l),y(N.$$.fragment,l),sl=U(l),G=A(l,"P",{"data-svelte-h":!0}),g(G)!=="svelte-oldvrt"&&(G.innerHTML=Dl),Al=U(l),H=A(l,"P",{"data-svelte-h":!0}),g(H)!=="svelte-an91op"&&(H.innerHTML=fl),Ol=U(l),y(x.$$.fragment,l),al=U(l),B=A(l,"UL",{"data-svelte-h":!0}),g(B)!=="svelte-1b0h5wy"&&(B.innerHTML=cl),gl=U(l),y(q.$$.fragment,l),Ml=U(l),S=A(l,"P",{}),hl(S).forEach(t),this.h()},h(){wl(O,"name","hf:doc:metadata"),wl(O,"content",Fl)},m(l,T){Hl(document.head,O),e(l,a,T),e(l,p,T),e(l,I,T),o(n,l,T),e(l,k,T),o(m,l,T),e(l,F,T),o(r,l,T),e(l,V,T),e(l,Q,T),e(l,W,T),e(l,R,T),e(l,L,T),o(u,l,T),e(l,X,T),e(l,D,T),e(l,Y,T),o(f,l,T),e(l,P,T),e(l,c,T),e(l,z,T),e(l,$,T),e(l,K,T),e(l,h,T),e(l,ll,T),o(C,l,T),e(l,Tl,T),e(l,b,T),e(l,tl,T),o(d,l,T),e(l,el,T),e(l,v,T),e(l,Jl,T),o(_,l,T),e(l,Ul,T),e(l,Z,T),e(l,nl,T),o(N,l,T),e(l,sl,T),e(l,G,T),e(l,Al,T),e(l,H,T),e(l,Ol,T),o(x,l,T),e(l,al,T),e(l,B,T),e(l,gl,T),o(q,l,T),e(l,Ml,T),e(l,S,T),yl=!0},p(l,[T]){const $l={};T&2&&($l.$$scope={dirty:T,ctx:l}),r.$set($l)},i(l){yl||(i(n.$$.fragment,l),i(m.$$.fragment,l),i(r.$$.fragment,l),i(u.$$.fragment,l),i(f.$$.fragment,l),i(C.$$.fragment,l),i(d.$$.fragment,l),i(_.$$.fragment,l),i(N.$$.fragment,l),i(x.$$.fragment,l),i(q.$$.fragment,l),yl=!0)},o(l){w(n.$$.fragment,l),w(m.$$.fragment,l),w(r.$$.fragment,l),w(u.$$.fragment,l),w(f.$$.fragment,l),w(C.$$.fragment,l),w(d.$$.fragment,l),w(_.$$.fragment,l),w(N.$$.fragment,l),w(x.$$.fragment,l),w(q.$$.fragment,l),yl=!1},d(l){l&&(t(a),t(p),t(I),t(k),t(F),t(V),t(Q),t(W),t(R),t(L),t(X),t(D),t(Y),t(P),t(c),t(z),t($),t(K),t(h),t(ll),t(Tl),t(b),t(tl),t(el),t(v),t(Jl),t(Ul),t(Z),t(nl),t(sl),t(G),t(Al),t(H),t(Ol),t(al),t(B),t(gl),t(Ml),t(S)),t(O),j(n,l),j(m,l),j(r,l),j(u,l),j(f,l),j(C,l),j(d,l),j(_,l),j(N,l),j(x,l),j(q,l)}}}const Fl='{"title":"将操作编写为代码片段或 JSON 结构","local":"将操作编写为代码片段或-json-结构","sections":[{"title":"工具调用智能体的工作原理","local":"工具调用智能体的工作原理","sections":[],"depth":2},{"title":"示例：运行工具调用智能体","local":"示例运行工具调用智能体","sections":[],"depth":2},{"title":"资源","local":"资源","sections":[],"depth":2}],"depth":1}';function Vl(E){return vl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class lT extends Zl{constructor(O){super(),Nl(this,O,Vl,El,dl,{})}}export{lT as component};
