import{s as X,n as Z,o as ee}from"../chunks/scheduler.f6319a2a.js";import{S as te,i as ne,g as r,s as a,r as N,A as le,h as i,f as n,c as s,j as R,u as V,x as p,k as z,y as ae,a as l,v as Y,d as F,t as J,w as W}from"../chunks/index.85aa684c.js";import{H as se,E as re}from"../chunks/getInferenceSnippets.0233181f.js";function ie(O){let o,L,_,y,u,H,m,S='这是构建强大 agent 的最简单框架！顺便问一下，什么是 “agent”？我们在<a href="conceptual_guides/intro_agents">此页面</a>提供了我们的定义，您还可以找到关于何时使用或不使用它们的建议（剧透：通常不使用 agent 会更好）。',M,d,j="<p>译者注：Agent 的业内术语是“智能体”。本译文将保留 agent，不作翻译，以带来更高效的阅读体验。(在中文为主的文章中，It’s easier to 注意到英文。Attention Is All You Need!)</p>",$,c,Q="本库提供：",T,f,U="✨ <strong>简洁性</strong>：Agent 逻辑仅需约千行代码。我们将抽象保持在原始代码之上的最小形态！",P,x,B="🌐 <strong>支持任何 LLM</strong>：支持通过 Hub 托管的模型，使用其 <code>transformers</code> 版本或通过我们的推理 API 加载，也支持 OpenAI、Anthropic 等模型。使用任何 LLM 为 agent 提供动力都非常容易。",C,b,D='🧑‍💻 <strong>一流的代码 agent 支持</strong>，即编写代码作为其操作的 agent（与”用于编写代码的 agent”相对），<a href="tutorials/secure_code_execution">在此了解更多</a>。',k,h,G="🤗 <strong>Hub 集成</strong>：您可以在 Hub 上共享和加载工具，更多功能即将推出！",q,g,K='<div class="w-full flex flex-col space-y-4 md:space-y-0 md:grid md:grid-cols-2 md:gap-y-4 md:gap-x-5"><a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./guided_tour"><div class="w-full text-center bg-gradient-to-br from-blue-400 to-blue-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">导览</div> <p class="text-gray-700">学习基础知识并熟悉使用 agent。如果您是第一次使用 agent，请从这里开始！</p></a> <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./examples/text_to_sql"><div class="w-full text-center bg-gradient-to-br from-indigo-400 to-indigo-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">操作指南</div> <p class="text-gray-700">实用指南，帮助您实现特定目标：创建一个生成和测试 SQL 查询的 agent！</p></a> <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./conceptual_guides/intro_agents"><div class="w-full text-center bg-gradient-to-br from-pink-400 to-pink-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">概念指南</div> <p class="text-gray-700">高级解释，帮助您更好地理解重要主题。</p></a> <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./tutorials/building_good_agents"><div class="w-full text-center bg-gradient-to-br from-purple-400 to-purple-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">教程</div> <p class="text-gray-700">涵盖构建 agent 重要方面的横向教程。</p></a></div>',A,v,E,w,I;return u=new se({props:{title:"smolagents",local:"smolagents",headingTag:"h1"}}),v=new re({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/zh/index.md"}}),{c(){o=r("meta"),L=a(),_=r("p"),y=a(),N(u.$$.fragment),H=a(),m=r("p"),m.innerHTML=S,M=a(),d=r("blockquote"),d.innerHTML=j,$=a(),c=r("p"),c.textContent=Q,T=a(),f=r("p"),f.innerHTML=U,P=a(),x=r("p"),x.innerHTML=B,C=a(),b=r("p"),b.innerHTML=D,k=a(),h=r("p"),h.innerHTML=G,q=a(),g=r("div"),g.innerHTML=K,A=a(),N(v.$$.fragment),E=a(),w=r("p"),this.h()},l(e){const t=le("svelte-u9bgzb",document.head);o=i(t,"META",{name:!0,content:!0}),t.forEach(n),L=s(e),_=i(e,"P",{}),R(_).forEach(n),y=s(e),V(u.$$.fragment,e),H=s(e),m=i(e,"P",{"data-svelte-h":!0}),p(m)!=="svelte-ph5ge1"&&(m.innerHTML=S),M=s(e),d=i(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(d)!=="svelte-1i8cg1p"&&(d.innerHTML=j),$=s(e),c=i(e,"P",{"data-svelte-h":!0}),p(c)!=="svelte-10qehgq"&&(c.textContent=Q),T=s(e),f=i(e,"P",{"data-svelte-h":!0}),p(f)!=="svelte-14ifqxj"&&(f.innerHTML=U),P=s(e),x=i(e,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1j75a8v"&&(x.innerHTML=B),C=s(e),b=i(e,"P",{"data-svelte-h":!0}),p(b)!=="svelte-vtqbgz"&&(b.innerHTML=D),k=s(e),h=i(e,"P",{"data-svelte-h":!0}),p(h)!=="svelte-1fe8q7v"&&(h.innerHTML=G),q=s(e),g=i(e,"DIV",{class:!0,"data-svelte-h":!0}),p(g)!=="svelte-1amy2lz"&&(g.innerHTML=K),A=s(e),V(v.$$.fragment,e),E=s(e),w=i(e,"P",{}),R(w).forEach(n),this.h()},h(){z(o,"name","hf:doc:metadata"),z(o,"content",oe),z(d,"class","tip"),z(g,"class","mt-10")},m(e,t){ae(document.head,o),l(e,L,t),l(e,_,t),l(e,y,t),Y(u,e,t),l(e,H,t),l(e,m,t),l(e,M,t),l(e,d,t),l(e,$,t),l(e,c,t),l(e,T,t),l(e,f,t),l(e,P,t),l(e,x,t),l(e,C,t),l(e,b,t),l(e,k,t),l(e,h,t),l(e,q,t),l(e,g,t),l(e,A,t),Y(v,e,t),l(e,E,t),l(e,w,t),I=!0},p:Z,i(e){I||(F(u.$$.fragment,e),F(v.$$.fragment,e),I=!0)},o(e){J(u.$$.fragment,e),J(v.$$.fragment,e),I=!1},d(e){e&&(n(L),n(_),n(y),n(H),n(m),n(M),n(d),n($),n(c),n(T),n(f),n(P),n(x),n(C),n(b),n(k),n(h),n(q),n(g),n(A),n(E),n(w)),n(o),W(u,e),W(v,e)}}}const oe='{"title":"smolagents","local":"smolagents","sections":[],"depth":1}';function de(O){return ee(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class me extends te{constructor(o){super(),ne(this,o,de,ie,X,{})}}export{me as component};
