import{s as Gp,f as Do,o as Cp,n as j}from"../chunks/scheduler.889ebb13.js";import{S as Ip,i as Wp,g as o,s,u as r,A as Bp,h as i,f as l,c as a,j as U,v as m,y as M,k as f,o as J,a as n,w as u,d,t as y,x as h}from"../chunks/index.8980e686.js";import{T as g}from"../chunks/Tip.7191df11.js";import{I as $}from"../chunks/IconCopyLink.357761cd.js";import{C as c}from"../chunks/CodeBlock.25fc3430.js";function xp(v){let p,b='Transformers와 관련하여 어떤 도구와 에이전트가 있는지 잘 모르신다면 <a href="transformers_agents">Transformers Agents</a> 페이지를 먼저 읽어보시기 바랍니다.';return{c(){p=o("p"),p.innerHTML=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-123tc9q"&&(p.innerHTML=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function Hp(v){let p,b=`Transformers Agents는 실험 중인 API로 언제든지 변경될 수 있습니다.
API 또는 기반 모델이 변경되기 쉽기 때문에 에이전트가 반환하는 결과도 달라질 수 있습니다.`;return{c(){p=o("p"),p.textContent=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-16b2xrq"&&(p.textContent=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function _p(v){let p,b=`도구에 어떤 이름과 설명이 있어야 하는지 이해하려면 엄선된 Transformers 도구의 이름과 설명을 확인하세요.
<code>Agent.toolbox</code> 속성을 가진 모든 도구를 볼 수 있습니다.`;return{c(){p=o("p"),p.innerHTML=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-1cwhfjr"&&(p.innerHTML=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function Rp(v){let p,b=`에이전트는 여전히 특히 여러 개체의 이미지를 생성하는 것과 같이 약간 더 복잡한 사용 사례에서 취약한 경우가 많습니다.
앞으로 몇 달 안에 에이전트 자체와 기본 프롬프트가 더욱 개선되어 에이전트가 다양한 사용자 입력에 더욱 강력하게 대응할 수 있도록 할 예정입니다.`;return{c(){p=o("p"),p.textContent=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-jpcrxr"&&(p.textContent=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function Yp(v){let p,b="에이전트가 사용 가능한 도구를 인식하고 사용자의 프롬프트를 올바르게 삽입할 수 있도록 <code>&lt;&lt;all_tools&gt;&gt;</code> 문자열과 <code>&lt;&lt;prompt&gt;&gt;</code>를 <code>template</code> 어딘가에 정의해야 합니다.";return{c(){p=o("p"),p.innerHTML=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-pzll9x"&&(p.innerHTML=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function kp(v){let p,b="에이전트가 사용 가능한 도구를 인식할 수 있도록 <code>&lt;&lt;all_tools&gt;&gt;</code> 문자열을 <code>template</code> 어딘가에 정의해야 합니다.";return{c(){p=o("p"),p.innerHTML=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-2unhtj"&&(p.innerHTML=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function Np(v){let p,b=`기존 도구와 똑같은 작업에 사용자 정의 도구를 사용하려는 경우 기존 도구를 덮어쓰는 것이 유용할 수 있습니다.
에이전트가 해당 작업에 능숙하기 때문입니다.
이 경우 사용자 정의 도구가 덮어쓴 도구와 정확히 동일한 API를 따라야 하며, 그렇지 않으면 해당 도구를 사용하는 모든 예제가 업데이트되도록 프롬프트 템플릿을 조정해야 한다는 점에 유의하세요.`;return{c(){p=o("p"),p.textContent=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-1jkbrwq"&&(p.textContent=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function Ep(v){let p,b=`LLM에 따라 일부는 매우 취약하기 때문에 제대로 작동하려면 매우 정확한 프롬프트가 필요합니다.
에이전트가 도구를 잘 활용하기 위해서는 도구의 이름과 설명을 잘 정의하는 것이 무엇보다 중요합니다.`;return{c(){p=o("p"),p.textContent=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-60pjgg"&&(p.textContent=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function Xp(v){let p,b=`다른 도구로 교체할 때는 주의하세요! 이 작업으로 에이전트의 프롬프트도 조정됩니다.
작업에 더 적합한 프롬프트가 있으면 좋을 수 있지만,
다른 도구보다 더 많이 선택되거나 정의한 도구 대신 다른 도구가 선택될 수도 있습니다.`;return{c(){p=o("p"),p.textContent=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-mqcem8"&&(p.textContent=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function Qp(v){let p,b=`gradio-tools는 다른 모달리티로 작업할 때에도 <em>텍스트</em> 입력 및 출력을 필요로 합니다.
이 구현은 이미지 및 오디오 객체에서 작동합니다.
현재는 이 두 가지가 호환되지 않지만 지원 개선을 위해 노력하면서 빠르게 호환될 것입니다.`;return{c(){p=o("p"),p.innerHTML=b},l(w){p=i(w,"P",{"data-svelte-h":!0}),M(p)!=="svelte-tmw7mn"&&(p.innerHTML=b)},m(w,T){n(w,p,T)},p:j,d(w){w&&l(p)}}}function Vp(v){let p,b,w,T,Z,E,cn,pt,Oo,sn,ui="사용자 정의 도구와 프롬프트",Nn,X,En,Q,Xn,rt,di=`에이전트에게 권한을 부여하고 새로운 작업을 수행하게 하려면 사용자 정의 도구와 프롬프트를 만들고 사용하는 것이 무엇보다 중요합니다.
이 가이드에서는 다음과 같은 내용을 살펴보겠습니다:`,Qn,mt,yi="<li>프롬프트를 사용자 정의하는 방법</li> <li>사용자 정의 도구를 사용하는 방법</li> <li>사용자 정의 도구를 만드는 방법</li>",Vn,G,V,Un,ut,ti,an,hi="프롬프트를 사용자 정의하기",Sn,dt,wi=`<a href="transformers_agents">Transformers Agents</a>에서 설명한 것처럼 에이전트는 <code>run()</code> 및 <code>chat()</code> 모드에서 실행할 수 있습니다.
<code>run</code>(실행) 모드와 <code>chat</code>(채팅) 모드 모두 동일한 로직을 기반으로 합니다.
에이전트를 구동하는 언어 모델은 긴 프롬프트에 따라 조건이 지정되고, 중지 토큰에 도달할 때까지 다음 토큰을 생성하여 프롬프트를 완수합니다.
<code>chat</code> 모드에서는 프롬프트가 이전 사용자 입력 및 모델 생성으로 연장된다는 점이 두 모드의 유일한 차이점입니다.
이를 통해 에이전트가 과거 상호작용에 접근할 수 있게 되므로 에이전트에게 일종의 메모리를 제공하는 셈입니다.`,Fn,C,S,bn,yt,ei,on,fi="프롬프트의 구조",zn,ht,Ji=`어떻게 프롬프트 사용자 정의를 잘 할 수 있는지 이해하기 위해 프롬프트의 구조를 자세히 살펴봅시다.
프롬프트는 크게 네 부분으로 구성되어 있습니다.`,qn,wt,ci='<li><ol><li>도입: 에이전트가 어떻게 행동해야 하는지, 도구의 개념에 대한 설명.</li></ol></li> <li><ol start="2"><li>모든 도구에 대한 설명. 이는 런타임에 사용자가 정의/선택한 도구로 동적으로 대체되는 <code>&lt;&lt;all_tools&gt;&gt;</code> 토큰으로 정의됩니다.</li></ol></li> <li><ol start="3"><li>작업 예제 및 해당 솔루션 세트.</li></ol></li> <li><ol start="4"><li>현재 예제 및 해결 요청.</li></ol></li>',An,ft,Ui="각 부분을 더 잘 이해할 수 있도록 짧은 버전을 통해 <code>run</code> 프롬프트가 어떻게 보이는지 살펴보겠습니다:",Ln,Jt,Pn,ct,bi=`도입(<em>“도구:”</em> 앞의 텍스트)에서는 모델이 어떻게 작동하고 무엇을 해야 하는지 정확하게 설명합니다.
에이전트는 항상 같은 방식으로 작동해야 하므로 이 부분은 사용자 정의할 필요가 없을 가능성이 높습니다.`,Kn,Ut,Ti=`두 번째 부분(<em>“도구”</em> 아래의 글머리 기호)은 <code>run</code> 또는 <code>chat</code>을 호출할 때 동적으로 추가됩니다.
정확히 <code>agent.toolbox</code>에 있는 도구 수만큼 글머리 기호가 있고, 각 글머리 기호는 도구의 이름과 설명으로 구성됩니다:`,Dn,bt,On,Tt,vi="문서 질의응답 도구를 가져오고 이름과 설명을 출력해서 빠르게 확인해 보겠습니다.",ts,vt,es,$t,$i="그러면 다음 결과가 출력됩니다:",ls,gt,ns,jt,gi=`여기서 도구 이름이 짧고 정확하다는 것을 알 수 있습니다.
설명은 두 부분으로 구성되어 있는데, 첫 번째 부분에서는 도구의 기능을 설명하고 두 번째 부분에서는 예상되는 입력 인수와 반환 값을 명시합니다.`,ss,Zt,ji=`에이전트가 도구를 올바르게 사용하려면 좋은 도구 이름과 도구 설명이 매우 중요합니다.
에이전트가 도구에 대해 알 수 있는 유일한 정보는 이름과 설명뿐이므로, 이 두 가지를 정확하게 작성하고 도구 상자에 있는 기존 도구의 스타일과 일치하는지 확인해야 합니다.
특히 이름에 따라 예상되는 모든 인수가 설명에 코드 스타일로 언급되어 있는지, 예상되는 유형과 그 유형이 무엇인지에 대한 설명이 포함되어 있는지 확인하세요.`,as,F,os,Gt,Zi=`세 번째 부분에는 에이전트가 어떤 종류의 사용자 요청에 대해 어떤 코드를 생성해야 하는지 정확하게 보여주는 엄선된 예제 세트가 포함되어 있습니다.
에이전트를 지원하는 대규모 언어 모델은 프롬프트에서 패턴을 인식하고 새로운 데이터로 패턴을 반복하는 데 매우 능숙합니다.
따라서 에이전트가 실제로 올바른 실행 가능한 코드를 생성할 가능성을 극대화하는 방식으로 예제를 작성하는 것이 매우 중요합니다.`,is,Ct,Gi="한 가지 예를 살펴보겠습니다:",Ms,It,ps,Wt,Ci=`작업 설명, 에이전트가 수행하려는 작업에 대한 설명, 마지막으로 생성된 코드, 이 세 부분으로 구성된 프롬프트는 모델에 반복하여 제공됩니다.
프롬프트의 일부인 모든 예제는 이러한 정확한 패턴으로 되어 있으므로, 에이전트가 새 토큰을 생성할 때 정확히 동일한 패턴을 재현할 수 있습니다.`,rs,Bt,Ii=`프롬프트 예제는 Transformers 팀이 선별하고 일련의 <a href="https://github.com/huggingface/transformers/blob/main/src/transformers/tools/evaluate_agent.py" rel="nofollow">problem statements</a>에 따라 엄격하게 평가하여
에이전트의 프롬프트가 에이전트의 실제 사용 사례를 최대한 잘 해결할 수 있도록 보장합니다.`,ms,xt,Wi="프롬프트의 마지막 부분은 다음에 해당합니다:",us,Ht,ds,_t,Bi=`이는 에이전트가 완료해야 할 최종적인 미완성 예제입니다. 미완성 예제는 실제 사용자 입력에 따라 동적으로 만들어집니다.
위 예시의 경우 사용자가 다음과 같이 실행했습니다:`,ys,Rt,hs,Yt,xi=`사용자 입력 - <em>즉</em> Task: <em>“Draw me a picture of rivers and lakes”</em>가 프롬프트 템플릿에 맞춰 “Task: &lt;task&gt; \\n\\n I will use the following”로 캐스팅됩니다.
이 문장은 에이전트에게 조건이 적용되는 프롬프트의 마지막 줄을 구성하므로 에이전트가 이전 예제에서 수행한 것과 정확히 동일한 방식으로 예제를 완료하도록 강력하게 영향을 미칩니다.`,ws,kt,Hi="너무 자세히 설명하지 않더라도 채팅 템플릿의 프롬프트 구조는 동일하지만 예제의 스타일이 약간 다릅니다. <em>예를 들면</em>:",fs,Nt,Js,Et,_i=`<code>run</code> 프롬프트의 예와는 반대로, 각 <code>chat</code> 프롬프트의 예에는 <em>Human(사람)</em>과 <em>Assistant(어시스턴트)</em> 간에 하나 이상의 교환이 있습니다. 모든 교환은 <code>run</code> 프롬프트의 예와 유사한 구조로 되어 있습니다.
사용자의 입력이 <em>Human:</em> 뒤에 추가되며, 에이전트에게 코드를 생성하기 전에 수행해야 할 작업을 먼저 생성하라는 메시지가 표시됩니다.
교환은 이전 교환을 기반으로 할 수 있으므로 위와 같이 사용자가 ”<strong>이</strong> 코드를 시도했습니다”라고 입력하면 이전에 생성된 에이전트의 코드를 참조하여 과거 교환을 참조할 수 있습니다.`,cs,Xt,Ri="<code>.chat</code>을 실행하면 사용자의 입력 또는 <em>작업</em>이 미완성된 양식의 예시로 캐스팅됩니다:",Us,Qt,bs,Vt,Yi="그러면 에이전트가 이를 완성합니다. <code>run</code> 명령과 달리 <code>chat</code> 명령은 완료된 예제를 프롬프트에 추가하여 에이전트에게 다음 <code>chat</code> 차례에 대한 더 많은 문맥을 제공합니다.",Ts,St,ki="이제 프롬프트가 어떻게 구성되어 있는지 알았으니 어떻게 사용자 정의할 수 있는지 살펴봅시다!",vs,I,z,Tn,Ft,li,Mn,Ni="좋은 사용자 입력 작성하기",$s,zt,Ei=`대규모 언어 모델이 사용자의 의도를 이해하는 능력이 점점 더 향상되고 있지만, 에이전트가 올바른 작업을 선택할 수 있도록 최대한 정확성을 유지하는 것은 큰 도움이 됩니다.
최대한 정확하다는 것은 무엇을 의미할까요?`,gs,qt,Xi=`에이전트는 프롬프트에서 도구 이름 목록과 해당 설명을 볼 수 있습니다.
더 많은 도구가 추가될수록 에이전트가 올바른 도구를 선택하기가 더 어려워지고 실행할 도구의 올바른 순서를 선택하는 것은 더욱 어려워집니다.
일반적인 실패 사례를 살펴보겠습니다. 여기서는 분석할 코드만 반환하겠습니다.`,js,At,Zs,Lt,Qi="그러면 다음 결과가 출력됩니다:",Gs,Pt,Cs,Kt,Vi=`우리가 원했던 결과가 아닐 수도 있습니다. 대신 나무 이미지가 생성되기를 원할 가능성이 더 높습니다.
따라서 에이전트가 특정 도구를 사용하도록 유도하려면 도구의 이름과 설명에 있는 중요한 키워드를 사용하는 것이 매우 유용할 수 있습니다. 한번 살펴보겠습니다.`,Is,Dt,Ws,Ot,Bs,te,Si="이름과 설명은 “image”, “prompt”, “create” 및 “generate” 키워드를 사용합니다. 이 단어들을 사용하면 더 잘 작동할 가능성이 높습니다. 프롬프트를 조금 더 구체화해 보겠습니다.",xs,ee,Hs,le,Fi="이 코드는 다음 프롬프트를 만들어냅니다:",_s,ne,Rs,se,zi=`훨씬 낫네요! 저희가 원했던 것과 비슷해 보입니다.
즉, 에이전트가 작업을 올바른 도구에 올바르게 매핑하는 데 어려움을 겪고 있다면 도구 이름과 설명에서 가장 관련성이 높은 키워드를 찾아보고 이를 통해 작업 요청을 구체화해 보세요.`,Ys,W,q,vn,ae,ni,pn,qi="도구 설명 사용자 정의하기",ks,oe,Ai=`앞서 살펴본 것처럼 에이전트는 각 도구의 이름과 설명에 액세스할 수 있습니다.
기본 도구에는 매우 정확한 이름과 설명이 있어야 하지만 특정 사용 사례에 맞게 도구의 설명이나 이름을 변경하는 것이 도움이 될 수도 있습니다.
이는 매우 유사한 여러 도구를 추가했거나 특정 도메인(<em>예</em>: 이미지 생성 및 변환)에만 에이전트를 사용하려는 경우에 특히 중요해질 수 있습니다.`,Ns,ie,Li="일반적인 문제는 이미지 생성 작업에 많이 사용되는 경우 에이전트가 이미지 생성과 이미지 변환/수정을 혼동하는 것입니다. <em>예를 들어,</em>",Es,Me,Xs,pe,Pi="그러면 다음 결과가 출력됩니다:",Qs,re,Vs,me,Ki="결과물이 우리가 여기서 원하는 것과 정확히 일치하지 않을 수 있습니다. 에이전트가 <code>image_generator</code>와 <code>image_transformer</code>의 차이점을 이해하기 어려워서 두 가지를 함께 사용하는 경우가 많은 것 같습니다.",Ss,ue,Di=`여기서 <code>image_transformer</code>의 도구 이름과 설명을 변경하여 에이전트가 도울 수 있습니다.
“image” 및 “prompt”와 약간 분리하기 위해 <code>modifier</code>라고 대신 부르겠습니다:`,Fs,de,zs,ye,Oi="이제 “modify”은 새 이미지 프로세서를 사용하라는 강력한 신호이므로 위의 프롬프트에 도움이 될 것입니다. 다시 실행해 봅시다.",qs,he,As,we,tM="여기서 다음과 같은 결과를 얻게 됩니다:",Ls,fe,Ps,Je,eM="우리가 염두에 두었던 것과 확실히 더 가까워졌습니다! 하지만 집과 자동차가 모두 같은 이미지에 포함되면 좋겠습니다. 작업을 단일 이미지 생성에 더 집중하면 도움이 될 것입니다:",Ks,ce,Ds,Ue,Os,A,ta,B,L,$n,be,si,rn,lM="전체 프롬프트 사용자 정의하기",ea,Te,nM=`사용자에게 최대한의 유연성을 제공하기 위해 <a href="#structure-of-the-prompt">위</a>에 설명된 전체 프롬프트 템플릿을 사용자가 덮어쓸 수 있습니다.
이 경우 사용자 정의 프롬프트에 소개 섹션, 도구 섹션, 예제 섹션 및 미완성 예제 섹션이 포함되어 있는지 확인하세요.
<code>run</code> 프롬프트 템플릿을 덮어쓰려면 다음과 같이 하면 됩니다:`,la,ve,na,P,sa,$e,sM="마찬가지로 <code>chat</code> 프롬프트 템플릿을 덮어쓸 수 있습니다. <code>chat</code> 모드에서는 항상 다음과 같은 교환 형식을 사용한다는 점에 유의하세요:",aa,ge,oa,je,aM=`따라서 사용자 정의 <code>chat</code> 프롬프트 템플릿의 예제에서도 이 형식을 사용하는 것이 중요합니다.
다음과 같이 인스턴스화 할 때 <code>chat</code> 템플릿을 덮어쓸 수 있습니다.`,ia,Ze,Ma,K,pa,Ge,oM=`두 경우 모두 커뮤니티의 누군가가 호스팅하는 템플릿을 사용하려는 경우 프롬프트 템플릿 대신 저장소 ID를 전달할 수 있습니다.
기본 프롬프트는 <a href="https://huggingface.co/datasets/huggingface-tools/default-prompts" rel="nofollow">이 저장소</a>를 예로 들 수 있습니다.`,ra,Ce,iM="Hub의 저장소에 사용자 정의 프롬프트를 업로드하여 커뮤니티와 공유하려면 다음을 확인하세요:",ma,Ie,MM="<li>데이터 세트 저장소를 사용하세요.</li> <li><code>run</code> 명령에 대한 프롬프트 템플릿을 <code>run_prompt_template.txt</code>라는 파일에 넣으세요.</li> <li><code>chat</code> 명령에 대한 프롬프트 템플릿을 <code>chat_prompt_template.txt</code>라는 파일에 넣으세요.</li>",ua,x,D,gn,We,ai,mn,pM="사용자 정의 도구 사용하기",da,Be,rM="이 섹션에서는 이미지 생성에 특화된 두 가지 기존 사용자 정의 도구를 활용하겠습니다:",ya,xe,mM=`<li>더 많은 이미지 수정을 허용하기 위해 <a href="https://huggingface.co/spaces/huggingface-tools/image-transformation" rel="nofollow">huggingface-tools/image-transformation</a>을
<a href="https://huggingface.co/spaces/diffusers/controlnet-canny-tool" rel="nofollow">diffusers/controlnet-canny-tool</a>로 대체합니다.</li> <li>기본 도구 상자에 이미지 업스케일링을 위한 새로운 도구가 추가되었습니다:
<a href="https://huggingface.co/spaces/diffusers/latent-upscaler-tool" rel="nofollow">diffusers/latent-upscaler-tool</a>가 기존 이미지 변환 도구를 대체합니다.</li>`,ha,He,uM="편리한 <code>load_tool()</code> 함수를 사용하여 사용자 정의 도구를 가져오는 것으로 시작하겠습니다:",wa,_e,fa,Re,dM=`에이전트에게 사용자 정의 도구를 추가하면 도구의 설명과 이름이 에이전트의 프롬프트에 자동으로 포함됩니다.
따라서 에이전트가 사용 방법을 이해할 수 있도록 사용자 정의 도구의 설명과 이름을 잘 작성해야 합니다.
<code>controlnet_transformer</code>의 설명과 이름을 살펴보겠습니다:`,Ja,Ye,ca,ke,yM="그러면 다음 결과가 출력됩니다:",Ua,Ne,ba,Ee,hM=`이름과 설명이 정확하고 <a href="./transformers_agents#a-curated-set-of-tools">큐레이팅 된 도구 세트(curated set of tools)</a>의 스타일에 맞습니다.
다음으로, <code>controlnet_transformer</code>와 <code>upscaler</code>로 에이전트를 인스턴스화해 봅시다:`,Ta,Xe,va,Qe,wM="이 명령을 실행하면 다음 정보가 표시됩니다:",$a,Ve,ga,Se,fM="큐레이팅된 도구 세트에는 이미 ‘image_transformer’ 도구가 있으며, 이 도구는 사용자 정의 도구로 대체됩니다.",ja,O,Za,Fe,JM=`업스케일러 도구에 지정된 ‘image_upscaler’라는 이름 아직 기본 도구 상자에는 존재하지 않기 때문에, 도구 목록에 해당 이름이 간단히 추가되었습니다.
에이전트가 현재 사용할 수 있는 도구 상자는 언제든지 <code>agent.toolbox</code> 속성을 통해 확인할 수 있습니다:`,Ga,ze,Ca,qe,Ia,Ae,cM="에이전트의 도구 상자에 <code>image_upscaler</code>가 추가된 점을 주목하세요.",Wa,Le,UM='이제 새로운 도구를 사용해봅시다! <a href="./transformers_agents#single-execution-run">Transformers Agents Quickstart</a>에서 생성한 이미지를 다시 사용하겠습니다.',Ba,Pe,xa,Ke,bM,Ha,De,TM="이미지를 아름다운 겨울 풍경으로 바꿔 봅시다:",_a,Oe,Ra,tl,Ya,el,vM,ka,ll,$M=`새로운 이미지 처리 도구는 이미지를 매우 강력하게 수정할 수 있는 ControlNet을 기반으로 합니다.
기본적으로 이미지 처리 도구는 512x512 픽셀 크기의 이미지를 반환합니다. 이를 업스케일링할 수 있는지 살펴봅시다.`,Na,nl,Ea,sl,Xa,al,gM,Qa,ol,jM="에이전트는 업스케일러 도구의 설명과 이름만 보고 방금 추가한 업스케일러 도구에 “이미지 업스케일링”이라는 프롬프트를 자동으로 매핑하여 올바르게 실행했습니다.",Va,il,ZM="다음으로 새 사용자 정의 도구를 만드는 방법을 살펴보겠습니다.",Sa,H,tt,jn,Ml,oi,un,GM="새 도구 추가하기",Fa,pl,CM="이 섹션에서는 에이전트에게 추가할 수 있는 새 도구를 만드는 방법을 보여 드립니다.",za,_,et,Zn,rl,ii,dn,IM="새 도구 만들기",qa,ml,WM=`먼저 도구를 만드는 것부터 시작하겠습니다.
특정 작업에 대해 가장 많은 다운로드를 받은 Hugging Face Hub의 모델을 가져오는, 그다지 유용하지는 않지만 재미있는 작업을 추가하겠습니다.`,Aa,ul,BM="다음 코드를 사용하면 됩니다:",La,dl,Pa,yl,xM="<code>text-classification</code>(텍스트 분류) 작업의 경우 <code>&#39;facebook/bart-large-mnli&#39;</code>를 반환하고, <code>translation</code>(번역) 작업의 경우 <code>&#39;t5-base&#39;</code>를 반환합니다.",Ka,hl,HM=`이를 에이전트가 활용할 수 있는 도구로 변환하려면 어떻게 해야 할까요?
모든 도구는 필요한 주요 속성을 보유하는 슈퍼클래스 <code>Tool</code>에 의존합니다. 이를 상속하는 클래스를 만들어 보겠습니다:`,Da,wl,Oa,fl,_M="이 클래스에는 몇 가지 요구사항이 있습니다:",to,Jl,RM=`<li>도구 자체의 이름에 해당하는 <code>name</code> 속성. 수행명이 있는 다른 도구와 호환되도록 <code>model_download_counter</code>로 이름을 지정하겠습니다.</li> <li>에이전트의 프롬프트를 채우는 데 사용되는 속성 <code>description</code>.</li> <li><code>inputs</code> 및 <code>outputs</code> 속성. 이를 정의하면 Python 인터프리터가 유형에 대한 정보에 입각한 선택을 하는 데 도움이 되며,
도구를 허브에 푸시할 때 gradio 데모를 생성할 수 있습니다.
두 속성 모두 값은 ‘텍스트’, ‘이미지’ 또는 ‘오디오’가 될 수 있는 예상 값의 리스트입니다.</li> <li>추론 코드가 포함된 <code>__call__</code> 메소드. 이것이 우리가 위에서 다루었던 코드입니다!</li>`,eo,cl,YM="이제 클래스의 모습은 다음과 같습니다:",lo,Ul,no,bl,kM=`이제 도구를 손쉽게 사용할 수 있게 되었습니다.
도구를 파일에 저장하고 메인 스크립트에서 가져옵니다. 이 파일의 이름을 <code>model_downloads.py</code>로 지정하면 결과적으로 가져오기 코드는 다음과 같습니다:`,so,Tl,ao,vl,NM=`다른 사람들이 이 기능을 활용할 수 있도록 하고 초기화를 더 간단하게 하려면 네임스페이스 아래의 Hub로 푸시하는 것이 좋습니다.
그렇게 하려면 <code>tool</code> 변수에서 <code>push_to_hub</code>를 호출하면 됩니다:`,oo,$l,io,gl,EM="이제 허브에 코드가 생겼습니다! 마지막 단계인 에이전트가 코드를 사용하도록 하는 단계를 살펴보겠습니다.",Mo,R,lt,Gn,jl,Mi,yn,XM="에이전트가 도구를 사용하게 하기",po,Zl,QM=`이제 이런 식으로 허브에 존재하는 도구를 인스턴스화할 수 있습니다(도구의 사용자 이름은 변경하세요):
We now have our tool that lives on the Hub which can be instantiated as such (change the user name for your tool):`,ro,Gl,mo,Cl,VM="이 도구를 에이전트에서 사용하려면 에이전트 초기화 메소드의 <code>additional_tools</code> 매개변수에 전달하기만 하면 됩니다:",uo,Il,yo,Wl,SM="그러면 다음과 같은 결과가 출력됩니다:",ho,Bl,wo,xl,FM="and generates the following audio.",fo,Hl,zM='<thead><tr><th><strong>Audio</strong></th></tr></thead> <tbody><tr><td><audio controls=""><source src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/damo.wav" type="audio/wav"/></audio></td></tr></tbody>',Jo,nt,co,Y,st,Cn,_l,pi,hn,qM="기존 도구 대체하기",Uo,Rl,AM="에이전트의 도구 상자에 새 항목을 배정하기만 하면 기존 도구를 대체할 수 있습니다. 방법은 다음과 같습니다:",bo,Yl,To,at,vo,k,ot,In,kl,ri,wn,LM="gradio-tools 사용하기",$o,Nl,PM=`<a href="https://github.com/freddyaboulton/gradio-tools" rel="nofollow">gradio-tools</a>는 Hugging Face Spaces를 도구로 사용할 수 있는 강력한 라이브러리입니다.
기존의 많은 Spaces뿐만 아니라 사용자 정의 Spaces를 사용하여 디자인할 수 있도록 지원합니다.`,go,El,KM=`우리는 <code>Tool.from_gradio</code> 메소드를 사용하여 <code>gradio_tools</code>에 대한 지원을 제공합니다.
예를 들어, 프롬프트를 개선하고 더 나은 이미지를 생성하기 위해 <code>gradio-tools</code> 툴킷에서 제공되는 <code>StableDiffusionPromptGeneratorTool</code> 도구를 활용하고자 합니다.`,jo,Xl,DM="먼저 <code>gradio_tools</code>에서 도구를 가져와서 인스턴스화합니다:",Zo,Ql,Go,Vl,OM="해당 인스턴스를 <code>Tool.from_gradio</code> 메소드에 전달합니다:",Co,Sl,Io,Fl,tp="이제 일반적인 사용자 정의 도구와 똑같이 관리할 수 있습니다.\n이를 활용하여 `a rabbit wearing a space suit’(우주복을 입은 토끼)라는 프롬프트를 개선했습니다:",Wo,zl,Bo,ql,ep="모델이 도구를 적절히 활용합니다:",xo,Al,Ho,Ll,lp="마지막으로 이미지를 생성하기 전에:",_o,fn,np,Ro,it,Yo,N,Mt,Wn,Pl,mi,Jn,sp="향후 Langchain과의 호환성",ko,Kl,ap=`저희는 Langchain을 좋아하며 매우 매력적인 도구 모음을 가지고 있다고 생각합니다.
이러한 도구를 처리하기 위해 Langchain은 다른 모달리티와 작업할 때에도 <em>텍스트</em> 입력과 출력을 필요로 합니다.
이는 종종 객체의 직렬화된(즉, 디스크에 저장된) 버전입니다.`,No,Dl,op=`이 차이로 인해 transformers-agents와 Langchain 간에는 멀티 모달리티가 처리되지 않습니다.
향후 버전에서 이 제한이 해결되기를 바라며, 이 호환성을 달성할 수 있도록 열렬한 Langchain 사용자의 도움을 환영합니다.`,Eo,Ol,ip='저희는 더 나은 지원을 제공하고자 합니다. 도움을 주고 싶으시다면, <a href="https://github.com/huggingface/transformers/issues/new" rel="nofollow">이슈를 열어</a> 의견을 공유해 주세요.',Xo,Bn,Qo;return pt=new $({}),X=new g({props:{$$slots:{default:[xp]},$$scope:{ctx:v}}}),Q=new g({props:{warning:!0,$$slots:{default:[Hp]},$$scope:{ctx:v}}}),ut=new $({}),yt=new $({}),Jt=new c({props:{code:"SSUyMHdpbGwlMjBhc2slMjB5b3UlMjB0byUyMHBlcmZvcm0lMjBhJTIwdGFzayUyQyUyMHlvdXIlMjBqb2IlMjBpcyUyMHRvJTIwY29tZSUyMHVwJTIwd2l0aCUyMGElMjBzZXJpZXMlMjBvZiUyMHNpbXBsZSUyMGNvbW1hbmRzJTIwaW4lMjBQeXRob24lMjB0aGF0JTIwd2lsbCUyMHBlcmZvcm0lMjB0aGUlMjB0YXNrLiUwQSU1Qi4uLiU1RCUwQVlvdSUyMGNhbiUyMHByaW50JTIwaW50ZXJtZWRpYXRlJTIwcmVzdWx0cyUyMGlmJTIwaXQlMjBtYWtlcyUyMHNlbnNlJTIwdG8lMjBkbyUyMHNvLiUwQSUwQVRvb2xzJTNBJTBBLSUyMGRvY3VtZW50X3FhJTNBJTIwVGhpcyUyMGlzJTIwYSUyMHRvb2wlMjB0aGF0JTIwYW5zd2VycyUyMGElMjBxdWVzdGlvbiUyMGFib3V0JTIwYSUyMGRvY3VtZW50JTIwKHBkZikuJTIwSXQlMjB0YWtlcyUyMGFuJTIwaW5wdXQlMjBuYW1lZCUyMCU2MGRvY3VtZW50JTYwJTIwd2hpY2glMjBzaG91bGQlMjBiZSUyMHRoZSUyMGRvY3VtZW50JTIwY29udGFpbmluZyUyMHRoZSUyMGluZm9ybWF0aW9uJTJDJTIwYXMlMjB3ZWxsJTIwYXMlMjBhJTIwJTYwcXVlc3Rpb24lNjAlMjB0aGF0JTIwaXMlMjB0aGUlMjBxdWVzdGlvbiUyMGFib3V0JTIwdGhlJTIwZG9jdW1lbnQuJTIwSXQlMjByZXR1cm5zJTIwYSUyMHRleHQlMjB0aGF0JTIwY29udGFpbnMlMjB0aGUlMjBhbnN3ZXIlMjB0byUyMHRoZSUyMHF1ZXN0aW9uLiUwQS0lMjBpbWFnZV9jYXB0aW9uZXIlM0ElMjBUaGlzJTIwaXMlMjBhJTIwdG9vbCUyMHRoYXQlMjBnZW5lcmF0ZXMlMjBhJTIwZGVzY3JpcHRpb24lMjBvZiUyMGFuJTIwaW1hZ2UuJTIwSXQlMjB0YWtlcyUyMGFuJTIwaW5wdXQlMjBuYW1lZCUyMCU2MGltYWdlJTYwJTIwd2hpY2glMjBzaG91bGQlMjBiZSUyMHRoZSUyMGltYWdlJTIwdG8lMjB0aGUlMjBjYXB0aW9uJTIwYW5kJTIwcmV0dXJucyUyMGElMjB0ZXh0JTIwdGhhdCUyMGNvbnRhaW5zJTIwdGhlJTIwZGVzY3JpcHRpb24lMjBpbiUyMEVuZ2xpc2guJTBBJTVCLi4uJTVEJTBBJTBBVGFzayUzQSUyMCUyMkFuc3dlciUyMHRoZSUyMHF1ZXN0aW9uJTIwaW4lMjB0aGUlMjB2YXJpYWJsZSUyMCU2MHF1ZXN0aW9uJTYwJTIwYWJvdXQlMjB0aGUlMjBpbWFnZSUyMHN0b3JlZCUyMGluJTIwdGhlJTIwdmFyaWFibGUlMjAlNjBpbWFnZSU2MC4lMjBUaGUlMjBxdWVzdGlvbiUyMGlzJTIwaW4lMjBGcmVuY2guJTIyJTBBJTBBSSUyMHdpbGwlMjB1c2UlMjB0aGUlMjBmb2xsb3dpbmclMjB0b29scyUzQSUyMCU2MHRyYW5zbGF0b3IlNjAlMjB0byUyMHRyYW5zbGF0ZSUyMHRoZSUyMHF1ZXN0aW9uJTIwaW50byUyMEVuZ2xpc2glMjBhbmQlMjB0aGVuJTIwJTYwaW1hZ2VfcWElNjAlMjB0byUyMGFuc3dlciUyMHRoZSUyMHF1ZXN0aW9uJTIwb24lMjB0aGUlMjBpbnB1dCUyMGltYWdlLiUwQSUwQUFuc3dlciUzQSUwQSU2MCU2MCU2MHB5JTBBdHJhbnNsYXRlZF9xdWVzdGlvbiUyMCUzRCUyMHRyYW5zbGF0b3IocXVlc3Rpb24lM0RxdWVzdGlvbiUyQyUyMHNyY19sYW5nJTNEJTIyRnJlbmNoJTIyJTJDJTIwdGd0X2xhbmclM0QlMjJFbmdsaXNoJTIyKSUwQXByaW50KGYlMjJUaGUlMjB0cmFuc2xhdGVkJTIwcXVlc3Rpb24lMjBpcyUyMCU3QnRyYW5zbGF0ZWRfcXVlc3Rpb24lN0QuJTIyKSUwQWFuc3dlciUyMCUzRCUyMGltYWdlX3FhKGltYWdlJTNEaW1hZ2UlMkMlMjBxdWVzdGlvbiUzRHRyYW5zbGF0ZWRfcXVlc3Rpb24pJTBBcHJpbnQoZiUyMlRoZSUyMGFuc3dlciUyMGlzJTIwJTdCYW5zd2VyJTdEJTIyKSUwQSU2MCU2MCU2MCUwQSUwQVRhc2slM0ElMjAlMjJJZGVudGlmeSUyMHRoZSUyMG9sZGVzdCUyMHBlcnNvbiUyMGluJTIwdGhlJTIwJTYwZG9jdW1lbnQlNjAlMjBhbmQlMjBjcmVhdGUlMjBhbiUyMGltYWdlJTIwc2hvd2Nhc2luZyUyMHRoZSUyMHJlc3VsdCUyMGFzJTIwYSUyMGJhbm5lci4lMjIlMEElMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMHRvb2xzJTNBJTIwJTYwZG9jdW1lbnRfcWElNjAlMjB0byUyMGZpbmQlMjB0aGUlMjBvbGRlc3QlMjBwZXJzb24lMjBpbiUyMHRoZSUyMGRvY3VtZW50JTJDJTIwdGhlbiUyMCU2MGltYWdlX2dlbmVyYXRvciU2MCUyMHRvJTIwZ2VuZXJhdGUlMjBhbiUyMGltYWdlJTIwYWNjb3JkaW5nJTIwdG8lMjB0aGUlMjBhbnN3ZXIuJTBBJTBBQW5zd2VyJTNBJTBBJTYwJTYwJTYwcHklMEFhbnN3ZXIlMjAlM0QlMjBkb2N1bWVudF9xYShkb2N1bWVudCUyQyUyMHF1ZXN0aW9uJTNEJTIyV2hhdCUyMGlzJTIwdGhlJTIwb2xkZXN0JTIwcGVyc29uJTNGJTIyKSUwQXByaW50KGYlMjJUaGUlMjBhbnN3ZXIlMjBpcyUyMCU3QmFuc3dlciU3RC4lMjIpJTBBaW1hZ2UlMjAlM0QlMjBpbWFnZV9nZW5lcmF0b3IoJTIyQSUyMGJhbm5lciUyMHNob3dpbmclMjAlMjIlMjAlMkIlMjBhbnN3ZXIpJTBBJTYwJTYwJTYwJTBBJTBBJTVCLi4uJTVEJTBBJTBBVGFzayUzQSUyMCUyMkRyYXclMjBtZSUyMGElMjBwaWN0dXJlJTIwb2YlMjByaXZlcnMlMjBhbmQlMjBsYWtlcyUyMiUwQSUwQUklMjB3aWxsJTIwdXNlJTIwdGhlJTIwZm9sbG93aW5n",highlighted:`I will ask you to perform a task, your job is to come up with a series of simple commands in Python that will perform the task.
[...]
You can print intermediate results if it makes sense to do so.

Tools:
- document_qa: This is a tool that answers a question about a document (pdf). It takes an input named \`document\` which should be the document containing the information, as well as a \`question\` that is the question about the document. It returns a text that contains the answer to the question.
- image_captioner: This is a tool that generates a description of an image. It takes an input named \`image\` which should be the image to the caption and returns a text that contains the description in English.
[...]

Task: &quot;Answer the question in the variable \`question\` about the image stored in the variable \`image\`. The question is in French.&quot;

I will use the following tools: \`translator\` to translate the question into English and then \`image_qa\` to answer the question on the input image.

Answer:
\`\`\`py
translated_question = translator(question=question, src_lang=&quot;French&quot;, tgt_lang=&quot;English&quot;)
print(f&quot;The translated question is {translated_question}.&quot;)
answer = image_qa(image=image, question=translated_question)
print(f&quot;The answer is {answer}&quot;)
\`\`\`

Task: &quot;Identify the oldest person in the \`document\` and create an image showcasing the result as a banner.&quot;

I will use the following tools: \`document_qa\` to find the oldest person in the document, then \`image_generator\` to generate an image according to the answer.

Answer:
\`\`\`py
answer = document_qa(document, question=&quot;What is the oldest person?&quot;)
print(f&quot;The answer is {answer}.&quot;)
image = image_generator(&quot;A banner showing &quot; + answer)
\`\`\`

[...]

Task: &quot;Draw me a picture of rivers and lakes&quot;

I will use the following`}}),bt=new c({props:{code:"LSUyMCUzQ3Rvb2wubmFtZSUzRSUzQSUyMCUzQ3Rvb2wuZGVzY3JpcHRpb24lM0U=",highlighted:"- &lt;tool.name&gt;: &lt;tool.description&gt;"}}),vt=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMGxvYWRfdG9vbCUwQSUwQWRvY3VtZW50X3FhJTIwJTNEJTIwbG9hZF90b29sKCUyMmRvY3VtZW50LXF1ZXN0aW9uLWFuc3dlcmluZyUyMiklMEFwcmludChmJTIyLSUyMCU3QmRvY3VtZW50X3FhLm5hbWUlN0QlM0ElMjAlN0Jkb2N1bWVudF9xYS5kZXNjcmlwdGlvbiU3RCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> load_tool

document_qa = load_tool(<span class="hljs-string">&quot;document-question-answering&quot;</span>)
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;- <span class="hljs-subst">{document_qa.name}</span>: <span class="hljs-subst">{document_qa.description}</span>&quot;</span>)`}}),gt=new c({props:{code:"LSUyMGRvY3VtZW50X3FhJTNBJTIwVGhpcyUyMGlzJTIwYSUyMHRvb2wlMjB0aGF0JTIwYW5zd2VycyUyMGElMjBxdWVzdGlvbiUyMGFib3V0JTIwYSUyMGRvY3VtZW50JTIwKHBkZikuJTIwSXQlMjB0YWtlcyUyMGFuJTIwaW5wdXQlMjBuYW1lZCUyMCU2MGRvY3VtZW50JTYwJTIwd2hpY2glMjBzaG91bGQlMjBiZSUyMHRoZSUyMGRvY3VtZW50JTIwY29udGFpbmluZyUyMHRoZSUyMGluZm9ybWF0aW9uJTJDJTIwYXMlMjB3ZWxsJTIwYXMlMjBhJTIwJTYwcXVlc3Rpb24lNjAlMjB0aGF0JTIwaXMlMjB0aGUlMjBxdWVzdGlvbiUyMGFib3V0JTIwdGhlJTIwZG9jdW1lbnQuJTIwSXQlMjByZXR1cm5zJTIwYSUyMHRleHQlMjB0aGF0JTIwY29udGFpbnMlMjB0aGUlMjBhbnN3ZXIlMjB0byUyMHRoZSUyMHF1ZXN0aW9uLg==",highlighted:"- document_qa: This is a tool that answers a question about a document (pdf). It takes an input named `document` which should be the document containing the information, as well as a `question` that is the question about the document. It returns a text that contains the answer to the question."}}),F=new g({props:{$$slots:{default:[_p]},$$scope:{ctx:v}}}),It=new c({props:{code:"VGFzayUzQSUyMCUyMklkZW50aWZ5JTIwdGhlJTIwb2xkZXN0JTIwcGVyc29uJTIwaW4lMjB0aGUlMjAlNjBkb2N1bWVudCU2MCUyMGFuZCUyMGNyZWF0ZSUyMGFuJTIwaW1hZ2UlMjBzaG93Y2FzaW5nJTIwdGhlJTIwcmVzdWx0JTIwYXMlMjBhJTIwYmFubmVyLiUyMiUwQSUwQUklMjB3aWxsJTIwdXNlJTIwdGhlJTIwZm9sbG93aW5nJTIwdG9vbHMlM0ElMjAlNjBkb2N1bWVudF9xYSU2MCUyMHRvJTIwZmluZCUyMHRoZSUyMG9sZGVzdCUyMHBlcnNvbiUyMGluJTIwdGhlJTIwZG9jdW1lbnQlMkMlMjB0aGVuJTIwJTYwaW1hZ2VfZ2VuZXJhdG9yJTYwJTIwdG8lMjBnZW5lcmF0ZSUyMGFuJTIwaW1hZ2UlMjBhY2NvcmRpbmclMjB0byUyMHRoZSUyMGFuc3dlci4lMEElMEFBbnN3ZXIlM0ElMEElNjAlNjAlNjBweSUwQWFuc3dlciUyMCUzRCUyMGRvY3VtZW50X3FhKGRvY3VtZW50JTJDJTIwcXVlc3Rpb24lM0QlMjJXaGF0JTIwaXMlMjB0aGUlMjBvbGRlc3QlMjBwZXJzb24lM0YlMjIpJTBBcHJpbnQoZiUyMlRoZSUyMGFuc3dlciUyMGlzJTIwJTdCYW5zd2VyJTdELiUyMiklMEFpbWFnZSUyMCUzRCUyMGltYWdlX2dlbmVyYXRvciglMjJBJTIwYmFubmVyJTIwc2hvd2luZyUyMCUyMiUyMCUyQiUyMGFuc3dlciklMEElNjAlNjAlNjAlMEE=",highlighted:"Task: &quot;Identify the oldest person in the `document` and create an image showcasing the result as a banner.&quot;\n\nI will use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.\n\nAnswer:\n```py\nanswer = document_qa(document, question=&quot;What is the oldest person?&quot;)\nprint(f&quot;The answer is {answer}.&quot;)\nimage = image_generator(&quot;A banner showing &quot; + answer)\n```\n"}}),Ht=new c({props:{code:"VGFzayUzQSUyMCUyMkRyYXclMjBtZSUyMGElMjBwaWN0dXJlJTIwb2YlMjByaXZlcnMlMjBhbmQlMjBsYWtlcyUyMiUwQSUwQUklMjB3aWxsJTIwdXNlJTIwdGhlJTIwZm9sbG93aW5n",highlighted:`Task: &quot;Draw me a picture of rivers and lakes&quot;

I will use the following`}}),Rt=new c({props:{code:"YWdlbnQucnVuKCUyMkRyYXclMjBtZSUyMGElMjBwaWN0dXJlJTIwb2YlMjByaXZlcnMlMjBhbmQlMjBsYWtlcyUyMik=",highlighted:'agent.run(<span class="hljs-string">&quot;Draw me a picture of rivers and lakes&quot;</span>)'}}),Nt=new c({props:{code:"JTVCLi4uJTVEJTBBJTBBJTNEJTNEJTNEJTNEJTNEJTBBJTBBSHVtYW4lM0ElMjBBbnN3ZXIlMjB0aGUlMjBxdWVzdGlvbiUyMGluJTIwdGhlJTIwdmFyaWFibGUlMjAlNjBxdWVzdGlvbiU2MCUyMGFib3V0JTIwdGhlJTIwaW1hZ2UlMjBzdG9yZWQlMjBpbiUyMHRoZSUyMHZhcmlhYmxlJTIwJTYwaW1hZ2UlNjAuJTBBJTBBQXNzaXN0YW50JTNBJTIwSSUyMHdpbGwlMjB1c2UlMjB0aGUlMjB0b29sJTIwJTYwaW1hZ2VfcWElNjAlMjB0byUyMGFuc3dlciUyMHRoZSUyMHF1ZXN0aW9uJTIwb24lMjB0aGUlMjBpbnB1dCUyMGltYWdlLiUwQSUwQSU2MCU2MCU2MHB5JTBBYW5zd2VyJTIwJTNEJTIwaW1hZ2VfcWEodGV4dCUzRHF1ZXN0aW9uJTJDJTIwaW1hZ2UlM0RpbWFnZSklMEFwcmludChmJTIyVGhlJTIwYW5zd2VyJTIwaXMlMjAlN0JhbnN3ZXIlN0QlMjIpJTBBJTYwJTYwJTYwJTBBJTBBSHVtYW4lM0ElMjBJJTIwdHJpZWQlMjB0aGlzJTIwY29kZSUyQyUyMGl0JTIwd29ya2VkJTIwYnV0JTIwZGlkbid0JTIwZ2l2ZSUyMG1lJTIwYSUyMGdvb2QlMjByZXN1bHQuJTIwVGhlJTIwcXVlc3Rpb24lMjBpcyUyMGluJTIwRnJlbmNoJTBBJTBBQXNzaXN0YW50JTNBJTIwSW4lMjB0aGlzJTIwY2FzZSUyQyUyMHRoZSUyMHF1ZXN0aW9uJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhbnNsYXRlZCUyMGZpcnN0LiUyMEklMjB3aWxsJTIwdXNlJTIwdGhlJTIwdG9vbCUyMCU2MHRyYW5zbGF0b3IlNjAlMjB0byUyMGRvJTIwdGhpcy4lMEElMEElNjAlNjAlNjBweSUwQXRyYW5zbGF0ZWRfcXVlc3Rpb24lMjAlM0QlMjB0cmFuc2xhdG9yKHF1ZXN0aW9uJTNEcXVlc3Rpb24lMkMlMjBzcmNfbGFuZyUzRCUyMkZyZW5jaCUyMiUyQyUyMHRndF9sYW5nJTNEJTIyRW5nbGlzaCUyMiklMEFwcmludChmJTIyVGhlJTIwdHJhbnNsYXRlZCUyMHF1ZXN0aW9uJTIwaXMlMjAlN0J0cmFuc2xhdGVkX3F1ZXN0aW9uJTdELiUyMiklMEFhbnN3ZXIlMjAlM0QlMjBpbWFnZV9xYSh0ZXh0JTNEdHJhbnNsYXRlZF9xdWVzdGlvbiUyQyUyMGltYWdlJTNEaW1hZ2UpJTBBcHJpbnQoZiUyMlRoZSUyMGFuc3dlciUyMGlzJTIwJTdCYW5zd2VyJTdEJTIyKSUwQSU2MCU2MCU2MCUwQSUwQSUzRCUzRCUzRCUzRCUzRCUwQSUwQSU1Qi4uLiU1RA==",highlighted:`[...]

=====

Human: Answer the question in the variable \`question\` about the image stored in the variable \`image\`.

Assistant: I will use the tool \`image_qa\` to answer the question on the input image.

\`\`\`py
answer = image_qa(text=question, image=image)
print(f&quot;The answer is {answer}&quot;)
\`\`\`

Human: I tried this code, it worked but didn&#x27;t give me a good result. The question is in French

Assistant: In this case, the question needs to be translated first. I will use the tool \`translator\` to do this.

\`\`\`py
translated_question = translator(question=question, src_lang=&quot;French&quot;, tgt_lang=&quot;English&quot;)
print(f&quot;The translated question is {translated_question}.&quot;)
answer = image_qa(text=translated_question, image=image)
print(f&quot;The answer is {answer}&quot;)
\`\`\`

=====

[...]`}}),Qt=new c({props:{code:"SHVtYW4lM0ElMjAlM0N1c2VyLWlucHV0JTNFJTVDbiU1Q25Bc3Npc3RhbnQlM0E=",highlighted:"Human: &lt;user-input&gt;\\n\\nAssistant:"}}),Ft=new $({}),At=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEhmQWdlbnQlMEElMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQoJTIyaHR0cHMlM0ElMkYlMkZhcGktaW5mZXJlbmNlLmh1Z2dpbmdmYWNlLmNvJTJGbW9kZWxzJTJGYmlnY29kZSUyRnN0YXJjb2RlciUyMiklMEElMEFhZ2VudC5ydW4oJTIyU2hvdyUyMG1lJTIwYSUyMHRyZWUlMjIlMkMlMjByZXR1cm5fY29kZSUzRFRydWUp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> HfAgent

agent = HfAgent(<span class="hljs-string">&quot;https://api-inference.huggingface.co/models/bigcode/starcoder&quot;</span>)

agent.run(<span class="hljs-string">&quot;Show me a tree&quot;</span>, return_code=<span class="hljs-literal">True</span>)`}}),Pt=new c({props:{code:"JTNEJTNERXhwbGFuYXRpb24lMjBmcm9tJTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMHRvb2wlM0ElMjAlNjBpbWFnZV9zZWdtZW50ZXIlNjAlMjB0byUyMGNyZWF0ZSUyMGElMjBzZWdtZW50YXRpb24lMjBtYXNrJTIwZm9yJTIwdGhlJTIwaW1hZ2UuJTBBJTBBJTBBJTNEJTNEQ29kZSUyMGdlbmVyYXRlZCUyMGJ5JTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFtYXNrJTIwJTNEJTIwaW1hZ2Vfc2VnbWVudGVyKGltYWdlJTJDJTIwcHJvbXB0JTNEJTIydHJlZSUyMik=",highlighted:`==Explanation from the agent==
I will use the following tool: \`image_segmenter\` to create a segmentation mask for the image.


==Code generated by the agent==
mask = image_segmenter(image, prompt=&quot;tree&quot;)`}}),Dt=new c({props:{code:"YWdlbnQudG9vbGJveCU1QiUyMmltYWdlX2dlbmVyYXRvciUyMiU1RC5kZXNjcmlwdGlvbg==",highlighted:'agent.toolbox[<span class="hljs-string">&quot;image_generator&quot;</span>].description'}}),Ot=new c({props:{code:"J1RoaXMlMjBpcyUyMGElMjB0b29sJTIwdGhhdCUyMGNyZWF0ZXMlMjBhbiUyMGltYWdlJTIwYWNjb3JkaW5nJTIwdG8lMjBhJTIwcHJvbXB0JTJDJTIwd2hpY2glMjBpcyUyMGElMjB0ZXh0JTIwZGVzY3JpcHRpb24uJTIwSXQlMjB0YWtlcyUyMGFuJTIwaW5wdXQlMjBuYW1lZCUyMCU2MHByb21wdCU2MCUyMHdoaWNoJTIwY29udGFpbnMlMjB0aGUlMjBpbWFnZSUyMGRlc2NyaXB0aW9uJTIwYW5kJTIwb3V0cHV0cyUyMGFuJTIwaW1hZ2Uu",highlighted:"&#x27;This is a tool that creates an image according to a prompt, which is a text description. It takes an input named `prompt` which contains the image description and outputs an image."}}),ee=new c({props:{code:"YWdlbnQucnVuKCUyMkNyZWF0ZSUyMGFuJTIwaW1hZ2UlMjBvZiUyMGElMjB0cmVlJTIyJTJDJTIwcmV0dXJuX2NvZGUlM0RUcnVlKQ==",highlighted:'agent.run(<span class="hljs-string">&quot;Create an image of a tree&quot;</span>, return_code=<span class="hljs-literal">True</span>)'}}),ne=new c({props:{code:"JTNEJTNERXhwbGFuYXRpb24lMjBmcm9tJTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMHRvb2wlMjAlNjBpbWFnZV9nZW5lcmF0b3IlNjAlMjB0byUyMGdlbmVyYXRlJTIwYW4lMjBpbWFnZSUyMG9mJTIwYSUyMHRyZWUuJTBBJTBBJTBBJTNEJTNEQ29kZSUyMGdlbmVyYXRlZCUyMGJ5JTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFpbWFnZSUyMCUzRCUyMGltYWdlX2dlbmVyYXRvcihwcm9tcHQlM0QlMjJ0cmVlJTIyKQ==",highlighted:`==Explanation from the agent==
I will use the following tool \`image_generator\` to generate an image of a tree.


==Code generated by the agent==
image = image_generator(prompt=&quot;tree&quot;)`}}),ae=new $({}),Me=new c({props:{code:"YWdlbnQucnVuKCUyMk1ha2UlMjBhbiUyMGltYWdlJTIwb2YlMjBhJTIwaG91c2UlMjBhbmQlMjBhJTIwY2FyJTIyJTJDJTIwcmV0dXJuX2NvZGUlM0RUcnVlKQ==",highlighted:'agent.run(<span class="hljs-string">&quot;Make an image of a house and a car&quot;</span>, return_code=<span class="hljs-literal">True</span>)'}}),re=new c({props:{code:"JTNEJTNERXhwbGFuYXRpb24lMjBmcm9tJTIwdGhlJTIwYWdlbnQlM0QlM0QlMjAlMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMHRvb2xzJTIwJTYwaW1hZ2VfZ2VuZXJhdG9yJTYwJTIwdG8lMjBnZW5lcmF0ZSUyMGFuJTIwaW1hZ2UlMjBvZiUyMGElMjBob3VzZSUyMGFuZCUyMCU2MGltYWdlX3RyYW5zZm9ybWVyJTYwJTIwdG8lMjB0cmFuc2Zvcm0lMjB0aGUlMjBpbWFnZSUyMG9mJTIwYSUyMGNhciUyMGludG8lMjB0aGUlMjBpbWFnZSUyMG9mJTIwYSUyMGhvdXNlLiUwQSUwQSUzRCUzRENvZGUlMjBnZW5lcmF0ZWQlMjBieSUyMHRoZSUyMGFnZW50JTNEJTNEJTBBaG91c2VfaW1hZ2UlMjAlM0QlMjBpbWFnZV9nZW5lcmF0b3IocHJvbXB0JTNEJTIyQSUyMGhvdXNlJTIyKSUwQWNhcl9pbWFnZSUyMCUzRCUyMGltYWdlX2dlbmVyYXRvcihwcm9tcHQlM0QlMjJBJTIwY2FyJTIyKSUwQWhvdXNlX2Nhcl9pbWFnZSUyMCUzRCUyMGltYWdlX3RyYW5zZm9ybWVyKGltYWdlJTNEY2FyX2ltYWdlJTJDJTIwcHJvbXB0JTNEJTIyQSUyMGhvdXNlJTIyKQ==",highlighted:`==Explanation from the agent== 
I will use the following tools \`image_generator\` to generate an image of a house and \`image_transformer\` to transform the image of a car into the image of a house.

==Code generated by the agent==
house_image = image_generator(prompt=&quot;A house&quot;)
car_image = image_generator(prompt=&quot;A car&quot;)
house_car_image = image_transformer(image=car_image, prompt=&quot;A house&quot;)`}}),de=new c({props:{code:"YWdlbnQudG9vbGJveCU1QiUyMm1vZGlmaWVyJTIyJTVEJTIwJTNEJTIwYWdlbnQudG9vbGJveC5wb3AoJTIyaW1hZ2VfdHJhbnNmb3JtZXIlMjIpJTBBYWdlbnQudG9vbGJveCU1QiUyMm1vZGlmaWVyJTIyJTVELmRlc2NyaXB0aW9uJTIwJTNEJTIwYWdlbnQudG9vbGJveCU1QiUyMm1vZGlmaWVyJTIyJTVELmRlc2NyaXB0aW9uLnJlcGxhY2UoJTBBJTIwJTIwJTIwJTIwJTIydHJhbnNmb3JtcyUyMGFuJTIwaW1hZ2UlMjBhY2NvcmRpbmclMjB0byUyMGElMjBwcm9tcHQlMjIlMkMlMjAlMjJtb2RpZmllcyUyMGFuJTIwaW1hZ2UlMjIlMEEp",highlighted:`agent.toolbox[<span class="hljs-string">&quot;modifier&quot;</span>] = agent.toolbox.pop(<span class="hljs-string">&quot;image_transformer&quot;</span>)
agent.toolbox[<span class="hljs-string">&quot;modifier&quot;</span>].description = agent.toolbox[<span class="hljs-string">&quot;modifier&quot;</span>].description.replace(
    <span class="hljs-string">&quot;transforms an image according to a prompt&quot;</span>, <span class="hljs-string">&quot;modifies an image&quot;</span>
)`}}),he=new c({props:{code:"YWdlbnQucnVuKCUyMk1ha2UlMjBhbiUyMGltYWdlJTIwb2YlMjBhJTIwaG91c2UlMjBhbmQlMjBhJTIwY2FyJTIyJTJDJTIwcmV0dXJuX2NvZGUlM0RUcnVlKQ==",highlighted:'agent.run(<span class="hljs-string">&quot;Make an image of a house and a car&quot;</span>, return_code=<span class="hljs-literal">True</span>)'}}),fe=new c({props:{code:"JTNEJTNERXhwbGFuYXRpb24lMjBmcm9tJTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMHRvb2xzJTNBJTIwJTYwaW1hZ2VfZ2VuZXJhdG9yJTYwJTIwdG8lMjBnZW5lcmF0ZSUyMGFuJTIwaW1hZ2UlMjBvZiUyMGElMjBob3VzZSUyQyUyMHRoZW4lMjAlNjBpbWFnZV9nZW5lcmF0b3IlNjAlMjB0byUyMGdlbmVyYXRlJTIwYW4lMjBpbWFnZSUyMG9mJTIwYSUyMGNhci4lMEElMEElMEElM0QlM0RDb2RlJTIwZ2VuZXJhdGVkJTIwYnklMjB0aGUlMjBhZ2VudCUzRCUzRCUwQWhvdXNlX2ltYWdlJTIwJTNEJTIwaW1hZ2VfZ2VuZXJhdG9yKHByb21wdCUzRCUyMkElMjBob3VzZSUyMiklMEFjYXJfaW1hZ2UlMjAlM0QlMjBpbWFnZV9nZW5lcmF0b3IocHJvbXB0JTNEJTIyQSUyMGNhciUyMik=",highlighted:`==Explanation from the agent==
I will use the following tools: \`image_generator\` to generate an image of a house, then \`image_generator\` to generate an image of a car.


==Code generated by the agent==
house_image = image_generator(prompt=&quot;A house&quot;)
car_image = image_generator(prompt=&quot;A car&quot;)`}}),ce=new c({props:{code:"YWdlbnQucnVuKCUyMkNyZWF0ZSUyMGltYWdlJTNBJTIwJ0ElMjBob3VzZSUyMGFuZCUyMGNhciclMjIlMkMlMjByZXR1cm5fY29kZSUzRFRydWUp",highlighted:'agent.run(<span class="hljs-string">&quot;Create image: &#x27;A house and car&#x27;&quot;</span>, return_code=<span class="hljs-literal">True</span>)'}}),Ue=new c({props:{code:"JTNEJTNERXhwbGFuYXRpb24lMjBmcm9tJTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMHRvb2wlM0ElMjAlNjBpbWFnZV9nZW5lcmF0b3IlNjAlMjB0byUyMGdlbmVyYXRlJTIwYW4lMjBpbWFnZS4lMEElMEElMEElM0QlM0RDb2RlJTIwZ2VuZXJhdGVkJTIwYnklMjB0aGUlMjBhZ2VudCUzRCUzRCUwQWltYWdlJTIwJTNEJTIwaW1hZ2VfZ2VuZXJhdG9yKHByb21wdCUzRCUyMkElMjBob3VzZSUyMGFuZCUyMGNhciUyMik=",highlighted:`==Explanation from the agent==
I will use the following tool: \`image_generator\` to generate an image.


==Code generated by the agent==
image = image_generator(prompt=&quot;A house and car&quot;)`}}),A=new g({props:{warning:!0,$$slots:{default:[Rp]},$$scope:{ctx:v}}}),be=new $({}),ve=new c({props:{code:"dGVtcGxhdGUlMjAlM0QlMjAlMjIlMjIlMjIlMjAlNUIuLi4lNUQlMjAlMjIlMjIlMjIlMEElMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQoeW91cl9lbmRwb2ludCUyQyUyMHJ1bl9wcm9tcHRfdGVtcGxhdGUlM0R0ZW1wbGF0ZSk=",highlighted:`template = <span class="hljs-string">&quot;&quot;&quot; [...] &quot;&quot;&quot;</span>

agent = HfAgent(your_endpoint, run_prompt_template=template)`}}),P=new g({props:{warning:!0,$$slots:{default:[Yp]},$$scope:{ctx:v}}}),ge=new c({props:{code:"SHVtYW4lM0ElMjAlM0MlM0N0YXNrJTNFJTNFJTBBJTBBQXNzaXN0YW50JTNB",highlighted:`Human: &lt;&lt;task&gt;&gt;

Assistant:`}}),Ze=new c({props:{code:"dGVtcGxhdGUlMjAlM0QlMjAlMjIlMjIlMjIlMjAlNUIuLi4lNUQlMjAlMjIlMjIlMjIlMEElMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQodXJsX2VuZHBvaW50JTNEeW91cl9lbmRwb2ludCUyQyUyMGNoYXRfcHJvbXB0X3RlbXBsYXRlJTNEdGVtcGxhdGUp",highlighted:`<span class="hljs-attr">template</span> = <span class="hljs-string">&quot;&quot;&quot; [...] &quot;&quot;&quot;</span>

<span class="hljs-attr">agent</span> = HfAgent(url_endpoint=your_endpoint, chat_prompt_template=template)`}}),K=new g({props:{warning:!0,$$slots:{default:[kp]},$$scope:{ctx:v}}}),We=new $({}),_e=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMGxvYWRfdG9vbCUwQSUwQWNvbnRyb2xuZXRfdHJhbnNmb3JtZXIlMjAlM0QlMjBsb2FkX3Rvb2woJTIyZGlmZnVzZXJzJTJGY29udHJvbG5ldC1jYW5ueS10b29sJTIyKSUwQXVwc2NhbGVyJTIwJTNEJTIwbG9hZF90b29sKCUyMmRpZmZ1c2VycyUyRmxhdGVudC11cHNjYWxlci10b29sJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> load_tool

controlnet_transformer = load_tool(<span class="hljs-string">&quot;diffusers/controlnet-canny-tool&quot;</span>)
upscaler = load_tool(<span class="hljs-string">&quot;diffusers/latent-upscaler-tool&quot;</span>)`}}),Ye=new c({props:{code:"cHJpbnQoZiUyMkRlc2NyaXB0aW9uJTNBJTIwJyU3QmNvbnRyb2xuZXRfdHJhbnNmb3JtZXIuZGVzY3JpcHRpb24lN0QnJTIyKSUwQXByaW50KGYlMjJOYW1lJTNBJTIwJyU3QmNvbnRyb2xuZXRfdHJhbnNmb3JtZXIubmFtZSU3RCclMjIp",highlighted:`<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Description: &#x27;<span class="hljs-subst">{controlnet_transformer.description}</span>&#x27;&quot;</span>)
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Name: &#x27;<span class="hljs-subst">{controlnet_transformer.name}</span>&#x27;&quot;</span>)`}}),Ne=new c({props:{code:"RGVzY3JpcHRpb24lM0ElMjAnVGhpcyUyMGlzJTIwYSUyMHRvb2wlMjB0aGF0JTIwdHJhbnNmb3JtcyUyMGFuJTIwaW1hZ2UlMjB3aXRoJTIwQ29udHJvbE5ldCUyMGFjY29yZGluZyUyMHRvJTIwYSUyMHByb21wdC4lMjAlMEFJdCUyMHRha2VzJTIwdHdvJTIwaW5wdXRzJTNBJTIwJTYwaW1hZ2UlNjAlMkMlMjB3aGljaCUyMHNob3VsZCUyMGJlJTIwdGhlJTIwaW1hZ2UlMjB0byUyMHRyYW5zZm9ybSUyQyUyMGFuZCUyMCU2MHByb21wdCU2MCUyQyUyMHdoaWNoJTIwc2hvdWxkJTIwYmUlMjB0aGUlMjBwcm9tcHQlMjB0byUyMHVzZSUyMHRvJTIwY2hhbmdlJTIwaXQuJTIwSXQlMjByZXR1cm5zJTIwdGhlJTIwbW9kaWZpZWQlMjBpbWFnZS4nJTBBTmFtZSUzQSUyMCdpbWFnZV90cmFuc2Zvcm1lcic=",highlighted:"Description: &#x27;This is a tool that transforms an image with ControlNet according to a prompt. \nIt takes two inputs: `image`, which should be the image to transform, and `prompt`, which should be the prompt to use to change it. It returns the modified image.&#x27;\nName: &#x27;image_transformer&#x27;"}}),Xe=new c({props:{code:"dG9vbHMlMjAlM0QlMjAlNUJjb250cm9sbmV0X3RyYW5zZm9ybWVyJTJDJTIwdXBzY2FsZXIlNUQlMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQoJTIyaHR0cHMlM0ElMkYlMkZhcGktaW5mZXJlbmNlLmh1Z2dpbmdmYWNlLmNvJTJGbW9kZWxzJTJGYmlnY29kZSUyRnN0YXJjb2RlciUyMiUyQyUyMGFkZGl0aW9uYWxfdG9vbHMlM0R0b29scyk=",highlighted:`tools = [controlnet_transformer, upscaler]
agent = HfAgent(<span class="hljs-string">&quot;https://api-inference.huggingface.co/models/bigcode/starcoder&quot;</span>, additional_tools=tools)`}}),Ve=new c({props:{code:"aW1hZ2VfdHJhbnNmb3JtZXIlMjBoYXMlMjBiZWVuJTIwcmVwbGFjZWQlMjBieSUyMCUzQ3RyYW5zZm9ybWVyc19tb2R1bGVzLmRpZmZ1c2Vycy5jb250cm9sbmV0LWNhbm55LXRvb2wuYmQ3NjE4MmM3Nzc3ZWJhOTYxMmZjMDNjMCUwQTg3MThhNjBjMGFhNjMxMi5pbWFnZV90cmFuc2Zvcm1hdGlvbi5Db250cm9sTmV0VHJhbnNmb3JtYXRpb25Ub29sJTIwb2JqZWN0JTIwYXQlMjAweDdmMWQzYmZhM2EwMCUzRSUyMGFzJTIwcHJvdmlkZWQlMjBpbiUyMCU2MGFkZGl0aW9uYWxfdG9vbHMlNjA=",highlighted:"image_transformer has been replaced by &lt;transformers_modules.diffusers.controlnet-canny-tool.bd76182c7777eba9612fc03c0\n8718a60c0aa6312.image_transformation.ControlNetTransformationTool object at 0x7f1d3bfa3a00&gt; as provided in `additional_tools`"}}),O=new g({props:{$$slots:{default:[Np]},$$scope:{ctx:v}}}),ze=new c({props:{code:"cHJpbnQoJTIyJTVDbiUyMi5qb2luKCU1QmYlMjItJTIwJTdCYSU3RCUyMiUyMGZvciUyMGElMjBpbiUyMGFnZW50LnRvb2xib3gua2V5cygpJTVEKSk=",highlighted:'<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;\\n&quot;</span>.join([<span class="hljs-string">f&quot;- <span class="hljs-subst">{a}</span>&quot;</span> <span class="hljs-keyword">for</span> a <span class="hljs-keyword">in</span> agent.toolbox.keys()]))'}}),qe=new c({props:{code:"LSUyMGRvY3VtZW50X3FhJTBBLSUyMGltYWdlX2NhcHRpb25lciUwQS0lMjBpbWFnZV9xYSUwQS0lMjBpbWFnZV9zZWdtZW50ZXIlMEEtJTIwdHJhbnNjcmliZXIlMEEtJTIwc3VtbWFyaXplciUwQS0lMjB0ZXh0X2NsYXNzaWZpZXIlMEEtJTIwdGV4dF9xYSUwQS0lMjB0ZXh0X3JlYWRlciUwQS0lMjB0cmFuc2xhdG9yJTBBLSUyMGltYWdlX3RyYW5zZm9ybWVyJTBBLSUyMHRleHRfZG93bmxvYWRlciUwQS0lMjBpbWFnZV9nZW5lcmF0b3IlMEEtJTIwdmlkZW9fZ2VuZXJhdG9yJTBBLSUyMGltYWdlX3Vwc2NhbGVy",highlighted:`- document_qa
- image_captioner
- image_qa
- image_segmenter
- transcriber
- summarizer
- text_classifier
- text_qa
- text_reader
- translator
- image_transformer
- text_downloader
- image_generator
- video_generator
- image_upscaler`}}),Pe=new c({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEElMEFpbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGdHJhbnNmb3JtZXJzJTJGcml2ZXJzX2FuZF9sYWtlcy5wbmclMjIlMEEp",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

image = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rivers_and_lakes.png&quot;</span>
)`}}),Oe=new c({props:{code:"aW1hZ2UlMjAlM0QlMjBhZ2VudC5ydW4oJTIyVHJhbnNmb3JtJTIwdGhlJTIwaW1hZ2UlM0ElMjAnQSUyMGZyb3plbiUyMGxha2UlMjBhbmQlMjBzbm93eSUyMGZvcmVzdCclMjIlMkMlMjBpbWFnZSUzRGltYWdlKQ==",highlighted:'image = agent.run(<span class="hljs-string">&quot;Transform the image: &#x27;A frozen lake and snowy forest&#x27;&quot;</span>, image=image)'}}),tl=new c({props:{code:"JTNEJTNERXhwbGFuYXRpb24lMjBmcm9tJTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMHRvb2wlM0ElMjAlNjBpbWFnZV90cmFuc2Zvcm1lciU2MCUyMHRvJTIwdHJhbnNmb3JtJTIwdGhlJTIwaW1hZ2UuJTBBJTBBJTBBJTNEJTNEQ29kZSUyMGdlbmVyYXRlZCUyMGJ5JTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFpbWFnZSUyMCUzRCUyMGltYWdlX3RyYW5zZm9ybWVyKGltYWdlJTJDJTIwcHJvbXB0JTNEJTIyQSUyMGZyb3plbiUyMGxha2UlMjBhbmQlMjBzbm93eSUyMGZvcmVzdCUyMik=",highlighted:`==Explanation from the agent==
I will use the following tool: \`image_transformer\` to transform the image.


==Code generated by the agent==
image = image_transformer(image, prompt=&quot;A frozen lake and snowy forest&quot;)`}}),nl=new c({props:{code:"aW1hZ2UlMjAlM0QlMjBhZ2VudC5ydW4oJTIyVXBzY2FsZSUyMHRoZSUyMGltYWdlJTIyJTJDJTIwaW1hZ2Up",highlighted:'image = agent.run(<span class="hljs-string">&quot;Upscale the image&quot;</span>, image)'}}),sl=new c({props:{code:"JTNEJTNERXhwbGFuYXRpb24lMjBmcm9tJTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMHRvb2wlM0ElMjAlNjBpbWFnZV91cHNjYWxlciU2MCUyMHRvJTIwdXBzY2FsZSUyMHRoZSUyMGltYWdlLiUwQSUwQSUwQSUzRCUzRENvZGUlMjBnZW5lcmF0ZWQlMjBieSUyMHRoZSUyMGFnZW50JTNEJTNEJTBBdXBzY2FsZWRfaW1hZ2UlMjAlM0QlMjBpbWFnZV91cHNjYWxlcihpbWFnZSk=",highlighted:`==Explanation from the agent==
I will use the following tool: \`image_upscaler\` to upscale the image.


==Code generated by the agent==
upscaled_image = image_upscaler(image)`}}),Ml=new $({}),rl=new $({}),dl=new c({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGxpc3RfbW9kZWxzJTBBJTBBdGFzayUyMCUzRCUyMCUyMnRleHQtY2xhc3NpZmljYXRpb24lMjIlMEElMEFtb2RlbCUyMCUzRCUyMG5leHQoaXRlcihsaXN0X21vZGVscyhmaWx0ZXIlM0R0YXNrJTJDJTIwc29ydCUzRCUyMmRvd25sb2FkcyUyMiUyQyUyMGRpcmVjdGlvbiUzRC0xKSkpJTBBcHJpbnQobW9kZWwuaWQp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> list_models

task = <span class="hljs-string">&quot;text-classification&quot;</span>

model = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(list_models(<span class="hljs-built_in">filter</span>=task, sort=<span class="hljs-string">&quot;downloads&quot;</span>, direction=-<span class="hljs-number">1</span>)))
<span class="hljs-built_in">print</span>(model.<span class="hljs-built_in">id</span>)`}}),wl=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRvb2wlMEElMEElMEFjbGFzcyUyMEhGTW9kZWxEb3dubG9hZHNUb29sKFRvb2wpJTNBJTBBJTIwJTIwJTIwJTIwcGFzcw==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Tool


<span class="hljs-keyword">class</span> <span class="hljs-title class_">HFModelDownloadsTool</span>(<span class="hljs-title class_ inherited__">Tool</span>):
    <span class="hljs-keyword">pass</span>`}}),Ul=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRvb2wlMEFmcm9tJTIwaHVnZ2luZ2ZhY2VfaHViJTIwaW1wb3J0JTIwbGlzdF9tb2RlbHMlMEElMEElMEFjbGFzcyUyMEhGTW9kZWxEb3dubG9hZHNUb29sKFRvb2wpJTNBJTBBJTIwJTIwJTIwJTIwbmFtZSUyMCUzRCUyMCUyMm1vZGVsX2Rvd25sb2FkX2NvdW50ZXIlMjIlMEElMjAlMjAlMjAlMjBkZXNjcmlwdGlvbiUyMCUzRCUyMCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJUaGlzJTIwaXMlMjBhJTIwdG9vbCUyMHRoYXQlMjByZXR1cm5zJTIwdGhlJTIwbW9zdCUyMGRvd25sb2FkZWQlMjBtb2RlbCUyMG9mJTIwYSUyMGdpdmVuJTIwdGFzayUyMG9uJTIwdGhlJTIwSHVnZ2luZyUyMEZhY2UlMjBIdWIuJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIySXQlMjB0YWtlcyUyMHRoZSUyMG5hbWUlMjBvZiUyMHRoZSUyMGNhdGVnb3J5JTIwKHN1Y2glMjBhcyUyMHRleHQtY2xhc3NpZmljYXRpb24lMkMlMjBkZXB0aC1lc3RpbWF0aW9uJTJDJTIwZXRjKSUyQyUyMGFuZCUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnJldHVybnMlMjB0aGUlMjBuYW1lJTIwb2YlMjB0aGUlMjBjaGVja3BvaW50LiUyMiUwQSUyMCUyMCUyMCUyMCklMEElMEElMjAlMjAlMjAlMjBpbnB1dHMlMjAlM0QlMjAlNUIlMjJ0ZXh0JTIyJTVEJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMCU1QiUyMnRleHQlMjIlNUQlMEElMEElMjAlMjAlMjAlMjBkZWYlMjBfX2NhbGxfXyhzZWxmJTJDJTIwdGFzayUzQSUyMHN0ciklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtb2RlbCUyMCUzRCUyMG5leHQoaXRlcihsaXN0X21vZGVscyhmaWx0ZXIlM0R0YXNrJTJDJTIwc29ydCUzRCUyMmRvd25sb2FkcyUyMiUyQyUyMGRpcmVjdGlvbiUzRC0xKSkpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwbW9kZWwuaWQ=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Tool
<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> list_models


<span class="hljs-keyword">class</span> <span class="hljs-title class_">HFModelDownloadsTool</span>(<span class="hljs-title class_ inherited__">Tool</span>):
    name = <span class="hljs-string">&quot;model_download_counter&quot;</span>
    description = (
        <span class="hljs-string">&quot;This is a tool that returns the most downloaded model of a given task on the Hugging Face Hub. &quot;</span>
        <span class="hljs-string">&quot;It takes the name of the category (such as text-classification, depth-estimation, etc), and &quot;</span>
        <span class="hljs-string">&quot;returns the name of the checkpoint.&quot;</span>
    )

    inputs = [<span class="hljs-string">&quot;text&quot;</span>]
    outputs = [<span class="hljs-string">&quot;text&quot;</span>]

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__call__</span>(<span class="hljs-params">self, task: <span class="hljs-built_in">str</span></span>):
        model = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(list_models(<span class="hljs-built_in">filter</span>=task, sort=<span class="hljs-string">&quot;downloads&quot;</span>, direction=-<span class="hljs-number">1</span>)))
        <span class="hljs-keyword">return</span> model.<span class="hljs-built_in">id</span>`}}),Tl=new c({props:{code:"ZnJvbSUyMG1vZGVsX2Rvd25sb2FkcyUyMGltcG9ydCUyMEhGTW9kZWxEb3dubG9hZHNUb29sJTBBJTBBdG9vbCUyMCUzRCUyMEhGTW9kZWxEb3dubG9hZHNUb29sKCk=",highlighted:`<span class="hljs-keyword">from</span> model_downloads <span class="hljs-keyword">import</span> HFModelDownloadsTool

tool = HFModelDownloadsTool()`}}),$l=new c({props:{code:"dG9vbC5wdXNoX3RvX2h1YiglMjJoZi1tb2RlbC1kb3dubG9hZHMlMjIp",highlighted:'tool.push_to_hub(<span class="hljs-string">&quot;hf-model-downloads&quot;</span>)'}}),jl=new $({}),Gl=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMGxvYWRfdG9vbCUwQSUwQXRvb2wlMjAlM0QlMjBsb2FkX3Rvb2woJTIybHlzYW5kcmUlMkZoZi1tb2RlbC1kb3dubG9hZHMlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> load_tool

tool = load_tool(<span class="hljs-string">&quot;lysandre/hf-model-downloads&quot;</span>)`}}),Il=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEhmQWdlbnQlMEElMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQoJTIyaHR0cHMlM0ElMkYlMkZhcGktaW5mZXJlbmNlLmh1Z2dpbmdmYWNlLmNvJTJGbW9kZWxzJTJGYmlnY29kZSUyRnN0YXJjb2RlciUyMiUyQyUyMGFkZGl0aW9uYWxfdG9vbHMlM0QlNUJ0b29sJTVEKSUwQSUwQWFnZW50LnJ1biglMEElMjAlMjAlMjAlMjAlMjJDYW4lMjB5b3UlMjByZWFkJTIwb3V0JTIwbG91ZCUyMHRoZSUyMG5hbWUlMjBvZiUyMHRoZSUyMG1vZGVsJTIwdGhhdCUyMGhhcyUyMHRoZSUyMG1vc3QlMjBkb3dubG9hZHMlMjBpbiUyMHRoZSUyMCd0ZXh0LXRvLXZpZGVvJyUyMHRhc2slMjBvbiUyMHRoZSUyMEh1Z2dpbmclMjBGYWNlJTIwSHViJTNGJTIyJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> HfAgent

agent = HfAgent(<span class="hljs-string">&quot;https://api-inference.huggingface.co/models/bigcode/starcoder&quot;</span>, additional_tools=[tool])

agent.run(
    <span class="hljs-string">&quot;Can you read out loud the name of the model that has the most downloads in the &#x27;text-to-video&#x27; task on the Hugging Face Hub?&quot;</span>
)`}}),Bl=new c({props:{code:"JTNEJTNEQ29kZSUyMGdlbmVyYXRlZCUyMGJ5JTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFtb2RlbCUyMCUzRCUyMG1vZGVsX2Rvd25sb2FkX2NvdW50ZXIodGFzayUzRCUyMnRleHQtdG8tdmlkZW8lMjIpJTBBcHJpbnQoZiUyMlRoZSUyMG1vZGVsJTIwd2l0aCUyMHRoZSUyMG1vc3QlMjBkb3dubG9hZHMlMjBpcyUyMCU3Qm1vZGVsJTdELiUyMiklMEFhdWRpb19tb2RlbCUyMCUzRCUyMHRleHRfcmVhZGVyKG1vZGVsKSUwQSUwQSUwQSUzRCUzRFJlc3VsdCUzRCUzRCUwQVRoZSUyMG1vZGVsJTIwd2l0aCUyMHRoZSUyMG1vc3QlMjBkb3dubG9hZHMlMjBpcyUyMGRhbW8tdmlsYWIlMkZ0ZXh0LXRvLXZpZGVvLW1zLTEuN2Iu",highlighted:`==Code generated by the agent==
model = model_download_counter(task=&quot;text-to-video&quot;)
print(f&quot;The model with the most downloads is {model}.&quot;)
audio_model = text_reader(model)


==Result==
The model with the most downloads is damo-vilab/text-to-video-ms-1.7b.`}}),nt=new g({props:{$$slots:{default:[Ep]},$$scope:{ctx:v}}}),_l=new $({}),Yl=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEhmQWdlbnQlMkMlMjBsb2FkX3Rvb2wlMEElMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQoJTIyaHR0cHMlM0ElMkYlMkZhcGktaW5mZXJlbmNlLmh1Z2dpbmdmYWNlLmNvJTJGbW9kZWxzJTJGYmlnY29kZSUyRnN0YXJjb2RlciUyMiklMEFhZ2VudC50b29sYm94JTVCJTIyaW1hZ2UtdHJhbnNmb3JtYXRpb24lMjIlNUQlMjAlM0QlMjBsb2FkX3Rvb2woJTIyZGlmZnVzZXJzJTJGY29udHJvbG5ldC1jYW5ueS10b29sJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> HfAgent, load_tool

agent = HfAgent(<span class="hljs-string">&quot;https://api-inference.huggingface.co/models/bigcode/starcoder&quot;</span>)
agent.toolbox[<span class="hljs-string">&quot;image-transformation&quot;</span>] = load_tool(<span class="hljs-string">&quot;diffusers/controlnet-canny-tool&quot;</span>)`}}),at=new g({props:{$$slots:{default:[Xp]},$$scope:{ctx:v}}}),kl=new $({}),Ql=new c({props:{code:"ZnJvbSUyMGdyYWRpb190b29scyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblByb21wdEdlbmVyYXRvclRvb2wlMEElMEFncmFkaW9fdG9vbCUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblByb21wdEdlbmVyYXRvclRvb2woKQ==",highlighted:`<span class="hljs-keyword">from</span> gradio_tools <span class="hljs-keyword">import</span> StableDiffusionPromptGeneratorTool

gradio_tool = StableDiffusionPromptGeneratorTool()`}}),Sl=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRvb2wlMEElMEF0b29sJTIwJTNEJTIwVG9vbC5mcm9tX2dyYWRpbyhncmFkaW9fdG9vbCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Tool

tool = Tool.from_gradio(gradio_tool)`}}),zl=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEhmQWdlbnQlMEElMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQoJTIyaHR0cHMlM0ElMkYlMkZhcGktaW5mZXJlbmNlLmh1Z2dpbmdmYWNlLmNvJTJGbW9kZWxzJTJGYmlnY29kZSUyRnN0YXJjb2RlciUyMiUyQyUyMGFkZGl0aW9uYWxfdG9vbHMlM0QlNUJ0b29sJTVEKSUwQSUwQWFnZW50LnJ1biglMjJHZW5lcmF0ZSUyMGFuJTIwaW1hZ2UlMjBvZiUyMHRoZSUyMCU2MHByb21wdCU2MCUyMGFmdGVyJTIwaW1wcm92aW5nJTIwaXQuJTIyJTJDJTIwcHJvbXB0JTNEJTIyQSUyMHJhYmJpdCUyMHdlYXJpbmclMjBhJTIwc3BhY2UlMjBzdWl0JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> HfAgent

agent = HfAgent(<span class="hljs-string">&quot;https://api-inference.huggingface.co/models/bigcode/starcoder&quot;</span>, additional_tools=[tool])

agent.run(<span class="hljs-string">&quot;Generate an image of the \`prompt\` after improving it.&quot;</span>, prompt=<span class="hljs-string">&quot;A rabbit wearing a space suit&quot;</span>)`}}),Al=new c({props:{code:"JTNEJTNERXhwbGFuYXRpb24lMjBmcm9tJTIwdGhlJTIwYWdlbnQlM0QlM0QlMEFJJTIwd2lsbCUyMHVzZSUyMHRoZSUyMGZvbGxvd2luZyUyMCUyMHRvb2xzJTNBJTIwJTYwU3RhYmxlRGlmZnVzaW9uUHJvbXB0R2VuZXJhdG9yJTYwJTIwdG8lMjBpbXByb3ZlJTIwdGhlJTIwcHJvbXB0JTJDJTIwdGhlbiUyMCU2MGltYWdlX2dlbmVyYXRvciU2MCUyMHRvJTIwZ2VuZXJhdGUlMjBhbiUyMGltYWdlJTIwYWNjb3JkaW5nJTIwdG8lMjB0aGUlMjBpbXByb3ZlZCUyMHByb21wdC4lMEElMEElMEElM0QlM0RDb2RlJTIwZ2VuZXJhdGVkJTIwYnklMjB0aGUlMjBhZ2VudCUzRCUzRCUwQWltcHJvdmVkX3Byb21wdCUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblByb21wdEdlbmVyYXRvcihwcm9tcHQpJTBBcHJpbnQoZiUyMlRoZSUyMGltcHJvdmVkJTIwcHJvbXB0JTIwaXMlMjAlN0JpbXByb3ZlZF9wcm9tcHQlN0QuJTIyKSUwQWltYWdlJTIwJTNEJTIwaW1hZ2VfZ2VuZXJhdG9yKGltcHJvdmVkX3Byb21wdCk=",highlighted:`==Explanation from the agent==
I will use the following  tools: \`StableDiffusionPromptGenerator\` to improve the prompt, then \`image_generator\` to generate an image according to the improved prompt.


==Code generated by the agent==
improved_prompt = StableDiffusionPromptGenerator(prompt)
print(f&quot;The improved prompt is {improved_prompt}.&quot;)
image = image_generator(improved_prompt)`}}),it=new g({props:{warning:!0,$$slots:{default:[Qp]},$$scope:{ctx:v}}}),Pl=new $({}),{c(){p=o("meta"),b=s(),w=o("p"),T=s(),Z=o("h1"),E=o("a"),cn=o("span"),r(pt.$$.fragment),Oo=s(),sn=o("span"),sn.textContent=ui,Nn=s(),r(X.$$.fragment),En=s(),r(Q.$$.fragment),Xn=s(),rt=o("p"),rt.textContent=di,Qn=s(),mt=o("ul"),mt.innerHTML=yi,Vn=s(),G=o("h2"),V=o("a"),Un=o("span"),r(ut.$$.fragment),ti=s(),an=o("span"),an.textContent=hi,Sn=s(),dt=o("p"),dt.innerHTML=wi,Fn=s(),C=o("h3"),S=o("a"),bn=o("span"),r(yt.$$.fragment),ei=s(),on=o("span"),on.textContent=fi,zn=s(),ht=o("p"),ht.textContent=Ji,qn=s(),wt=o("ul"),wt.innerHTML=ci,An=s(),ft=o("p"),ft.innerHTML=Ui,Ln=s(),r(Jt.$$.fragment),Pn=s(),ct=o("p"),ct.innerHTML=bi,Kn=s(),Ut=o("p"),Ut.innerHTML=Ti,Dn=s(),r(bt.$$.fragment),On=s(),Tt=o("p"),Tt.textContent=vi,ts=s(),r(vt.$$.fragment),es=s(),$t=o("p"),$t.textContent=$i,ls=s(),r(gt.$$.fragment),ns=s(),jt=o("p"),jt.textContent=gi,ss=s(),Zt=o("p"),Zt.textContent=ji,as=s(),r(F.$$.fragment),os=s(),Gt=o("p"),Gt.textContent=Zi,is=s(),Ct=o("p"),Ct.textContent=Gi,Ms=s(),r(It.$$.fragment),ps=s(),Wt=o("p"),Wt.textContent=Ci,rs=s(),Bt=o("p"),Bt.innerHTML=Ii,ms=s(),xt=o("p"),xt.textContent=Wi,us=s(),r(Ht.$$.fragment),ds=s(),_t=o("p"),_t.textContent=Bi,ys=s(),r(Rt.$$.fragment),hs=s(),Yt=o("p"),Yt.innerHTML=xi,ws=s(),kt=o("p"),kt.innerHTML=Hi,fs=s(),r(Nt.$$.fragment),Js=s(),Et=o("p"),Et.innerHTML=_i,cs=s(),Xt=o("p"),Xt.innerHTML=Ri,Us=s(),r(Qt.$$.fragment),bs=s(),Vt=o("p"),Vt.innerHTML=Yi,Ts=s(),St=o("p"),St.textContent=ki,vs=s(),I=o("h3"),z=o("a"),Tn=o("span"),r(Ft.$$.fragment),li=s(),Mn=o("span"),Mn.textContent=Ni,$s=s(),zt=o("p"),zt.textContent=Ei,gs=s(),qt=o("p"),qt.textContent=Xi,js=s(),r(At.$$.fragment),Zs=s(),Lt=o("p"),Lt.textContent=Qi,Gs=s(),r(Pt.$$.fragment),Cs=s(),Kt=o("p"),Kt.textContent=Vi,Is=s(),r(Dt.$$.fragment),Ws=s(),r(Ot.$$.fragment),Bs=s(),te=o("p"),te.textContent=Si,xs=s(),r(ee.$$.fragment),Hs=s(),le=o("p"),le.textContent=Fi,_s=s(),r(ne.$$.fragment),Rs=s(),se=o("p"),se.textContent=zi,Ys=s(),W=o("h3"),q=o("a"),vn=o("span"),r(ae.$$.fragment),ni=s(),pn=o("span"),pn.textContent=qi,ks=s(),oe=o("p"),oe.innerHTML=Ai,Ns=s(),ie=o("p"),ie.innerHTML=Li,Es=s(),r(Me.$$.fragment),Xs=s(),pe=o("p"),pe.textContent=Pi,Qs=s(),r(re.$$.fragment),Vs=s(),me=o("p"),me.innerHTML=Ki,Ss=s(),ue=o("p"),ue.innerHTML=Di,Fs=s(),r(de.$$.fragment),zs=s(),ye=o("p"),ye.textContent=Oi,qs=s(),r(he.$$.fragment),As=s(),we=o("p"),we.textContent=tM,Ls=s(),r(fe.$$.fragment),Ps=s(),Je=o("p"),Je.textContent=eM,Ks=s(),r(ce.$$.fragment),Ds=s(),r(Ue.$$.fragment),Os=s(),r(A.$$.fragment),ta=s(),B=o("h3"),L=o("a"),$n=o("span"),r(be.$$.fragment),si=s(),rn=o("span"),rn.textContent=lM,ea=s(),Te=o("p"),Te.innerHTML=nM,la=s(),r(ve.$$.fragment),na=s(),r(P.$$.fragment),sa=s(),$e=o("p"),$e.innerHTML=sM,aa=s(),r(ge.$$.fragment),oa=s(),je=o("p"),je.innerHTML=aM,ia=s(),r(Ze.$$.fragment),Ma=s(),r(K.$$.fragment),pa=s(),Ge=o("p"),Ge.innerHTML=oM,ra=s(),Ce=o("p"),Ce.textContent=iM,ma=s(),Ie=o("ul"),Ie.innerHTML=MM,ua=s(),x=o("h2"),D=o("a"),gn=o("span"),r(We.$$.fragment),ai=s(),mn=o("span"),mn.textContent=pM,da=s(),Be=o("p"),Be.textContent=rM,ya=s(),xe=o("ul"),xe.innerHTML=mM,ha=s(),He=o("p"),He.innerHTML=uM,wa=s(),r(_e.$$.fragment),fa=s(),Re=o("p"),Re.innerHTML=dM,Ja=s(),r(Ye.$$.fragment),ca=s(),ke=o("p"),ke.textContent=yM,Ua=s(),r(Ne.$$.fragment),ba=s(),Ee=o("p"),Ee.innerHTML=hM,Ta=s(),r(Xe.$$.fragment),va=s(),Qe=o("p"),Qe.textContent=wM,$a=s(),r(Ve.$$.fragment),ga=s(),Se=o("p"),Se.textContent=fM,ja=s(),r(O.$$.fragment),Za=s(),Fe=o("p"),Fe.innerHTML=JM,Ga=s(),r(ze.$$.fragment),Ca=s(),r(qe.$$.fragment),Ia=s(),Ae=o("p"),Ae.innerHTML=cM,Wa=s(),Le=o("p"),Le.innerHTML=UM,Ba=s(),r(Pe.$$.fragment),xa=s(),Ke=o("img"),Ha=s(),De=o("p"),De.textContent=TM,_a=s(),r(Oe.$$.fragment),Ra=s(),r(tl.$$.fragment),Ya=s(),el=o("img"),ka=s(),ll=o("p"),ll.textContent=$M,Na=s(),r(nl.$$.fragment),Ea=s(),r(sl.$$.fragment),Xa=s(),al=o("img"),Qa=s(),ol=o("p"),ol.textContent=jM,Va=s(),il=o("p"),il.textContent=ZM,Sa=s(),H=o("h3"),tt=o("a"),jn=o("span"),r(Ml.$$.fragment),oi=s(),un=o("span"),un.textContent=GM,Fa=s(),pl=o("p"),pl.textContent=CM,za=s(),_=o("h4"),et=o("a"),Zn=o("span"),r(rl.$$.fragment),ii=s(),dn=o("span"),dn.textContent=IM,qa=s(),ml=o("p"),ml.textContent=WM,Aa=s(),ul=o("p"),ul.textContent=BM,La=s(),r(dl.$$.fragment),Pa=s(),yl=o("p"),yl.innerHTML=xM,Ka=s(),hl=o("p"),hl.innerHTML=HM,Da=s(),r(wl.$$.fragment),Oa=s(),fl=o("p"),fl.textContent=_M,to=s(),Jl=o("ul"),Jl.innerHTML=RM,eo=s(),cl=o("p"),cl.textContent=YM,lo=s(),r(Ul.$$.fragment),no=s(),bl=o("p"),bl.innerHTML=kM,so=s(),r(Tl.$$.fragment),ao=s(),vl=o("p"),vl.innerHTML=NM,oo=s(),r($l.$$.fragment),io=s(),gl=o("p"),gl.textContent=EM,Mo=s(),R=o("h4"),lt=o("a"),Gn=o("span"),r(jl.$$.fragment),Mi=s(),yn=o("span"),yn.textContent=XM,po=s(),Zl=o("p"),Zl.textContent=QM,ro=s(),r(Gl.$$.fragment),mo=s(),Cl=o("p"),Cl.innerHTML=VM,uo=s(),r(Il.$$.fragment),yo=s(),Wl=o("p"),Wl.textContent=SM,ho=s(),r(Bl.$$.fragment),wo=s(),xl=o("p"),xl.textContent=FM,fo=s(),Hl=o("table"),Hl.innerHTML=zM,Jo=s(),r(nt.$$.fragment),co=s(),Y=o("h3"),st=o("a"),Cn=o("span"),r(_l.$$.fragment),pi=s(),hn=o("span"),hn.textContent=qM,Uo=s(),Rl=o("p"),Rl.textContent=AM,bo=s(),r(Yl.$$.fragment),To=s(),r(at.$$.fragment),vo=s(),k=o("h2"),ot=o("a"),In=o("span"),r(kl.$$.fragment),ri=s(),wn=o("span"),wn.textContent=LM,$o=s(),Nl=o("p"),Nl.innerHTML=PM,go=s(),El=o("p"),El.innerHTML=KM,jo=s(),Xl=o("p"),Xl.innerHTML=DM,Zo=s(),r(Ql.$$.fragment),Go=s(),Vl=o("p"),Vl.innerHTML=OM,Co=s(),r(Sl.$$.fragment),Io=s(),Fl=o("p"),Fl.textContent=tp,Wo=s(),r(zl.$$.fragment),Bo=s(),ql=o("p"),ql.textContent=ep,xo=s(),r(Al.$$.fragment),Ho=s(),Ll=o("p"),Ll.textContent=lp,_o=s(),fn=o("img"),Ro=s(),r(it.$$.fragment),Yo=s(),N=o("h2"),Mt=o("a"),Wn=o("span"),r(Pl.$$.fragment),mi=s(),Jn=o("span"),Jn.textContent=sp,ko=s(),Kl=o("p"),Kl.innerHTML=ap,No=s(),Dl=o("p"),Dl.textContent=op,Eo=s(),Ol=o("p"),Ol.innerHTML=ip,Xo=s(),Bn=o("p"),this.h()},l(t){const e=Bp("svelte-1phssyn",document.head);p=i(e,"META",{name:!0,content:!0}),e.forEach(l),b=a(t),w=i(t,"P",{}),U(w).forEach(l),T=a(t),Z=i(t,"H1",{class:!0});var tn=U(Z);E=i(tn,"A",{id:!0,class:!0,href:!0});var xn=U(E);cn=i(xn,"SPAN",{});var Hn=U(cn);m(pt.$$.fragment,Hn),Hn.forEach(l),xn.forEach(l),Oo=a(tn),sn=i(tn,"SPAN",{"data-svelte-h":!0}),M(sn)!=="svelte-pnf9jl"&&(sn.textContent=ui),tn.forEach(l),Nn=a(t),m(X.$$.fragment,t),En=a(t),m(Q.$$.fragment,t),Xn=a(t),rt=i(t,"P",{"data-svelte-h":!0}),M(rt)!=="svelte-1wc8fnx"&&(rt.textContent=di),Qn=a(t),mt=i(t,"UL",{"data-svelte-h":!0}),M(mt)!=="svelte-1bywcia"&&(mt.innerHTML=yi),Vn=a(t),G=i(t,"H2",{class:!0});var en=U(G);V=i(en,"A",{id:!0,class:!0,href:!0});var _n=U(V);Un=i(_n,"SPAN",{});var Rn=U(Un);m(ut.$$.fragment,Rn),Rn.forEach(l),_n.forEach(l),ti=a(en),an=i(en,"SPAN",{"data-svelte-h":!0}),M(an)!=="svelte-8jzmkb"&&(an.textContent=hi),en.forEach(l),Sn=a(t),dt=i(t,"P",{"data-svelte-h":!0}),M(dt)!=="svelte-mgklnd"&&(dt.innerHTML=wi),Fn=a(t),C=i(t,"H3",{class:!0});var ln=U(C);S=i(ln,"A",{id:!0,class:!0,href:!0});var Yn=U(S);bn=i(Yn,"SPAN",{});var kn=U(bn);m(yt.$$.fragment,kn),kn.forEach(l),Yn.forEach(l),ei=a(ln),on=i(ln,"SPAN",{"data-svelte-h":!0}),M(on)!=="svelte-16t7dyx"&&(on.textContent=fi),ln.forEach(l),zn=a(t),ht=i(t,"P",{"data-svelte-h":!0}),M(ht)!=="svelte-13mu5cg"&&(ht.textContent=Ji),qn=a(t),wt=i(t,"UL",{"data-svelte-h":!0}),M(wt)!=="svelte-1ifa0gw"&&(wt.innerHTML=ci),An=a(t),ft=i(t,"P",{"data-svelte-h":!0}),M(ft)!=="svelte-17r3h2g"&&(ft.innerHTML=Ui),Ln=a(t),m(Jt.$$.fragment,t),Pn=a(t),ct=i(t,"P",{"data-svelte-h":!0}),M(ct)!=="svelte-6fpkk9"&&(ct.innerHTML=bi),Kn=a(t),Ut=i(t,"P",{"data-svelte-h":!0}),M(Ut)!=="svelte-1aqfuc2"&&(Ut.innerHTML=Ti),Dn=a(t),m(bt.$$.fragment,t),On=a(t),Tt=i(t,"P",{"data-svelte-h":!0}),M(Tt)!=="svelte-1ctbt88"&&(Tt.textContent=vi),ts=a(t),m(vt.$$.fragment,t),es=a(t),$t=i(t,"P",{"data-svelte-h":!0}),M($t)!=="svelte-1kn8efw"&&($t.textContent=$i),ls=a(t),m(gt.$$.fragment,t),ns=a(t),jt=i(t,"P",{"data-svelte-h":!0}),M(jt)!=="svelte-19frald"&&(jt.textContent=gi),ss=a(t),Zt=i(t,"P",{"data-svelte-h":!0}),M(Zt)!=="svelte-x6c0ro"&&(Zt.textContent=ji),as=a(t),m(F.$$.fragment,t),os=a(t),Gt=i(t,"P",{"data-svelte-h":!0}),M(Gt)!=="svelte-wjorx9"&&(Gt.textContent=Zi),is=a(t),Ct=i(t,"P",{"data-svelte-h":!0}),M(Ct)!=="svelte-1i8l0gt"&&(Ct.textContent=Gi),Ms=a(t),m(It.$$.fragment,t),ps=a(t),Wt=i(t,"P",{"data-svelte-h":!0}),M(Wt)!=="svelte-16wrepc"&&(Wt.textContent=Ci),rs=a(t),Bt=i(t,"P",{"data-svelte-h":!0}),M(Bt)!=="svelte-1vcn7vm"&&(Bt.innerHTML=Ii),ms=a(t),xt=i(t,"P",{"data-svelte-h":!0}),M(xt)!=="svelte-14kf6mb"&&(xt.textContent=Wi),us=a(t),m(Ht.$$.fragment,t),ds=a(t),_t=i(t,"P",{"data-svelte-h":!0}),M(_t)!=="svelte-59xmc4"&&(_t.textContent=Bi),ys=a(t),m(Rt.$$.fragment,t),hs=a(t),Yt=i(t,"P",{"data-svelte-h":!0}),M(Yt)!=="svelte-18i9lw7"&&(Yt.innerHTML=xi),ws=a(t),kt=i(t,"P",{"data-svelte-h":!0}),M(kt)!=="svelte-1lwmk05"&&(kt.innerHTML=Hi),fs=a(t),m(Nt.$$.fragment,t),Js=a(t),Et=i(t,"P",{"data-svelte-h":!0}),M(Et)!=="svelte-wnmq1i"&&(Et.innerHTML=_i),cs=a(t),Xt=i(t,"P",{"data-svelte-h":!0}),M(Xt)!=="svelte-18r1d67"&&(Xt.innerHTML=Ri),Us=a(t),m(Qt.$$.fragment,t),bs=a(t),Vt=i(t,"P",{"data-svelte-h":!0}),M(Vt)!=="svelte-9jr95b"&&(Vt.innerHTML=Yi),Ts=a(t),St=i(t,"P",{"data-svelte-h":!0}),M(St)!=="svelte-1xykjf"&&(St.textContent=ki),vs=a(t),I=i(t,"H3",{class:!0});var nn=U(I);z=i(nn,"A",{id:!0,class:!0,href:!0});var Mp=U(z);Tn=i(Mp,"SPAN",{});var pp=U(Tn);m(Ft.$$.fragment,pp),pp.forEach(l),Mp.forEach(l),li=a(nn),Mn=i(nn,"SPAN",{"data-svelte-h":!0}),M(Mn)!=="svelte-13flzsb"&&(Mn.textContent=Ni),nn.forEach(l),$s=a(t),zt=i(t,"P",{"data-svelte-h":!0}),M(zt)!=="svelte-ndkoex"&&(zt.textContent=Ei),gs=a(t),qt=i(t,"P",{"data-svelte-h":!0}),M(qt)!=="svelte-1tgsd48"&&(qt.textContent=Xi),js=a(t),m(At.$$.fragment,t),Zs=a(t),Lt=i(t,"P",{"data-svelte-h":!0}),M(Lt)!=="svelte-1kn8efw"&&(Lt.textContent=Qi),Gs=a(t),m(Pt.$$.fragment,t),Cs=a(t),Kt=i(t,"P",{"data-svelte-h":!0}),M(Kt)!=="svelte-11d7krr"&&(Kt.textContent=Vi),Is=a(t),m(Dt.$$.fragment,t),Ws=a(t),m(Ot.$$.fragment,t),Bs=a(t),te=i(t,"P",{"data-svelte-h":!0}),M(te)!=="svelte-1d29pht"&&(te.textContent=Si),xs=a(t),m(ee.$$.fragment,t),Hs=a(t),le=i(t,"P",{"data-svelte-h":!0}),M(le)!=="svelte-gfaabp"&&(le.textContent=Fi),_s=a(t),m(ne.$$.fragment,t),Rs=a(t),se=i(t,"P",{"data-svelte-h":!0}),M(se)!=="svelte-1m22ue8"&&(se.textContent=zi),Ys=a(t),W=i(t,"H3",{class:!0});var Vo=U(W);q=i(Vo,"A",{id:!0,class:!0,href:!0});var rp=U(q);vn=i(rp,"SPAN",{});var mp=U(vn);m(ae.$$.fragment,mp),mp.forEach(l),rp.forEach(l),ni=a(Vo),pn=i(Vo,"SPAN",{"data-svelte-h":!0}),M(pn)!=="svelte-1rq0t74"&&(pn.textContent=qi),Vo.forEach(l),ks=a(t),oe=i(t,"P",{"data-svelte-h":!0}),M(oe)!=="svelte-mxc2mx"&&(oe.innerHTML=Ai),Ns=a(t),ie=i(t,"P",{"data-svelte-h":!0}),M(ie)!=="svelte-93p8ub"&&(ie.innerHTML=Li),Es=a(t),m(Me.$$.fragment,t),Xs=a(t),pe=i(t,"P",{"data-svelte-h":!0}),M(pe)!=="svelte-1kn8efw"&&(pe.textContent=Pi),Qs=a(t),m(re.$$.fragment,t),Vs=a(t),me=i(t,"P",{"data-svelte-h":!0}),M(me)!=="svelte-7vnq39"&&(me.innerHTML=Ki),Ss=a(t),ue=i(t,"P",{"data-svelte-h":!0}),M(ue)!=="svelte-1lzjho7"&&(ue.innerHTML=Di),Fs=a(t),m(de.$$.fragment,t),zs=a(t),ye=i(t,"P",{"data-svelte-h":!0}),M(ye)!=="svelte-17fred2"&&(ye.textContent=Oi),qs=a(t),m(he.$$.fragment,t),As=a(t),we=i(t,"P",{"data-svelte-h":!0}),M(we)!=="svelte-hj9t81"&&(we.textContent=tM),Ls=a(t),m(fe.$$.fragment,t),Ps=a(t),Je=i(t,"P",{"data-svelte-h":!0}),M(Je)!=="svelte-6e06b3"&&(Je.textContent=eM),Ks=a(t),m(ce.$$.fragment,t),Ds=a(t),m(Ue.$$.fragment,t),Os=a(t),m(A.$$.fragment,t),ta=a(t),B=i(t,"H3",{class:!0});var So=U(B);L=i(So,"A",{id:!0,class:!0,href:!0});var up=U(L);$n=i(up,"SPAN",{});var dp=U($n);m(be.$$.fragment,dp),dp.forEach(l),up.forEach(l),si=a(So),rn=i(So,"SPAN",{"data-svelte-h":!0}),M(rn)!=="svelte-1mi4w7z"&&(rn.textContent=lM),So.forEach(l),ea=a(t),Te=i(t,"P",{"data-svelte-h":!0}),M(Te)!=="svelte-tpusz6"&&(Te.innerHTML=nM),la=a(t),m(ve.$$.fragment,t),na=a(t),m(P.$$.fragment,t),sa=a(t),$e=i(t,"P",{"data-svelte-h":!0}),M($e)!=="svelte-p8afmq"&&($e.innerHTML=sM),aa=a(t),m(ge.$$.fragment,t),oa=a(t),je=i(t,"P",{"data-svelte-h":!0}),M(je)!=="svelte-14p2zdq"&&(je.innerHTML=aM),ia=a(t),m(Ze.$$.fragment,t),Ma=a(t),m(K.$$.fragment,t),pa=a(t),Ge=i(t,"P",{"data-svelte-h":!0}),M(Ge)!=="svelte-1am4b2y"&&(Ge.innerHTML=oM),ra=a(t),Ce=i(t,"P",{"data-svelte-h":!0}),M(Ce)!=="svelte-vgwox5"&&(Ce.textContent=iM),ma=a(t),Ie=i(t,"UL",{"data-svelte-h":!0}),M(Ie)!=="svelte-1ka861b"&&(Ie.innerHTML=MM),ua=a(t),x=i(t,"H2",{class:!0});var Fo=U(x);D=i(Fo,"A",{id:!0,class:!0,href:!0});var yp=U(D);gn=i(yp,"SPAN",{});var hp=U(gn);m(We.$$.fragment,hp),hp.forEach(l),yp.forEach(l),ai=a(Fo),mn=i(Fo,"SPAN",{"data-svelte-h":!0}),M(mn)!=="svelte-clkarq"&&(mn.textContent=pM),Fo.forEach(l),da=a(t),Be=i(t,"P",{"data-svelte-h":!0}),M(Be)!=="svelte-17s0c8g"&&(Be.textContent=rM),ya=a(t),xe=i(t,"UL",{"data-svelte-h":!0}),M(xe)!=="svelte-pbj22l"&&(xe.innerHTML=mM),ha=a(t),He=i(t,"P",{"data-svelte-h":!0}),M(He)!=="svelte-1as8dgp"&&(He.innerHTML=uM),wa=a(t),m(_e.$$.fragment,t),fa=a(t),Re=i(t,"P",{"data-svelte-h":!0}),M(Re)!=="svelte-jsnei8"&&(Re.innerHTML=dM),Ja=a(t),m(Ye.$$.fragment,t),ca=a(t),ke=i(t,"P",{"data-svelte-h":!0}),M(ke)!=="svelte-1kn8efw"&&(ke.textContent=yM),Ua=a(t),m(Ne.$$.fragment,t),ba=a(t),Ee=i(t,"P",{"data-svelte-h":!0}),M(Ee)!=="svelte-41yo1n"&&(Ee.innerHTML=hM),Ta=a(t),m(Xe.$$.fragment,t),va=a(t),Qe=i(t,"P",{"data-svelte-h":!0}),M(Qe)!=="svelte-1twg115"&&(Qe.textContent=wM),$a=a(t),m(Ve.$$.fragment,t),ga=a(t),Se=i(t,"P",{"data-svelte-h":!0}),M(Se)!=="svelte-1fsz748"&&(Se.textContent=fM),ja=a(t),m(O.$$.fragment,t),Za=a(t),Fe=i(t,"P",{"data-svelte-h":!0}),M(Fe)!=="svelte-13tgpjo"&&(Fe.innerHTML=JM),Ga=a(t),m(ze.$$.fragment,t),Ca=a(t),m(qe.$$.fragment,t),Ia=a(t),Ae=i(t,"P",{"data-svelte-h":!0}),M(Ae)!=="svelte-hotjlw"&&(Ae.innerHTML=cM),Wa=a(t),Le=i(t,"P",{"data-svelte-h":!0}),M(Le)!=="svelte-1e1a7gb"&&(Le.innerHTML=UM),Ba=a(t),m(Pe.$$.fragment,t),xa=a(t),Ke=i(t,"IMG",{src:!0,width:!0}),Ha=a(t),De=i(t,"P",{"data-svelte-h":!0}),M(De)!=="svelte-6fx72p"&&(De.textContent=TM),_a=a(t),m(Oe.$$.fragment,t),Ra=a(t),m(tl.$$.fragment,t),Ya=a(t),el=i(t,"IMG",{src:!0,width:!0}),ka=a(t),ll=i(t,"P",{"data-svelte-h":!0}),M(ll)!=="svelte-w6z124"&&(ll.textContent=$M),Na=a(t),m(nl.$$.fragment,t),Ea=a(t),m(sl.$$.fragment,t),Xa=a(t),al=i(t,"IMG",{src:!0,width:!0}),Qa=a(t),ol=i(t,"P",{"data-svelte-h":!0}),M(ol)!=="svelte-1bohxx7"&&(ol.textContent=jM),Va=a(t),il=i(t,"P",{"data-svelte-h":!0}),M(il)!=="svelte-1v9ybot"&&(il.textContent=ZM),Sa=a(t),H=i(t,"H3",{class:!0});var zo=U(H);tt=i(zo,"A",{id:!0,class:!0,href:!0});var wp=U(tt);jn=i(wp,"SPAN",{});var fp=U(jn);m(Ml.$$.fragment,fp),fp.forEach(l),wp.forEach(l),oi=a(zo),un=i(zo,"SPAN",{"data-svelte-h":!0}),M(un)!=="svelte-1cmtidr"&&(un.textContent=GM),zo.forEach(l),Fa=a(t),pl=i(t,"P",{"data-svelte-h":!0}),M(pl)!=="svelte-1862nfc"&&(pl.textContent=CM),za=a(t),_=i(t,"H4",{class:!0});var qo=U(_);et=i(qo,"A",{id:!0,class:!0,href:!0});var Jp=U(et);Zn=i(Jp,"SPAN",{});var cp=U(Zn);m(rl.$$.fragment,cp),cp.forEach(l),Jp.forEach(l),ii=a(qo),dn=i(qo,"SPAN",{"data-svelte-h":!0}),M(dn)!=="svelte-1j1hqdt"&&(dn.textContent=IM),qo.forEach(l),qa=a(t),ml=i(t,"P",{"data-svelte-h":!0}),M(ml)!=="svelte-cfa0ii"&&(ml.textContent=WM),Aa=a(t),ul=i(t,"P",{"data-svelte-h":!0}),M(ul)!=="svelte-lw8kji"&&(ul.textContent=BM),La=a(t),m(dl.$$.fragment,t),Pa=a(t),yl=i(t,"P",{"data-svelte-h":!0}),M(yl)!=="svelte-1yr3302"&&(yl.innerHTML=xM),Ka=a(t),hl=i(t,"P",{"data-svelte-h":!0}),M(hl)!=="svelte-1msldsi"&&(hl.innerHTML=HM),Da=a(t),m(wl.$$.fragment,t),Oa=a(t),fl=i(t,"P",{"data-svelte-h":!0}),M(fl)!=="svelte-ee8usb"&&(fl.textContent=_M),to=a(t),Jl=i(t,"UL",{"data-svelte-h":!0}),M(Jl)!=="svelte-1kul7yx"&&(Jl.innerHTML=RM),eo=a(t),cl=i(t,"P",{"data-svelte-h":!0}),M(cl)!=="svelte-1852tlh"&&(cl.textContent=YM),lo=a(t),m(Ul.$$.fragment,t),no=a(t),bl=i(t,"P",{"data-svelte-h":!0}),M(bl)!=="svelte-k5vtxr"&&(bl.innerHTML=kM),so=a(t),m(Tl.$$.fragment,t),ao=a(t),vl=i(t,"P",{"data-svelte-h":!0}),M(vl)!=="svelte-1iszpk3"&&(vl.innerHTML=NM),oo=a(t),m($l.$$.fragment,t),io=a(t),gl=i(t,"P",{"data-svelte-h":!0}),M(gl)!=="svelte-naid49"&&(gl.textContent=EM),Mo=a(t),R=i(t,"H4",{class:!0});var Ao=U(R);lt=i(Ao,"A",{id:!0,class:!0,href:!0});var Up=U(lt);Gn=i(Up,"SPAN",{});var bp=U(Gn);m(jl.$$.fragment,bp),bp.forEach(l),Up.forEach(l),Mi=a(Ao),yn=i(Ao,"SPAN",{"data-svelte-h":!0}),M(yn)!=="svelte-nzs1ay"&&(yn.textContent=XM),Ao.forEach(l),po=a(t),Zl=i(t,"P",{"data-svelte-h":!0}),M(Zl)!=="svelte-j52lr5"&&(Zl.textContent=QM),ro=a(t),m(Gl.$$.fragment,t),mo=a(t),Cl=i(t,"P",{"data-svelte-h":!0}),M(Cl)!=="svelte-ncvic4"&&(Cl.innerHTML=VM),uo=a(t),m(Il.$$.fragment,t),yo=a(t),Wl=i(t,"P",{"data-svelte-h":!0}),M(Wl)!=="svelte-1sv5bh7"&&(Wl.textContent=SM),ho=a(t),m(Bl.$$.fragment,t),wo=a(t),xl=i(t,"P",{"data-svelte-h":!0}),M(xl)!=="svelte-406qkd"&&(xl.textContent=FM),fo=a(t),Hl=i(t,"TABLE",{"data-svelte-h":!0}),M(Hl)!=="svelte-1tqzmpy"&&(Hl.innerHTML=zM),Jo=a(t),m(nt.$$.fragment,t),co=a(t),Y=i(t,"H3",{class:!0});var Lo=U(Y);st=i(Lo,"A",{id:!0,class:!0,href:!0});var Tp=U(st);Cn=i(Tp,"SPAN",{});var vp=U(Cn);m(_l.$$.fragment,vp),vp.forEach(l),Tp.forEach(l),pi=a(Lo),hn=i(Lo,"SPAN",{"data-svelte-h":!0}),M(hn)!=="svelte-1u3dkmx"&&(hn.textContent=qM),Lo.forEach(l),Uo=a(t),Rl=i(t,"P",{"data-svelte-h":!0}),M(Rl)!=="svelte-1l4nuzj"&&(Rl.textContent=AM),bo=a(t),m(Yl.$$.fragment,t),To=a(t),m(at.$$.fragment,t),vo=a(t),k=i(t,"H2",{class:!0});var Po=U(k);ot=i(Po,"A",{id:!0,class:!0,href:!0});var $p=U(ot);In=i($p,"SPAN",{});var gp=U(In);m(kl.$$.fragment,gp),gp.forEach(l),$p.forEach(l),ri=a(Po),wn=i(Po,"SPAN",{"data-svelte-h":!0}),M(wn)!=="svelte-lkkq8a"&&(wn.textContent=LM),Po.forEach(l),$o=a(t),Nl=i(t,"P",{"data-svelte-h":!0}),M(Nl)!=="svelte-136jfa0"&&(Nl.innerHTML=PM),go=a(t),El=i(t,"P",{"data-svelte-h":!0}),M(El)!=="svelte-m8k4q9"&&(El.innerHTML=KM),jo=a(t),Xl=i(t,"P",{"data-svelte-h":!0}),M(Xl)!=="svelte-1pr8rzs"&&(Xl.innerHTML=DM),Zo=a(t),m(Ql.$$.fragment,t),Go=a(t),Vl=i(t,"P",{"data-svelte-h":!0}),M(Vl)!=="svelte-m22rny"&&(Vl.innerHTML=OM),Co=a(t),m(Sl.$$.fragment,t),Io=a(t),Fl=i(t,"P",{"data-svelte-h":!0}),M(Fl)!=="svelte-1thdb72"&&(Fl.textContent=tp),Wo=a(t),m(zl.$$.fragment,t),Bo=a(t),ql=i(t,"P",{"data-svelte-h":!0}),M(ql)!=="svelte-14lhpwb"&&(ql.textContent=ep),xo=a(t),m(Al.$$.fragment,t),Ho=a(t),Ll=i(t,"P",{"data-svelte-h":!0}),M(Ll)!=="svelte-zyy3k3"&&(Ll.textContent=lp),_o=a(t),fn=i(t,"IMG",{src:!0}),Ro=a(t),m(it.$$.fragment,t),Yo=a(t),N=i(t,"H2",{class:!0});var Ko=U(N);Mt=i(Ko,"A",{id:!0,class:!0,href:!0});var jp=U(Mt);Wn=i(jp,"SPAN",{});var Zp=U(Wn);m(Pl.$$.fragment,Zp),Zp.forEach(l),jp.forEach(l),mi=a(Ko),Jn=i(Ko,"SPAN",{"data-svelte-h":!0}),M(Jn)!=="svelte-znaziw"&&(Jn.textContent=sp),Ko.forEach(l),ko=a(t),Kl=i(t,"P",{"data-svelte-h":!0}),M(Kl)!=="svelte-rsdypg"&&(Kl.innerHTML=ap),No=a(t),Dl=i(t,"P",{"data-svelte-h":!0}),M(Dl)!=="svelte-dw703x"&&(Dl.textContent=op),Eo=a(t),Ol=i(t,"P",{"data-svelte-h":!0}),M(Ol)!=="svelte-uq3at1"&&(Ol.innerHTML=ip),Xo=a(t),Bn=i(t,"P",{}),U(Bn).forEach(l),this.h()},h(){f(p,"name","hf:doc:metadata"),f(p,"content",JSON.stringify(Sp)),f(E,"id","custom-tools-and-prompts"),f(E,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(E,"href","#custom-tools-and-prompts"),f(Z,"class","relative group"),f(V,"id","customizing-the-prompt"),f(V,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(V,"href","#customizing-the-prompt"),f(G,"class","relative group"),f(S,"id","structure-of-the-prompt"),f(S,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(S,"href","#structure-of-the-prompt"),f(C,"class","relative group"),f(z,"id","writing-good-user-inputs"),f(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(z,"href","#writing-good-user-inputs"),f(I,"class","relative group"),f(q,"id","customizing-the-tool-descriptions"),f(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(q,"href","#customizing-the-tool-descriptions"),f(W,"class","relative group"),f(L,"id","customizing-the-whole-prompt"),f(L,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(L,"href","#customizing-the-whole-prompt"),f(B,"class","relative group"),f(D,"id","using-custom-tools"),f(D,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(D,"href","#using-custom-tools"),f(x,"class","relative group"),Do(Ke.src,bM="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rivers_and_lakes.png")||f(Ke,"src",bM),f(Ke,"width","200"),Do(el.src,vM="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rivers_and_lakes_winter.png")||f(el,"src",vM),f(el,"width","200"),Do(al.src,gM="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rivers_and_lakes_winter_upscale.png")||f(al,"src",gM),f(al,"width","400"),f(tt,"id","adding-new-tools"),f(tt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(tt,"href","#adding-new-tools"),f(H,"class","relative group"),f(et,"id","creating-a-new-tool"),f(et,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(et,"href","#creating-a-new-tool"),f(_,"class","relative group"),f(lt,"id","Having-the-agent-use-the-tool"),f(lt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(lt,"href","#Having-the-agent-use-the-tool"),f(R,"class","relative group"),f(st,"id","replacing-existing-tools"),f(st,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(st,"href","#replacing-existing-tools"),f(Y,"class","relative group"),f(ot,"id","leveraging-gradio-tools"),f(ot,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ot,"href","#leveraging-gradio-tools"),f(k,"class","relative group"),Do(fn.src,np="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rabbit.png")||f(fn,"src",np),f(Mt,"id","future-compatibility-with-langchain"),f(Mt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Mt,"href","#future-compatibility-with-langchain"),f(N,"class","relative group")},m(t,e){J(document.head,p),n(t,b,e),n(t,w,e),n(t,T,e),n(t,Z,e),J(Z,E),J(E,cn),u(pt,cn,null),J(Z,Oo),J(Z,sn),n(t,Nn,e),u(X,t,e),n(t,En,e),u(Q,t,e),n(t,Xn,e),n(t,rt,e),n(t,Qn,e),n(t,mt,e),n(t,Vn,e),n(t,G,e),J(G,V),J(V,Un),u(ut,Un,null),J(G,ti),J(G,an),n(t,Sn,e),n(t,dt,e),n(t,Fn,e),n(t,C,e),J(C,S),J(S,bn),u(yt,bn,null),J(C,ei),J(C,on),n(t,zn,e),n(t,ht,e),n(t,qn,e),n(t,wt,e),n(t,An,e),n(t,ft,e),n(t,Ln,e),u(Jt,t,e),n(t,Pn,e),n(t,ct,e),n(t,Kn,e),n(t,Ut,e),n(t,Dn,e),u(bt,t,e),n(t,On,e),n(t,Tt,e),n(t,ts,e),u(vt,t,e),n(t,es,e),n(t,$t,e),n(t,ls,e),u(gt,t,e),n(t,ns,e),n(t,jt,e),n(t,ss,e),n(t,Zt,e),n(t,as,e),u(F,t,e),n(t,os,e),n(t,Gt,e),n(t,is,e),n(t,Ct,e),n(t,Ms,e),u(It,t,e),n(t,ps,e),n(t,Wt,e),n(t,rs,e),n(t,Bt,e),n(t,ms,e),n(t,xt,e),n(t,us,e),u(Ht,t,e),n(t,ds,e),n(t,_t,e),n(t,ys,e),u(Rt,t,e),n(t,hs,e),n(t,Yt,e),n(t,ws,e),n(t,kt,e),n(t,fs,e),u(Nt,t,e),n(t,Js,e),n(t,Et,e),n(t,cs,e),n(t,Xt,e),n(t,Us,e),u(Qt,t,e),n(t,bs,e),n(t,Vt,e),n(t,Ts,e),n(t,St,e),n(t,vs,e),n(t,I,e),J(I,z),J(z,Tn),u(Ft,Tn,null),J(I,li),J(I,Mn),n(t,$s,e),n(t,zt,e),n(t,gs,e),n(t,qt,e),n(t,js,e),u(At,t,e),n(t,Zs,e),n(t,Lt,e),n(t,Gs,e),u(Pt,t,e),n(t,Cs,e),n(t,Kt,e),n(t,Is,e),u(Dt,t,e),n(t,Ws,e),u(Ot,t,e),n(t,Bs,e),n(t,te,e),n(t,xs,e),u(ee,t,e),n(t,Hs,e),n(t,le,e),n(t,_s,e),u(ne,t,e),n(t,Rs,e),n(t,se,e),n(t,Ys,e),n(t,W,e),J(W,q),J(q,vn),u(ae,vn,null),J(W,ni),J(W,pn),n(t,ks,e),n(t,oe,e),n(t,Ns,e),n(t,ie,e),n(t,Es,e),u(Me,t,e),n(t,Xs,e),n(t,pe,e),n(t,Qs,e),u(re,t,e),n(t,Vs,e),n(t,me,e),n(t,Ss,e),n(t,ue,e),n(t,Fs,e),u(de,t,e),n(t,zs,e),n(t,ye,e),n(t,qs,e),u(he,t,e),n(t,As,e),n(t,we,e),n(t,Ls,e),u(fe,t,e),n(t,Ps,e),n(t,Je,e),n(t,Ks,e),u(ce,t,e),n(t,Ds,e),u(Ue,t,e),n(t,Os,e),u(A,t,e),n(t,ta,e),n(t,B,e),J(B,L),J(L,$n),u(be,$n,null),J(B,si),J(B,rn),n(t,ea,e),n(t,Te,e),n(t,la,e),u(ve,t,e),n(t,na,e),u(P,t,e),n(t,sa,e),n(t,$e,e),n(t,aa,e),u(ge,t,e),n(t,oa,e),n(t,je,e),n(t,ia,e),u(Ze,t,e),n(t,Ma,e),u(K,t,e),n(t,pa,e),n(t,Ge,e),n(t,ra,e),n(t,Ce,e),n(t,ma,e),n(t,Ie,e),n(t,ua,e),n(t,x,e),J(x,D),J(D,gn),u(We,gn,null),J(x,ai),J(x,mn),n(t,da,e),n(t,Be,e),n(t,ya,e),n(t,xe,e),n(t,ha,e),n(t,He,e),n(t,wa,e),u(_e,t,e),n(t,fa,e),n(t,Re,e),n(t,Ja,e),u(Ye,t,e),n(t,ca,e),n(t,ke,e),n(t,Ua,e),u(Ne,t,e),n(t,ba,e),n(t,Ee,e),n(t,Ta,e),u(Xe,t,e),n(t,va,e),n(t,Qe,e),n(t,$a,e),u(Ve,t,e),n(t,ga,e),n(t,Se,e),n(t,ja,e),u(O,t,e),n(t,Za,e),n(t,Fe,e),n(t,Ga,e),u(ze,t,e),n(t,Ca,e),u(qe,t,e),n(t,Ia,e),n(t,Ae,e),n(t,Wa,e),n(t,Le,e),n(t,Ba,e),u(Pe,t,e),n(t,xa,e),n(t,Ke,e),n(t,Ha,e),n(t,De,e),n(t,_a,e),u(Oe,t,e),n(t,Ra,e),u(tl,t,e),n(t,Ya,e),n(t,el,e),n(t,ka,e),n(t,ll,e),n(t,Na,e),u(nl,t,e),n(t,Ea,e),u(sl,t,e),n(t,Xa,e),n(t,al,e),n(t,Qa,e),n(t,ol,e),n(t,Va,e),n(t,il,e),n(t,Sa,e),n(t,H,e),J(H,tt),J(tt,jn),u(Ml,jn,null),J(H,oi),J(H,un),n(t,Fa,e),n(t,pl,e),n(t,za,e),n(t,_,e),J(_,et),J(et,Zn),u(rl,Zn,null),J(_,ii),J(_,dn),n(t,qa,e),n(t,ml,e),n(t,Aa,e),n(t,ul,e),n(t,La,e),u(dl,t,e),n(t,Pa,e),n(t,yl,e),n(t,Ka,e),n(t,hl,e),n(t,Da,e),u(wl,t,e),n(t,Oa,e),n(t,fl,e),n(t,to,e),n(t,Jl,e),n(t,eo,e),n(t,cl,e),n(t,lo,e),u(Ul,t,e),n(t,no,e),n(t,bl,e),n(t,so,e),u(Tl,t,e),n(t,ao,e),n(t,vl,e),n(t,oo,e),u($l,t,e),n(t,io,e),n(t,gl,e),n(t,Mo,e),n(t,R,e),J(R,lt),J(lt,Gn),u(jl,Gn,null),J(R,Mi),J(R,yn),n(t,po,e),n(t,Zl,e),n(t,ro,e),u(Gl,t,e),n(t,mo,e),n(t,Cl,e),n(t,uo,e),u(Il,t,e),n(t,yo,e),n(t,Wl,e),n(t,ho,e),u(Bl,t,e),n(t,wo,e),n(t,xl,e),n(t,fo,e),n(t,Hl,e),n(t,Jo,e),u(nt,t,e),n(t,co,e),n(t,Y,e),J(Y,st),J(st,Cn),u(_l,Cn,null),J(Y,pi),J(Y,hn),n(t,Uo,e),n(t,Rl,e),n(t,bo,e),u(Yl,t,e),n(t,To,e),u(at,t,e),n(t,vo,e),n(t,k,e),J(k,ot),J(ot,In),u(kl,In,null),J(k,ri),J(k,wn),n(t,$o,e),n(t,Nl,e),n(t,go,e),n(t,El,e),n(t,jo,e),n(t,Xl,e),n(t,Zo,e),u(Ql,t,e),n(t,Go,e),n(t,Vl,e),n(t,Co,e),u(Sl,t,e),n(t,Io,e),n(t,Fl,e),n(t,Wo,e),u(zl,t,e),n(t,Bo,e),n(t,ql,e),n(t,xo,e),u(Al,t,e),n(t,Ho,e),n(t,Ll,e),n(t,_o,e),n(t,fn,e),n(t,Ro,e),u(it,t,e),n(t,Yo,e),n(t,N,e),J(N,Mt),J(Mt,Wn),u(Pl,Wn,null),J(N,mi),J(N,Jn),n(t,ko,e),n(t,Kl,e),n(t,No,e),n(t,Dl,e),n(t,Eo,e),n(t,Ol,e),n(t,Xo,e),n(t,Bn,e),Qo=!0},p(t,[e]){const tn={};e&2&&(tn.$$scope={dirty:e,ctx:t}),X.$set(tn);const xn={};e&2&&(xn.$$scope={dirty:e,ctx:t}),Q.$set(xn);const Hn={};e&2&&(Hn.$$scope={dirty:e,ctx:t}),F.$set(Hn);const en={};e&2&&(en.$$scope={dirty:e,ctx:t}),A.$set(en);const _n={};e&2&&(_n.$$scope={dirty:e,ctx:t}),P.$set(_n);const Rn={};e&2&&(Rn.$$scope={dirty:e,ctx:t}),K.$set(Rn);const ln={};e&2&&(ln.$$scope={dirty:e,ctx:t}),O.$set(ln);const Yn={};e&2&&(Yn.$$scope={dirty:e,ctx:t}),nt.$set(Yn);const kn={};e&2&&(kn.$$scope={dirty:e,ctx:t}),at.$set(kn);const nn={};e&2&&(nn.$$scope={dirty:e,ctx:t}),it.$set(nn)},i(t){Qo||(d(pt.$$.fragment,t),d(X.$$.fragment,t),d(Q.$$.fragment,t),d(ut.$$.fragment,t),d(yt.$$.fragment,t),d(Jt.$$.fragment,t),d(bt.$$.fragment,t),d(vt.$$.fragment,t),d(gt.$$.fragment,t),d(F.$$.fragment,t),d(It.$$.fragment,t),d(Ht.$$.fragment,t),d(Rt.$$.fragment,t),d(Nt.$$.fragment,t),d(Qt.$$.fragment,t),d(Ft.$$.fragment,t),d(At.$$.fragment,t),d(Pt.$$.fragment,t),d(Dt.$$.fragment,t),d(Ot.$$.fragment,t),d(ee.$$.fragment,t),d(ne.$$.fragment,t),d(ae.$$.fragment,t),d(Me.$$.fragment,t),d(re.$$.fragment,t),d(de.$$.fragment,t),d(he.$$.fragment,t),d(fe.$$.fragment,t),d(ce.$$.fragment,t),d(Ue.$$.fragment,t),d(A.$$.fragment,t),d(be.$$.fragment,t),d(ve.$$.fragment,t),d(P.$$.fragment,t),d(ge.$$.fragment,t),d(Ze.$$.fragment,t),d(K.$$.fragment,t),d(We.$$.fragment,t),d(_e.$$.fragment,t),d(Ye.$$.fragment,t),d(Ne.$$.fragment,t),d(Xe.$$.fragment,t),d(Ve.$$.fragment,t),d(O.$$.fragment,t),d(ze.$$.fragment,t),d(qe.$$.fragment,t),d(Pe.$$.fragment,t),d(Oe.$$.fragment,t),d(tl.$$.fragment,t),d(nl.$$.fragment,t),d(sl.$$.fragment,t),d(Ml.$$.fragment,t),d(rl.$$.fragment,t),d(dl.$$.fragment,t),d(wl.$$.fragment,t),d(Ul.$$.fragment,t),d(Tl.$$.fragment,t),d($l.$$.fragment,t),d(jl.$$.fragment,t),d(Gl.$$.fragment,t),d(Il.$$.fragment,t),d(Bl.$$.fragment,t),d(nt.$$.fragment,t),d(_l.$$.fragment,t),d(Yl.$$.fragment,t),d(at.$$.fragment,t),d(kl.$$.fragment,t),d(Ql.$$.fragment,t),d(Sl.$$.fragment,t),d(zl.$$.fragment,t),d(Al.$$.fragment,t),d(it.$$.fragment,t),d(Pl.$$.fragment,t),Qo=!0)},o(t){y(pt.$$.fragment,t),y(X.$$.fragment,t),y(Q.$$.fragment,t),y(ut.$$.fragment,t),y(yt.$$.fragment,t),y(Jt.$$.fragment,t),y(bt.$$.fragment,t),y(vt.$$.fragment,t),y(gt.$$.fragment,t),y(F.$$.fragment,t),y(It.$$.fragment,t),y(Ht.$$.fragment,t),y(Rt.$$.fragment,t),y(Nt.$$.fragment,t),y(Qt.$$.fragment,t),y(Ft.$$.fragment,t),y(At.$$.fragment,t),y(Pt.$$.fragment,t),y(Dt.$$.fragment,t),y(Ot.$$.fragment,t),y(ee.$$.fragment,t),y(ne.$$.fragment,t),y(ae.$$.fragment,t),y(Me.$$.fragment,t),y(re.$$.fragment,t),y(de.$$.fragment,t),y(he.$$.fragment,t),y(fe.$$.fragment,t),y(ce.$$.fragment,t),y(Ue.$$.fragment,t),y(A.$$.fragment,t),y(be.$$.fragment,t),y(ve.$$.fragment,t),y(P.$$.fragment,t),y(ge.$$.fragment,t),y(Ze.$$.fragment,t),y(K.$$.fragment,t),y(We.$$.fragment,t),y(_e.$$.fragment,t),y(Ye.$$.fragment,t),y(Ne.$$.fragment,t),y(Xe.$$.fragment,t),y(Ve.$$.fragment,t),y(O.$$.fragment,t),y(ze.$$.fragment,t),y(qe.$$.fragment,t),y(Pe.$$.fragment,t),y(Oe.$$.fragment,t),y(tl.$$.fragment,t),y(nl.$$.fragment,t),y(sl.$$.fragment,t),y(Ml.$$.fragment,t),y(rl.$$.fragment,t),y(dl.$$.fragment,t),y(wl.$$.fragment,t),y(Ul.$$.fragment,t),y(Tl.$$.fragment,t),y($l.$$.fragment,t),y(jl.$$.fragment,t),y(Gl.$$.fragment,t),y(Il.$$.fragment,t),y(Bl.$$.fragment,t),y(nt.$$.fragment,t),y(_l.$$.fragment,t),y(Yl.$$.fragment,t),y(at.$$.fragment,t),y(kl.$$.fragment,t),y(Ql.$$.fragment,t),y(Sl.$$.fragment,t),y(zl.$$.fragment,t),y(Al.$$.fragment,t),y(it.$$.fragment,t),y(Pl.$$.fragment,t),Qo=!1},d(t){t&&(l(b),l(w),l(T),l(Z),l(Nn),l(En),l(Xn),l(rt),l(Qn),l(mt),l(Vn),l(G),l(Sn),l(dt),l(Fn),l(C),l(zn),l(ht),l(qn),l(wt),l(An),l(ft),l(Ln),l(Pn),l(ct),l(Kn),l(Ut),l(Dn),l(On),l(Tt),l(ts),l(es),l($t),l(ls),l(ns),l(jt),l(ss),l(Zt),l(as),l(os),l(Gt),l(is),l(Ct),l(Ms),l(ps),l(Wt),l(rs),l(Bt),l(ms),l(xt),l(us),l(ds),l(_t),l(ys),l(hs),l(Yt),l(ws),l(kt),l(fs),l(Js),l(Et),l(cs),l(Xt),l(Us),l(bs),l(Vt),l(Ts),l(St),l(vs),l(I),l($s),l(zt),l(gs),l(qt),l(js),l(Zs),l(Lt),l(Gs),l(Cs),l(Kt),l(Is),l(Ws),l(Bs),l(te),l(xs),l(Hs),l(le),l(_s),l(Rs),l(se),l(Ys),l(W),l(ks),l(oe),l(Ns),l(ie),l(Es),l(Xs),l(pe),l(Qs),l(Vs),l(me),l(Ss),l(ue),l(Fs),l(zs),l(ye),l(qs),l(As),l(we),l(Ls),l(Ps),l(Je),l(Ks),l(Ds),l(Os),l(ta),l(B),l(ea),l(Te),l(la),l(na),l(sa),l($e),l(aa),l(oa),l(je),l(ia),l(Ma),l(pa),l(Ge),l(ra),l(Ce),l(ma),l(Ie),l(ua),l(x),l(da),l(Be),l(ya),l(xe),l(ha),l(He),l(wa),l(fa),l(Re),l(Ja),l(ca),l(ke),l(Ua),l(ba),l(Ee),l(Ta),l(va),l(Qe),l($a),l(ga),l(Se),l(ja),l(Za),l(Fe),l(Ga),l(Ca),l(Ia),l(Ae),l(Wa),l(Le),l(Ba),l(xa),l(Ke),l(Ha),l(De),l(_a),l(Ra),l(Ya),l(el),l(ka),l(ll),l(Na),l(Ea),l(Xa),l(al),l(Qa),l(ol),l(Va),l(il),l(Sa),l(H),l(Fa),l(pl),l(za),l(_),l(qa),l(ml),l(Aa),l(ul),l(La),l(Pa),l(yl),l(Ka),l(hl),l(Da),l(Oa),l(fl),l(to),l(Jl),l(eo),l(cl),l(lo),l(no),l(bl),l(so),l(ao),l(vl),l(oo),l(io),l(gl),l(Mo),l(R),l(po),l(Zl),l(ro),l(mo),l(Cl),l(uo),l(yo),l(Wl),l(ho),l(wo),l(xl),l(fo),l(Hl),l(Jo),l(co),l(Y),l(Uo),l(Rl),l(bo),l(To),l(vo),l(k),l($o),l(Nl),l(go),l(El),l(jo),l(Xl),l(Zo),l(Go),l(Vl),l(Co),l(Io),l(Fl),l(Wo),l(Bo),l(ql),l(xo),l(Ho),l(Ll),l(_o),l(fn),l(Ro),l(Yo),l(N),l(ko),l(Kl),l(No),l(Dl),l(Eo),l(Ol),l(Xo),l(Bn)),l(p),h(pt),h(X,t),h(Q,t),h(ut),h(yt),h(Jt,t),h(bt,t),h(vt,t),h(gt,t),h(F,t),h(It,t),h(Ht,t),h(Rt,t),h(Nt,t),h(Qt,t),h(Ft),h(At,t),h(Pt,t),h(Dt,t),h(Ot,t),h(ee,t),h(ne,t),h(ae),h(Me,t),h(re,t),h(de,t),h(he,t),h(fe,t),h(ce,t),h(Ue,t),h(A,t),h(be),h(ve,t),h(P,t),h(ge,t),h(Ze,t),h(K,t),h(We),h(_e,t),h(Ye,t),h(Ne,t),h(Xe,t),h(Ve,t),h(O,t),h(ze,t),h(qe,t),h(Pe,t),h(Oe,t),h(tl,t),h(nl,t),h(sl,t),h(Ml),h(rl),h(dl,t),h(wl,t),h(Ul,t),h(Tl,t),h($l,t),h(jl),h(Gl,t),h(Il,t),h(Bl,t),h(nt,t),h(_l),h(Yl,t),h(at,t),h(kl),h(Ql,t),h(Sl,t),h(zl,t),h(Al,t),h(it,t),h(Pl)}}}const Sp={local:"custom-tools-and-prompts",sections:[{local:"customizing-the-prompt",sections:[{local:"structure-of-the-prompt",title:"프롬프트의 구조"},{local:"writing-good-user-inputs",title:"좋은 사용자 입력 작성하기"},{local:"customizing-the-tool-descriptions",title:"도구 설명 사용자 정의하기"},{local:"customizing-the-whole-prompt",title:"전체 프롬프트 사용자 정의하기"}],title:"프롬프트를 사용자 정의하기"},{local:"using-custom-tools",sections:[{local:"adding-new-tools",sections:[{local:"creating-a-new-tool",title:"새 도구 만들기"},{local:"Having-the-agent-use-the-tool",title:"에이전트가 도구를 사용하게 하기"}],title:"새 도구 추가하기"},{local:"replacing-existing-tools",title:"기존 도구 대체하기"}],title:"사용자 정의 도구 사용하기"},{local:"leveraging-gradio-tools",title:"gradio-tools 사용하기"},{local:"future-compatibility-with-langchain",title:"향후 Langchain과의 호환성"}],title:"사용자 정의 도구와 프롬프트"};function Fp(v){return Cp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kp extends Ip{constructor(p){super(),Wp(this,p,Fp,Vp,Gp,{})}}export{Kp as component};
