import{s as bt,f as Pt,n as Tt,o as Mt}from"../chunks/scheduler.37c15a92.js";import{S as St,i as Ht,g as o,s as i,r as E,A as Lt,h as a,f as n,c as s,j as ot,u as j,x as p,k as m,y as kt,a as l,v as A,d as q,t as I,w as F}from"../chunks/index.2bf4358c.js";import{H as at}from"../chunks/Heading.8ada512a.js";import{E as yt}from"../chunks/getInferenceSnippets.0aa3753f.js";function Et(pt){let g,O,k,R,h,z,u,rt="现在是时候战斗了！⚡️",G,c,J,w,ft='如果你不想构建自己的智能体，只是好奇智能体在宝可梦中的战斗潜力。我们正在<a href="https://www.twitch.tv/jofthomas" rel="nofollow">twitch</a>上主持一个自动化直播',N,r,mt,U,$,gt="要在直播中与智能体战斗，你可以：",B,_,ht="说明：",D,v,ut='<li>前往 <strong>Pokémon Showdown Space</strong> ：<a href="https://huggingface.co/spaces/Jofthomas/Pokemon_showdown" rel="nofollow">链接在此</a></li> <li><strong>选择你的名称</strong>（右上角）。</li> <li>找到<strong>当前智能体的用户名</strong>。检查：<ul><li><strong>直播显示</strong>：<a href="https://www.twitch.tv/jofthomas" rel="nofollow">链接在此</a></li></ul></li> <li>在 Showdown Space 上<strong>搜索</strong>该用户名并<strong>发送战斗邀请</strong>。</li>',K,d,ct="<em>注意</em>：一次只有一个智能体在线！确保你有正确的名称。",Q,x,V,C,wt="如果你已经从上一节创建了自己的宝可梦战斗智能体，你可能想知道：<strong>我如何测试它与其他智能体的对抗？</strong>让我们找出答案！",W,P,$t='我们为此目的构建了一个专门的<a href="https://huggingface.co/spaces/PShowdown/pokemon_agents" rel="nofollow">Hugging Face Space</a>：',X,f,_t,Y,b,vt="这个 Space 连接到我们自己的<strong>Pokémon Showdown 服务器</strong>，你的智能体可以在那里与其他智能体进行史诗般的 AI 驱动战斗。",Z,T,tt,M,dt="按照这些步骤在竞技场中让你的智能体活跃起来：",et,S,xt=`<li><p><strong>复制 Space</strong>
点击 Space 右上角菜单中的三个点，选择”复制此 Space”。</p></li> <li><p><strong>将你的智能体代码添加到<code>agent.py</code></strong>
打开文件并粘贴你的智能体实现。你可以遵循这个<a href="https://huggingface.co/spaces/PShowdown/pokemon_agents/blob/main/agents.py" rel="nofollow">示例</a>或查看<a href="https://huggingface.co/spaces/PShowdown/pokemon_agents/tree/main" rel="nofollow">项目结构</a>获取指导。</p></li> <li><p><strong>在<code>app.py</code>中注册你的智能体</strong>
将你的智能体名称和逻辑添加到下拉菜单。参考<a href="https://huggingface.co/spaces/PShowdown/pokemon_agents/blob/main/app.py" rel="nofollow">这个片段</a>获取灵感。</p></li> <li><p><strong>选择你的智能体</strong>
添加后，你的智能体将在”选择智能体”下拉菜单中显示。从列表中选择它！✅</p></li> <li><p><strong>输入你的 Pokémon Showdown 用户名</strong>
确保用户名与 iframe 的<strong>“选择名称”</strong>输入中显示的匹配。你也可以连接你的官方账户。</p></li> <li><p><strong>点击”发送战斗邀请”</strong>
你的智能体将向选定的对手发送邀请。它应该出现在屏幕上！</p></li> <li><p><strong>接受战斗并享受战斗！</strong>
让战斗开始！愿最聪明的智能体获胜</p></li>`,nt,H,Ct="准备看到你的创作在行动中吗？让 AI 对决开始！🥊",lt,L,it,y,st;return h=new at({props:{title:"启动你的宝可梦战斗智能体",local:"启动你的宝可梦战斗智能体",headingTag:"h1"}}),c=new at({props:{title:"与直播智能体战斗！",local:"与直播智能体战斗",headingTag:"h2"}}),x=new at({props:{title:"宝可梦战斗智能体挑战者",local:"宝可梦战斗智能体挑战者",headingTag:"h2"}}),T=new at({props:{title:"如何启动你的智能体",local:"如何启动你的智能体",headingTag:"h3"}}),L=new yt({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/bonus-unit3/launching_agent_battle.mdx"}}),{c(){g=o("meta"),O=i(),k=o("p"),R=i(),E(h.$$.fragment),z=i(),u=o("p"),u.textContent=rt,G=i(),E(c.$$.fragment),J=i(),w=o("p"),w.innerHTML=ft,N=i(),r=o("iframe"),U=i(),$=o("p"),$.textContent=gt,B=i(),_=o("p"),_.textContent=ht,D=i(),v=o("ol"),v.innerHTML=ut,K=i(),d=o("p"),d.innerHTML=ct,Q=i(),E(x.$$.fragment),V=i(),C=o("p"),C.innerHTML=wt,W=i(),P=o("p"),P.innerHTML=$t,X=i(),f=o("iframe"),Y=i(),b=o("p"),b.innerHTML=vt,Z=i(),E(T.$$.fragment),tt=i(),M=o("p"),M.textContent=dt,et=i(),S=o("ol"),S.innerHTML=xt,nt=i(),H=o("p"),H.textContent=Ct,lt=i(),E(L.$$.fragment),it=i(),y=o("p"),this.h()},l(t){const e=Lt("svelte-u9bgzb",document.head);g=a(e,"META",{name:!0,content:!0}),e.forEach(n),O=s(t),k=a(t,"P",{}),ot(k).forEach(n),R=s(t),j(h.$$.fragment,t),z=s(t),u=a(t,"P",{"data-svelte-h":!0}),p(u)!=="svelte-cncyok"&&(u.textContent=rt),G=s(t),j(c.$$.fragment,t),J=s(t),w=a(t,"P",{"data-svelte-h":!0}),p(w)!=="svelte-eq4dnb"&&(w.innerHTML=ft),N=s(t),r=a(t,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0}),ot(r).forEach(n),U=s(t),$=a(t,"P",{"data-svelte-h":!0}),p($)!=="svelte-1necnyq"&&($.textContent=gt),B=s(t),_=a(t,"P",{"data-svelte-h":!0}),p(_)!=="svelte-mbgccs"&&(_.textContent=ht),D=s(t),v=a(t,"OL",{"data-svelte-h":!0}),p(v)!=="svelte-1496uds"&&(v.innerHTML=ut),K=s(t),d=a(t,"P",{"data-svelte-h":!0}),p(d)!=="svelte-15ilt7m"&&(d.innerHTML=ct),Q=s(t),j(x.$$.fragment,t),V=s(t),C=a(t,"P",{"data-svelte-h":!0}),p(C)!=="svelte-10cjr3r"&&(C.innerHTML=wt),W=s(t),P=a(t,"P",{"data-svelte-h":!0}),p(P)!=="svelte-65d4sx"&&(P.innerHTML=$t),X=s(t),f=a(t,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0}),ot(f).forEach(n),Y=s(t),b=a(t,"P",{"data-svelte-h":!0}),p(b)!=="svelte-tgjq6s"&&(b.innerHTML=vt),Z=s(t),j(T.$$.fragment,t),tt=s(t),M=a(t,"P",{"data-svelte-h":!0}),p(M)!=="svelte-1wgxbwf"&&(M.textContent=dt),et=s(t),S=a(t,"OL",{"data-svelte-h":!0}),p(S)!=="svelte-1chnai2"&&(S.innerHTML=xt),nt=s(t),H=a(t,"P",{"data-svelte-h":!0}),p(H)!=="svelte-d852lv"&&(H.textContent=Ct),lt=s(t),j(L.$$.fragment,t),it=s(t),y=a(t,"P",{}),ot(y).forEach(n),this.h()},h(){m(g,"name","hf:doc:metadata"),m(g,"content",jt),Pt(r.src,mt="https://jofthomas-twitch-streaming.hf.space")||m(r,"src",mt),m(r,"frameborder","0"),m(r,"width","1200"),m(r,"height","600"),Pt(f.src,_t="https://pshowdown-pokemon-agents.hf.space")||m(f,"src",_t),m(f,"frameborder","0"),m(f,"width","1200"),m(f,"height","600")},m(t,e){kt(document.head,g),l(t,O,e),l(t,k,e),l(t,R,e),A(h,t,e),l(t,z,e),l(t,u,e),l(t,G,e),A(c,t,e),l(t,J,e),l(t,w,e),l(t,N,e),l(t,r,e),l(t,U,e),l(t,$,e),l(t,B,e),l(t,_,e),l(t,D,e),l(t,v,e),l(t,K,e),l(t,d,e),l(t,Q,e),A(x,t,e),l(t,V,e),l(t,C,e),l(t,W,e),l(t,P,e),l(t,X,e),l(t,f,e),l(t,Y,e),l(t,b,e),l(t,Z,e),A(T,t,e),l(t,tt,e),l(t,M,e),l(t,et,e),l(t,S,e),l(t,nt,e),l(t,H,e),l(t,lt,e),A(L,t,e),l(t,it,e),l(t,y,e),st=!0},p:Tt,i(t){st||(q(h.$$.fragment,t),q(c.$$.fragment,t),q(x.$$.fragment,t),q(T.$$.fragment,t),q(L.$$.fragment,t),st=!0)},o(t){I(h.$$.fragment,t),I(c.$$.fragment,t),I(x.$$.fragment,t),I(T.$$.fragment,t),I(L.$$.fragment,t),st=!1},d(t){t&&(n(O),n(k),n(R),n(z),n(u),n(G),n(J),n(w),n(N),n(r),n(U),n($),n(B),n(_),n(D),n(v),n(K),n(d),n(Q),n(V),n(C),n(W),n(P),n(X),n(f),n(Y),n(b),n(Z),n(tt),n(M),n(et),n(S),n(nt),n(H),n(lt),n(it),n(y)),n(g),F(h,t),F(c,t),F(x,t),F(T,t),F(L,t)}}}const jt='{"title":"启动你的宝可梦战斗智能体","local":"启动你的宝可梦战斗智能体","sections":[{"title":"与直播智能体战斗！","local":"与直播智能体战斗","sections":[],"depth":2},{"title":"宝可梦战斗智能体挑战者","local":"宝可梦战斗智能体挑战者","sections":[{"title":"如何启动你的智能体","local":"如何启动你的智能体","sections":[],"depth":3}],"depth":2}],"depth":1}';function At(pt){return Mt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rt extends St{constructor(g){super(),Ht(this,g,At,Et,bt,{})}}export{Rt as component};
