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

I will use the following`,wrap:!1}}),ot=new U({props:{code:"YWdlbnQucnVuKCUyMkRyYXclMjBtZSUyMGElMjBwaWN0dXJlJTIwb2YlMjByaXZlcnMlMjBhbmQlMjBsYWtlcyUyMik=",highlighted:'agent.run(<span class="hljs-string">&quot;Draw me a picture of rivers and lakes&quot;</span>)',wrap:!1}}),yt=new U({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;)
\`\`\`

=====

[...]`,wrap:!1}}),rt=new U({props:{code:"SHVtYW4lM0ElMjAlM0N1c2VyLWlucHV0JTNFJTVDbiU1Q25Bc3Npc3RhbnQlM0E=",highlighted:"Human: &lt;user-input&gt;\\n\\nAssistant:",wrap:!1}}),Ut=new c({props:{title:"좋은 사용자 입력 작성하기",local:"writing-good-user-inputs",headingTag:"h3"}}),Tt=new U({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>)`,wrap:!1}}),ht=new U({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;)`,wrap:!1}}),Zt=new U({props:{code:"YWdlbnQudG9vbGJveCU1QiUyMmltYWdlX2dlbmVyYXRvciUyMiU1RC5kZXNjcmlwdGlvbg==",highlighted:'agent.toolbox[<span class="hljs-string">&quot;image_generator&quot;</span>].description',wrap:!1}}),jt=new U({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.",wrap:!1}}),Gt=new U({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>)',wrap:!1}}),Wt=new U({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;)`,wrap:!1}}),Bt=new c({props:{title:"도구 설명 사용자 정의하기",local:"customizing-the-tool-descriptions",headingTag:"h3"}}),Ht=new U({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>)',wrap:!1}}),xt=new U({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;)`,wrap:!1}}),Nt=new U({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>
)`,wrap:!1}}),Qt=new U({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>)',wrap:!1}}),Et=new U({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;)`,wrap:!1}}),St=new U({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>)',wrap:!1}}),zt=new U({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;)`,wrap:!1}}),I=new h({props:{warning:!0,$$slots:{default:[NM]},$$scope:{ctx:T}}}),qt=new c({props:{title:"전체 프롬프트 사용자 정의하기",local:"customizing-the-whole-prompt",headingTag:"h3"}}),At=new U({props:{code:"dGVtcGxhdGUlMjAlM0QlMjAlMjIlMjIlMjIlMjAlNUIuLi4lNUQlMjAlMjIlMjIlMjIlMEElMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQoeW91cl9lbmRwb2ludCUyQyUyMHJ1bl9wcm9tcHRfdGVtcGxhdGUlM0R0ZW1wbGF0ZSk=",highlighted:`template = <span class="hljs-string">&quot;&quot;&quot; [...] &quot;&quot;&quot;</span>

agent = HfAgent(your_endpoint, run_prompt_template=template)`,wrap:!1}}),W=new h({props:{warning:!0,$$slots:{default:[kM]},$$scope:{ctx:T}}}),Kt=new U({props:{code:"SHVtYW4lM0ElMjAlM0MlM0N0YXNrJTNFJTNFJTBBJTBBQXNzaXN0YW50JTNB",highlighted:`Human: &lt;&lt;task&gt;&gt;

Assistant:`,wrap:!1}}),Ot=new U({props:{code:"dGVtcGxhdGUlMjAlM0QlMjAlMjIlMjIlMjIlMjAlNUIuLi4lNUQlMjAlMjIlMjIlMjIlMEElMEFhZ2VudCUyMCUzRCUyMEhmQWdlbnQodXJsX2VuZHBvaW50JTNEeW91cl9lbmRwb2ludCUyQyUyMGNoYXRfcHJvbXB0X3RlbXBsYXRlJTNEdGVtcGxhdGUp",highlighted:`template = <span class="hljs-string">&quot;&quot;&quot; [...] &quot;&quot;&quot;</span>

agent = HfAgent(url_endpoint=your_endpoint, chat_prompt_template=template)`,wrap:!1}}),C=new h({props:{warning:!0,$$slots:{default:[QM]},$$scope:{ctx:T}}}),ne=new c({props:{title:"사용자 정의 도구 사용하기",local:"using-custom-tools",headingTag:"h2"}}),Me=new U({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>)`,wrap:!1}}),pe=new U({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>)`,wrap:!1}}),ye=new U({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;",wrap:!1}}),de=new U({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)`,wrap:!1}}),Je=new U({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`",wrap:!1}}),B=new h({props:{$$slots:{default:[VM]},$$scope:{ctx:T}}}),fe=new U({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()]))',wrap:!1}}),be=new U({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`,wrap:!1}}),he=new U({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>
)`,wrap:!1}}),je=new U({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)',wrap:!1}}),ge=new U({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;)`,wrap:!1}}),We=new U({props:{code:"aW1hZ2UlMjAlM0QlMjBhZ2VudC5ydW4oJTIyVXBzY2FsZSUyMHRoZSUyMGltYWdlJTIyJTJDJTIwaW1hZ2Up",highlighted:'image = agent.run(<span class="hljs-string">&quot;Upscale the image&quot;</span>, image)',wrap:!1}}),Ce=new U({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)`,wrap:!1}}),He=new c({props:{title:"새 도구 추가하기",local:"adding-new-tools",headingTag:"h3"}}),xe=new c({props:{title:"새 도구 만들기",local:"creating-a-new-tool",headingTag:"h4"}}),Ne=new U({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>)`,wrap:!1}}),Ve=new U({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>`,wrap:!1}}),ze=new U({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>`,wrap:!1}}),Le=new U({props:{code:"ZnJvbSUyMG1vZGVsX2Rvd25sb2FkcyUyMGltcG9ydCUyMEhGTW9kZWxEb3dubG9hZHNUb29sJTBBJTBBdG9vbCUyMCUzRCUyMEhGTW9kZWxEb3dubG9hZHNUb29sKCk=",highlighted:`<span class="hljs-keyword">from</span> model_downloads <span class="hljs-keyword">import</span> HFModelDownloadsTool

tool = HFModelDownloadsTool()`,wrap:!1}}),Pe=new U({props:{code:"dG9vbC5wdXNoX3RvX2h1YiglMjJoZi1tb2RlbC1kb3dubG9hZHMlMjIp",highlighted:'tool.push_to_hub(<span class="hljs-string">&quot;hf-model-downloads&quot;</span>)',wrap:!1}}),De=new c({props:{title:"에이전트가 도구를 사용하게 하기",local:"Having-the-agent-use-the-tool",headingTag:"h4"}}),tl=new U({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>)`,wrap:!1}}),ll=new U({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>
)`,wrap:!1}}),sl=new U({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.`,wrap:!1}}),v=new h({props:{$$slots:{default:[EM]},$$scope:{ctx:T}}}),Ml=new c({props:{title:"기존 도구 대체하기",local:"replacing-existing-tools",headingTag:"h3"}}),pl=new U({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>)`,wrap:!1}}),R=new h({props:{$$slots:{default:[FM]},$$scope:{ctx:T}}}),ml=new c({props:{title:"gradio-tools 사용하기",local:"leveraging-gradio-tools",headingTag:"h2"}}),rl=new U({props:{code:"ZnJvbSUyMGdyYWRpb190b29scyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblByb21wdEdlbmVyYXRvclRvb2wlMEElMEFncmFkaW9fdG9vbCUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblByb21wdEdlbmVyYXRvclRvb2woKQ==",highlighted:`<span class="hljs-keyword">from</span> gradio_tools <span class="hljs-keyword">import</span> StableDiffusionPromptGeneratorTool

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

tool = Tool.from_gradio(gradio_tool)`,wrap:!1}}),fl=new U({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>)`,wrap:!1}}),Tl=new U({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)`,wrap:!1}}),H=new h({props:{warning:!0,$$slots:{default:[SM]},$$scope:{ctx:T}}}),hl=new c({props:{title:"향후 Langchain과의 호환성",local:"future-compatibility-with-langchain",headingTag:"h2"}}),gl=new YM({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/custom_tools.md"}}),{c(){p=i("meta"),f=s(),w=i("p"),b=s(),m(Y.$$.fragment),Wl=s(),m(j.$$.fragment),Cl=s(),m(g.$$.fragment),Bl=s(),x=i("p"),x.textContent=Ya,vl=s(),_=i("ul"),_.innerHTML=xa,Rl=s(),m(X.$$.fragment),Hl=s(),N=i("p"),N.innerHTML=_a,Yl=s(),m(k.$$.fragment),xl=s(),Q=i("p"),Q.textContent=Xa,_l=s(),V=i("ul"),V.innerHTML=Na,Xl=s(),E=i("p"),E.innerHTML=ka,Nl=s(),m(F.$$.fragment),kl=s(),S=i("p"),S.innerHTML=Qa,Ql=s(),z=i("p"),z.innerHTML=Va,Vl=s(),m(q.$$.fragment),El=s(),L=i("p"),L.textContent=Ea,Fl=s(),m(A.$$.fragment),Sl=s(),P=i("p"),P.textContent=Fa,zl=s(),m(K.$$.fragment),ql=s(),D=i("p"),D.textContent=Sa,Ll=s(),O=i("p"),O.textContent=za,Al=s(),m(G.$$.fragment),Pl=s(),tt=i("p"),tt.textContent=qa,Kl=s(),et=i("p"),et.textContent=La,Dl=s(),m(lt.$$.fragment),Ol=s(),nt=i("p"),nt.textContent=Aa,tn=s(),st=i("p"),st.innerHTML=Pa,en=s(),at=i("p"),at.textContent=Ka,ln=s(),m(it.$$.fragment),nn=s(),Mt=i("p"),Mt.textContent=Da,sn=s(),m(ot.$$.fragment),an=s(),pt=i("p"),pt.innerHTML=Oa,Mn=s(),mt=i("p"),mt.innerHTML=ti,on=s(),m(yt.$$.fragment),pn=s(),ut=i("p"),ut.innerHTML=ei,mn=s(),dt=i("p"),dt.innerHTML=li,yn=s(),m(rt.$$.fragment),un=s(),Jt=i("p"),Jt.innerHTML=ni,dn=s(),wt=i("p"),wt.textContent=si,rn=s(),m(Ut.$$.fragment),Jn=s(),ft=i("p"),ft.textContent=ai,wn=s(),bt=i("p"),bt.textContent=ii,Un=s(),m(Tt.$$.fragment),fn=s(),ct=i("p"),ct.textContent=Mi,bn=s(),m(ht.$$.fragment),Tn=s(),$t=i("p"),$t.textContent=oi,cn=s(),m(Zt.$$.fragment),hn=s(),m(jt.$$.fragment),$n=s(),gt=i("p"),gt.textContent=pi,Zn=s(),m(Gt.$$.fragment),jn=s(),It=i("p"),It.textContent=mi,gn=s(),m(Wt.$$.fragment),Gn=s(),Ct=i("p"),Ct.textContent=yi,In=s(),m(Bt.$$.fragment),Wn=s(),vt=i("p"),vt.innerHTML=ui,Cn=s(),Rt=i("p"),Rt.innerHTML=di,Bn=s(),m(Ht.$$.fragment),vn=s(),Yt=i("p"),Yt.textContent=ri,Rn=s(),m(xt.$$.fragment),Hn=s(),_t=i("p"),_t.innerHTML=Ji,Yn=s(),Xt=i("p"),Xt.innerHTML=wi,xn=s(),m(Nt.$$.fragment),_n=s(),kt=i("p"),kt.textContent=Ui,Xn=s(),m(Qt.$$.fragment),Nn=s(),Vt=i("p"),Vt.textContent=fi,kn=s(),m(Et.$$.fragment),Qn=s(),Ft=i("p"),Ft.textContent=bi,Vn=s(),m(St.$$.fragment),En=s(),m(zt.$$.fragment),Fn=s(),m(I.$$.fragment),Sn=s(),m(qt.$$.fragment),zn=s(),Lt=i("p"),Lt.innerHTML=Ti,qn=s(),m(At.$$.fragment),Ln=s(),m(W.$$.fragment),An=s(),Pt=i("p"),Pt.innerHTML=ci,Pn=s(),m(Kt.$$.fragment),Kn=s(),Dt=i("p"),Dt.innerHTML=hi,Dn=s(),m(Ot.$$.fragment),On=s(),m(C.$$.fragment),ts=s(),te=i("p"),te.innerHTML=$i,es=s(),ee=i("p"),ee.textContent=Zi,ls=s(),le=i("ul"),le.innerHTML=ji,ns=s(),m(ne.$$.fragment),ss=s(),se=i("p"),se.textContent=gi,as=s(),ae=i("ul"),ae.innerHTML=Gi,is=s(),ie=i("p"),ie.innerHTML=Ii,Ms=s(),m(Me.$$.fragment),os=s(),oe=i("p"),oe.innerHTML=Wi,ps=s(),m(pe.$$.fragment),ms=s(),me=i("p"),me.textContent=Ci,ys=s(),m(ye.$$.fragment),us=s(),ue=i("p"),ue.innerHTML=Bi,ds=s(),m(de.$$.fragment),rs=s(),re=i("p"),re.textContent=vi,Js=s(),m(Je.$$.fragment),ws=s(),we=i("p"),we.textContent=Ri,Us=s(),m(B.$$.fragment),fs=s(),Ue=i("p"),Ue.innerHTML=Hi,bs=s(),m(fe.$$.fragment),Ts=s(),m(be.$$.fragment),cs=s(),Te=i("p"),Te.innerHTML=Yi,hs=s(),ce=i("p"),ce.innerHTML=xi,$s=s(),m(he.$$.fragment),Zs=s(),$e=i("img"),js=s(),Ze=i("p"),Ze.textContent=Xi,gs=s(),m(je.$$.fragment),Gs=s(),m(ge.$$.fragment),Is=s(),Ge=i("img"),Ws=s(),Ie=i("p"),Ie.textContent=ki,Cs=s(),m(We.$$.fragment),Bs=s(),m(Ce.$$.fragment),vs=s(),Be=i("img"),Rs=s(),ve=i("p"),ve.textContent=Vi,Hs=s(),Re=i("p"),Re.textContent=Ei,Ys=s(),m(He.$$.fragment),xs=s(),Ye=i("p"),Ye.textContent=Fi,_s=s(),m(xe.$$.fragment),Xs=s(),_e=i("p"),_e.textContent=Si,Ns=s(),Xe=i("p"),Xe.textContent=zi,ks=s(),m(Ne.$$.fragment),Qs=s(),ke=i("p"),ke.innerHTML=qi,Vs=s(),Qe=i("p"),Qe.innerHTML=Li,Es=s(),m(Ve.$$.fragment),Fs=s(),Ee=i("p"),Ee.textContent=Ai,Ss=s(),Fe=i("ul"),Fe.innerHTML=Pi,zs=s(),Se=i("p"),Se.textContent=Ki,qs=s(),m(ze.$$.fragment),Ls=s(),qe=i("p"),qe.innerHTML=Di,As=s(),m(Le.$$.fragment),Ps=s(),Ae=i("p"),Ae.innerHTML=Oi,Ks=s(),m(Pe.$$.fragment),Ds=s(),Ke=i("p"),Ke.textContent=tM,Os=s(),m(De.$$.fragment),ta=s(),Oe=i("p"),Oe.textContent=eM,ea=s(),m(tl.$$.fragment),la=s(),el=i("p"),el.innerHTML=lM,na=s(),m(ll.$$.fragment),sa=s(),nl=i("p"),nl.textContent=nM,aa=s(),m(sl.$$.fragment),ia=s(),al=i("p"),al.textContent=sM,Ma=s(),il=i("table"),il.innerHTML=aM,oa=s(),m(v.$$.fragment),pa=s(),m(Ml.$$.fragment),ma=s(),ol=i("p"),ol.textContent=iM,ya=s(),m(pl.$$.fragment),ua=s(),m(R.$$.fragment),da=s(),m(ml.$$.fragment),ra=s(),yl=i("p"),yl.innerHTML=MM,Ja=s(),ul=i("p"),ul.innerHTML=oM,wa=s(),dl=i("p"),dl.innerHTML=pM,Ua=s(),m(rl.$$.fragment),fa=s(),Jl=i("p"),Jl.innerHTML=mM,ba=s(),m(wl.$$.fragment),Ta=s(),Ul=i("p"),Ul.textContent=yM,ca=s(),m(fl.$$.fragment),ha=s(),bl=i("p"),bl.textContent=uM,$a=s(),m(Tl.$$.fragment),Za=s(),cl=i("p"),cl.textContent=dM,ja=s(),Gl=i("img"),ga=s(),m(H.$$.fragment),Ga=s(),m(hl.$$.fragment),Ia=s(),$l=i("p"),$l.innerHTML=JM,Wa=s(),Zl=i("p"),Zl.textContent=wM,Ca=s(),jl=i("p"),jl.innerHTML=UM,Ba=s(),m(gl.$$.fragment),va=s(),Il=i("p"),this.h()},l(t){const e=RM("svelte-u9bgzb",document.head);p=M(e,"META",{name:!0,content:!0}),e.forEach(l),f=a(t),w=M(t,"P",{}),IM(w).forEach(l),b=a(t),y(Y.$$.fragment,t),Wl=a(t),y(j.$$.fragment,t),Cl=a(t),y(g.$$.fragment,t),Bl=a(t),x=M(t,"P",{"data-svelte-h":!0}),o(x)!=="svelte-1wc8fnx"&&(x.textContent=Ya),vl=a(t),_=M(t,"UL",{"data-svelte-h":!0}),o(_)!=="svelte-1bywcia"&&(_.innerHTML=xa),Rl=a(t),y(X.$$.fragment,t),Hl=a(t),N=M(t,"P",{"data-svelte-h":!0}),o(N)!=="svelte-mgklnd"&&(N.innerHTML=_a),Yl=a(t),y(k.$$.fragment,t),xl=a(t),Q=M(t,"P",{"data-svelte-h":!0}),o(Q)!=="svelte-13mu5cg"&&(Q.textContent=Xa),_l=a(t),V=M(t,"UL",{"data-svelte-h":!0}),o(V)!=="svelte-1ifa0gw"&&(V.innerHTML=Na),Xl=a(t),E=M(t,"P",{"data-svelte-h":!0}),o(E)!=="svelte-17r3h2g"&&(E.innerHTML=ka),Nl=a(t),y(F.$$.fragment,t),kl=a(t),S=M(t,"P",{"data-svelte-h":!0}),o(S)!=="svelte-6fpkk9"&&(S.innerHTML=Qa),Ql=a(t),z=M(t,"P",{"data-svelte-h":!0}),o(z)!=="svelte-1aqfuc2"&&(z.innerHTML=Va),Vl=a(t),y(q.$$.fragment,t),El=a(t),L=M(t,"P",{"data-svelte-h":!0}),o(L)!=="svelte-1ctbt88"&&(L.textContent=Ea),Fl=a(t),y(A.$$.fragment,t),Sl=a(t),P=M(t,"P",{"data-svelte-h":!0}),o(P)!=="svelte-1kn8efw"&&(P.textContent=Fa),zl=a(t),y(K.$$.fragment,t),ql=a(t),D=M(t,"P",{"data-svelte-h":!0}),o(D)!=="svelte-19frald"&&(D.textContent=Sa),Ll=a(t),O=M(t,"P",{"data-svelte-h":!0}),o(O)!=="svelte-x6c0ro"&&(O.textContent=za),Al=a(t),y(G.$$.fragment,t),Pl=a(t),tt=M(t,"P",{"data-svelte-h":!0}),o(tt)!=="svelte-wjorx9"&&(tt.textContent=qa),Kl=a(t),et=M(t,"P",{"data-svelte-h":!0}),o(et)!=="svelte-1i8l0gt"&&(et.textContent=La),Dl=a(t),y(lt.$$.fragment,t),Ol=a(t),nt=M(t,"P",{"data-svelte-h":!0}),o(nt)!=="svelte-16wrepc"&&(nt.textContent=Aa),tn=a(t),st=M(t,"P",{"data-svelte-h":!0}),o(st)!=="svelte-1vcn7vm"&&(st.innerHTML=Pa),en=a(t),at=M(t,"P",{"data-svelte-h":!0}),o(at)!=="svelte-14kf6mb"&&(at.textContent=Ka),ln=a(t),y(it.$$.fragment,t),nn=a(t),Mt=M(t,"P",{"data-svelte-h":!0}),o(Mt)!=="svelte-59xmc4"&&(Mt.textContent=Da),sn=a(t),y(ot.$$.fragment,t),an=a(t),pt=M(t,"P",{"data-svelte-h":!0}),o(pt)!=="svelte-18i9lw7"&&(pt.innerHTML=Oa),Mn=a(t),mt=M(t,"P",{"data-svelte-h":!0}),o(mt)!=="svelte-1lwmk05"&&(mt.innerHTML=ti),on=a(t),y(yt.$$.fragment,t),pn=a(t),ut=M(t,"P",{"data-svelte-h":!0}),o(ut)!=="svelte-wnmq1i"&&(ut.innerHTML=ei),mn=a(t),dt=M(t,"P",{"data-svelte-h":!0}),o(dt)!=="svelte-18r1d67"&&(dt.innerHTML=li),yn=a(t),y(rt.$$.fragment,t),un=a(t),Jt=M(t,"P",{"data-svelte-h":!0}),o(Jt)!=="svelte-9jr95b"&&(Jt.innerHTML=ni),dn=a(t),wt=M(t,"P",{"data-svelte-h":!0}),o(wt)!=="svelte-1xykjf"&&(wt.textContent=si),rn=a(t),y(Ut.$$.fragment,t),Jn=a(t),ft=M(t,"P",{"data-svelte-h":!0}),o(ft)!=="svelte-ndkoex"&&(ft.textContent=ai),wn=a(t),bt=M(t,"P",{"data-svelte-h":!0}),o(bt)!=="svelte-1tgsd48"&&(bt.textContent=ii),Un=a(t),y(Tt.$$.fragment,t),fn=a(t),ct=M(t,"P",{"data-svelte-h":!0}),o(ct)!=="svelte-1kn8efw"&&(ct.textContent=Mi),bn=a(t),y(ht.$$.fragment,t),Tn=a(t),$t=M(t,"P",{"data-svelte-h":!0}),o($t)!=="svelte-11d7krr"&&($t.textContent=oi),cn=a(t),y(Zt.$$.fragment,t),hn=a(t),y(jt.$$.fragment,t),$n=a(t),gt=M(t,"P",{"data-svelte-h":!0}),o(gt)!=="svelte-1d29pht"&&(gt.textContent=pi),Zn=a(t),y(Gt.$$.fragment,t),jn=a(t),It=M(t,"P",{"data-svelte-h":!0}),o(It)!=="svelte-gfaabp"&&(It.textContent=mi),gn=a(t),y(Wt.$$.fragment,t),Gn=a(t),Ct=M(t,"P",{"data-svelte-h":!0}),o(Ct)!=="svelte-1m22ue8"&&(Ct.textContent=yi),In=a(t),y(Bt.$$.fragment,t),Wn=a(t),vt=M(t,"P",{"data-svelte-h":!0}),o(vt)!=="svelte-mxc2mx"&&(vt.innerHTML=ui),Cn=a(t),Rt=M(t,"P",{"data-svelte-h":!0}),o(Rt)!=="svelte-93p8ub"&&(Rt.innerHTML=di),Bn=a(t),y(Ht.$$.fragment,t),vn=a(t),Yt=M(t,"P",{"data-svelte-h":!0}),o(Yt)!=="svelte-1kn8efw"&&(Yt.textContent=ri),Rn=a(t),y(xt.$$.fragment,t),Hn=a(t),_t=M(t,"P",{"data-svelte-h":!0}),o(_t)!=="svelte-7vnq39"&&(_t.innerHTML=Ji),Yn=a(t),Xt=M(t,"P",{"data-svelte-h":!0}),o(Xt)!=="svelte-1lzjho7"&&(Xt.innerHTML=wi),xn=a(t),y(Nt.$$.fragment,t),_n=a(t),kt=M(t,"P",{"data-svelte-h":!0}),o(kt)!=="svelte-17fred2"&&(kt.textContent=Ui),Xn=a(t),y(Qt.$$.fragment,t),Nn=a(t),Vt=M(t,"P",{"data-svelte-h":!0}),o(Vt)!=="svelte-hj9t81"&&(Vt.textContent=fi),kn=a(t),y(Et.$$.fragment,t),Qn=a(t),Ft=M(t,"P",{"data-svelte-h":!0}),o(Ft)!=="svelte-6e06b3"&&(Ft.textContent=bi),Vn=a(t),y(St.$$.fragment,t),En=a(t),y(zt.$$.fragment,t),Fn=a(t),y(I.$$.fragment,t),Sn=a(t),y(qt.$$.fragment,t),zn=a(t),Lt=M(t,"P",{"data-svelte-h":!0}),o(Lt)!=="svelte-tpusz6"&&(Lt.innerHTML=Ti),qn=a(t),y(At.$$.fragment,t),Ln=a(t),y(W.$$.fragment,t),An=a(t),Pt=M(t,"P",{"data-svelte-h":!0}),o(Pt)!=="svelte-p8afmq"&&(Pt.innerHTML=ci),Pn=a(t),y(Kt.$$.fragment,t),Kn=a(t),Dt=M(t,"P",{"data-svelte-h":!0}),o(Dt)!=="svelte-14p2zdq"&&(Dt.innerHTML=hi),Dn=a(t),y(Ot.$$.fragment,t),On=a(t),y(C.$$.fragment,t),ts=a(t),te=M(t,"P",{"data-svelte-h":!0}),o(te)!=="svelte-1am4b2y"&&(te.innerHTML=$i),es=a(t),ee=M(t,"P",{"data-svelte-h":!0}),o(ee)!=="svelte-vgwox5"&&(ee.textContent=Zi),ls=a(t),le=M(t,"UL",{"data-svelte-h":!0}),o(le)!=="svelte-1ka861b"&&(le.innerHTML=ji),ns=a(t),y(ne.$$.fragment,t),ss=a(t),se=M(t,"P",{"data-svelte-h":!0}),o(se)!=="svelte-17s0c8g"&&(se.textContent=gi),as=a(t),ae=M(t,"UL",{"data-svelte-h":!0}),o(ae)!=="svelte-pbj22l"&&(ae.innerHTML=Gi),is=a(t),ie=M(t,"P",{"data-svelte-h":!0}),o(ie)!=="svelte-1as8dgp"&&(ie.innerHTML=Ii),Ms=a(t),y(Me.$$.fragment,t),os=a(t),oe=M(t,"P",{"data-svelte-h":!0}),o(oe)!=="svelte-jsnei8"&&(oe.innerHTML=Wi),ps=a(t),y(pe.$$.fragment,t),ms=a(t),me=M(t,"P",{"data-svelte-h":!0}),o(me)!=="svelte-1kn8efw"&&(me.textContent=Ci),ys=a(t),y(ye.$$.fragment,t),us=a(t),ue=M(t,"P",{"data-svelte-h":!0}),o(ue)!=="svelte-41yo1n"&&(ue.innerHTML=Bi),ds=a(t),y(de.$$.fragment,t),rs=a(t),re=M(t,"P",{"data-svelte-h":!0}),o(re)!=="svelte-1twg115"&&(re.textContent=vi),Js=a(t),y(Je.$$.fragment,t),ws=a(t),we=M(t,"P",{"data-svelte-h":!0}),o(we)!=="svelte-1fsz748"&&(we.textContent=Ri),Us=a(t),y(B.$$.fragment,t),fs=a(t),Ue=M(t,"P",{"data-svelte-h":!0}),o(Ue)!=="svelte-13tgpjo"&&(Ue.innerHTML=Hi),bs=a(t),y(fe.$$.fragment,t),Ts=a(t),y(be.$$.fragment,t),cs=a(t),Te=M(t,"P",{"data-svelte-h":!0}),o(Te)!=="svelte-hotjlw"&&(Te.innerHTML=Yi),hs=a(t),ce=M(t,"P",{"data-svelte-h":!0}),o(ce)!=="svelte-1e1a7gb"&&(ce.innerHTML=xi),$s=a(t),y(he.$$.fragment,t),Zs=a(t),$e=M(t,"IMG",{src:!0,width:!0}),js=a(t),Ze=M(t,"P",{"data-svelte-h":!0}),o(Ze)!=="svelte-6fx72p"&&(Ze.textContent=Xi),gs=a(t),y(je.$$.fragment,t),Gs=a(t),y(ge.$$.fragment,t),Is=a(t),Ge=M(t,"IMG",{src:!0,width:!0}),Ws=a(t),Ie=M(t,"P",{"data-svelte-h":!0}),o(Ie)!=="svelte-w6z124"&&(Ie.textContent=ki),Cs=a(t),y(We.$$.fragment,t),Bs=a(t),y(Ce.$$.fragment,t),vs=a(t),Be=M(t,"IMG",{src:!0,width:!0}),Rs=a(t),ve=M(t,"P",{"data-svelte-h":!0}),o(ve)!=="svelte-1bohxx7"&&(ve.textContent=Vi),Hs=a(t),Re=M(t,"P",{"data-svelte-h":!0}),o(Re)!=="svelte-1v9ybot"&&(Re.textContent=Ei),Ys=a(t),y(He.$$.fragment,t),xs=a(t),Ye=M(t,"P",{"data-svelte-h":!0}),o(Ye)!=="svelte-1862nfc"&&(Ye.textContent=Fi),_s=a(t),y(xe.$$.fragment,t),Xs=a(t),_e=M(t,"P",{"data-svelte-h":!0}),o(_e)!=="svelte-cfa0ii"&&(_e.textContent=Si),Ns=a(t),Xe=M(t,"P",{"data-svelte-h":!0}),o(Xe)!=="svelte-lw8kji"&&(Xe.textContent=zi),ks=a(t),y(Ne.$$.fragment,t),Qs=a(t),ke=M(t,"P",{"data-svelte-h":!0}),o(ke)!=="svelte-1gm0p2s"&&(ke.innerHTML=qi),Vs=a(t),Qe=M(t,"P",{"data-svelte-h":!0}),o(Qe)!=="svelte-1msldsi"&&(Qe.innerHTML=Li),Es=a(t),y(Ve.$$.fragment,t),Fs=a(t),Ee=M(t,"P",{"data-svelte-h":!0}),o(Ee)!=="svelte-ee8usb"&&(Ee.textContent=Ai),Ss=a(t),Fe=M(t,"UL",{"data-svelte-h":!0}),o(Fe)!=="svelte-1kul7yx"&&(Fe.innerHTML=Pi),zs=a(t),Se=M(t,"P",{"data-svelte-h":!0}),o(Se)!=="svelte-1852tlh"&&(Se.textContent=Ki),qs=a(t),y(ze.$$.fragment,t),Ls=a(t),qe=M(t,"P",{"data-svelte-h":!0}),o(qe)!=="svelte-k5vtxr"&&(qe.innerHTML=Di),As=a(t),y(Le.$$.fragment,t),Ps=a(t),Ae=M(t,"P",{"data-svelte-h":!0}),o(Ae)!=="svelte-1iszpk3"&&(Ae.innerHTML=Oi),Ks=a(t),y(Pe.$$.fragment,t),Ds=a(t),Ke=M(t,"P",{"data-svelte-h":!0}),o(Ke)!=="svelte-naid49"&&(Ke.textContent=tM),Os=a(t),y(De.$$.fragment,t),ta=a(t),Oe=M(t,"P",{"data-svelte-h":!0}),o(Oe)!=="svelte-j52lr5"&&(Oe.textContent=eM),ea=a(t),y(tl.$$.fragment,t),la=a(t),el=M(t,"P",{"data-svelte-h":!0}),o(el)!=="svelte-ncvic4"&&(el.innerHTML=lM),na=a(t),y(ll.$$.fragment,t),sa=a(t),nl=M(t,"P",{"data-svelte-h":!0}),o(nl)!=="svelte-1sv5bh7"&&(nl.textContent=nM),aa=a(t),y(sl.$$.fragment,t),ia=a(t),al=M(t,"P",{"data-svelte-h":!0}),o(al)!=="svelte-406qkd"&&(al.textContent=sM),Ma=a(t),il=M(t,"TABLE",{"data-svelte-h":!0}),o(il)!=="svelte-1tqzmpy"&&(il.innerHTML=aM),oa=a(t),y(v.$$.fragment,t),pa=a(t),y(Ml.$$.fragment,t),ma=a(t),ol=M(t,"P",{"data-svelte-h":!0}),o(ol)!=="svelte-1l4nuzj"&&(ol.textContent=iM),ya=a(t),y(pl.$$.fragment,t),ua=a(t),y(R.$$.fragment,t),da=a(t),y(ml.$$.fragment,t),ra=a(t),yl=M(t,"P",{"data-svelte-h":!0}),o(yl)!=="svelte-136jfa0"&&(yl.innerHTML=MM),Ja=a(t),ul=M(t,"P",{"data-svelte-h":!0}),o(ul)!=="svelte-m8k4q9"&&(ul.innerHTML=oM),wa=a(t),dl=M(t,"P",{"data-svelte-h":!0}),o(dl)!=="svelte-1pr8rzs"&&(dl.innerHTML=pM),Ua=a(t),y(rl.$$.fragment,t),fa=a(t),Jl=M(t,"P",{"data-svelte-h":!0}),o(Jl)!=="svelte-m22rny"&&(Jl.innerHTML=mM),ba=a(t),y(wl.$$.fragment,t),Ta=a(t),Ul=M(t,"P",{"data-svelte-h":!0}),o(Ul)!=="svelte-1thdb72"&&(Ul.textContent=yM),ca=a(t),y(fl.$$.fragment,t),ha=a(t),bl=M(t,"P",{"data-svelte-h":!0}),o(bl)!=="svelte-14lhpwb"&&(bl.textContent=uM),$a=a(t),y(Tl.$$.fragment,t),Za=a(t),cl=M(t,"P",{"data-svelte-h":!0}),o(cl)!=="svelte-zyy3k3"&&(cl.textContent=dM),ja=a(t),Gl=M(t,"IMG",{src:!0}),ga=a(t),y(H.$$.fragment,t),Ga=a(t),y(hl.$$.fragment,t),Ia=a(t),$l=M(t,"P",{"data-svelte-h":!0}),o($l)!=="svelte-rsdypg"&&($l.innerHTML=JM),Wa=a(t),Zl=M(t,"P",{"data-svelte-h":!0}),o(Zl)!=="svelte-dw703x"&&(Zl.textContent=wM),Ca=a(t),jl=M(t,"P",{"data-svelte-h":!0}),o(jl)!=="svelte-uq3at1"&&(jl.innerHTML=UM),Ba=a(t),y(gl.$$.fragment,t),va=a(t),Il=M(t,"P",{}),IM(Il).forEach(l),this.h()},h(){Z(p,"name","hf:doc:metadata"),Z(p,"content",qM),Ha($e.src,_i="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rivers_and_lakes.png")||Z($e,"src",_i),Z($e,"width","200"),Ha(Ge.src,Ni="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rivers_and_lakes_winter.png")||Z(Ge,"src",Ni),Z(Ge,"width","200"),Ha(Be.src,Qi="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rivers_and_lakes_winter_upscale.png")||Z(Be,"src",Qi),Z(Be,"width","400"),Ha(Gl.src,rM="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rabbit.png")||Z(Gl,"src",rM)},m(t,e){HM(document.head,p),n(t,f,e),n(t,w,e),n(t,b,e),u(Y,t,e),n(t,Wl,e),u(j,t,e),n(t,Cl,e),u(g,t,e),n(t,Bl,e),n(t,x,e),n(t,vl,e),n(t,_,e),n(t,Rl,e),u(X,t,e),n(t,Hl,e),n(t,N,e),n(t,Yl,e),u(k,t,e),n(t,xl,e),n(t,Q,e),n(t,_l,e),n(t,V,e),n(t,Xl,e),n(t,E,e),n(t,Nl,e),u(F,t,e),n(t,kl,e),n(t,S,e),n(t,Ql,e),n(t,z,e),n(t,Vl,e),u(q,t,e),n(t,El,e),n(t,L,e),n(t,Fl,e),u(A,t,e),n(t,Sl,e),n(t,P,e),n(t,zl,e),u(K,t,e),n(t,ql,e),n(t,D,e),n(t,Ll,e),n(t,O,e),n(t,Al,e),u(G,t,e),n(t,Pl,e),n(t,tt,e),n(t,Kl,e),n(t,et,e),n(t,Dl,e),u(lt,t,e),n(t,Ol,e),n(t,nt,e),n(t,tn,e),n(t,st,e),n(t,en,e),n(t,at,e),n(t,ln,e),u(it,t,e),n(t,nn,e),n(t,Mt,e),n(t,sn,e),u(ot,t,e),n(t,an,e),n(t,pt,e),n(t,Mn,e),n(t,mt,e),n(t,on,e),u(yt,t,e),n(t,pn,e),n(t,ut,e),n(t,mn,e),n(t,dt,e),n(t,yn,e),u(rt,t,e),n(t,un,e),n(t,Jt,e),n(t,dn,e),n(t,wt,e),n(t,rn,e),u(Ut,t,e),n(t,Jn,e),n(t,ft,e),n(t,wn,e),n(t,bt,e),n(t,Un,e),u(Tt,t,e),n(t,fn,e),n(t,ct,e),n(t,bn,e),u(ht,t,e),n(t,Tn,e),n(t,$t,e),n(t,cn,e),u(Zt,t,e),n(t,hn,e),u(jt,t,e),n(t,$n,e),n(t,gt,e),n(t,Zn,e),u(Gt,t,e),n(t,jn,e),n(t,It,e),n(t,gn,e),u(Wt,t,e),n(t,Gn,e),n(t,Ct,e),n(t,In,e),u(Bt,t,e),n(t,Wn,e),n(t,vt,e),n(t,Cn,e),n(t,Rt,e),n(t,Bn,e),u(Ht,t,e),n(t,vn,e),n(t,Yt,e),n(t,Rn,e),u(xt,t,e),n(t,Hn,e),n(t,_t,e),n(t,Yn,e),n(t,Xt,e),n(t,xn,e),u(Nt,t,e),n(t,_n,e),n(t,kt,e),n(t,Xn,e),u(Qt,t,e),n(t,Nn,e),n(t,Vt,e),n(t,kn,e),u(Et,t,e),n(t,Qn,e),n(t,Ft,e),n(t,Vn,e),u(St,t,e),n(t,En,e),u(zt,t,e),n(t,Fn,e),u(I,t,e),n(t,Sn,e),u(qt,t,e),n(t,zn,e),n(t,Lt,e),n(t,qn,e),u(At,t,e),n(t,Ln,e),u(W,t,e),n(t,An,e),n(t,Pt,e),n(t,Pn,e),u(Kt,t,e),n(t,Kn,e),n(t,Dt,e),n(t,Dn,e),u(Ot,t,e),n(t,On,e),u(C,t,e),n(t,ts,e),n(t,te,e),n(t,es,e),n(t,ee,e),n(t,ls,e),n(t,le,e),n(t,ns,e),u(ne,t,e),n(t,ss,e),n(t,se,e),n(t,as,e),n(t,ae,e),n(t,is,e),n(t,ie,e),n(t,Ms,e),u(Me,t,e),n(t,os,e),n(t,oe,e),n(t,ps,e),u(pe,t,e),n(t,ms,e),n(t,me,e),n(t,ys,e),u(ye,t,e),n(t,us,e),n(t,ue,e),n(t,ds,e),u(de,t,e),n(t,rs,e),n(t,re,e),n(t,Js,e),u(Je,t,e),n(t,ws,e),n(t,we,e),n(t,Us,e),u(B,t,e),n(t,fs,e),n(t,Ue,e),n(t,bs,e),u(fe,t,e),n(t,Ts,e),u(be,t,e),n(t,cs,e),n(t,Te,e),n(t,hs,e),n(t,ce,e),n(t,$s,e),u(he,t,e),n(t,Zs,e),n(t,$e,e),n(t,js,e),n(t,Ze,e),n(t,gs,e),u(je,t,e),n(t,Gs,e),u(ge,t,e),n(t,Is,e),n(t,Ge,e),n(t,Ws,e),n(t,Ie,e),n(t,Cs,e),u(We,t,e),n(t,Bs,e),u(Ce,t,e),n(t,vs,e),n(t,Be,e),n(t,Rs,e),n(t,ve,e),n(t,Hs,e),n(t,Re,e),n(t,Ys,e),u(He,t,e),n(t,xs,e),n(t,Ye,e),n(t,_s,e),u(xe,t,e),n(t,Xs,e),n(t,_e,e),n(t,Ns,e),n(t,Xe,e),n(t,ks,e),u(Ne,t,e),n(t,Qs,e),n(t,ke,e),n(t,Vs,e),n(t,Qe,e),n(t,Es,e),u(Ve,t,e),n(t,Fs,e),n(t,Ee,e),n(t,Ss,e),n(t,Fe,e),n(t,zs,e),n(t,Se,e),n(t,qs,e),u(ze,t,e),n(t,Ls,e),n(t,qe,e),n(t,As,e),u(Le,t,e),n(t,Ps,e),n(t,Ae,e),n(t,Ks,e),u(Pe,t,e),n(t,Ds,e),n(t,Ke,e),n(t,Os,e),u(De,t,e),n(t,ta,e),n(t,Oe,e),n(t,ea,e),u(tl,t,e),n(t,la,e),n(t,el,e),n(t,na,e),u(ll,t,e),n(t,sa,e),n(t,nl,e),n(t,aa,e),u(sl,t,e),n(t,ia,e),n(t,al,e),n(t,Ma,e),n(t,il,e),n(t,oa,e),u(v,t,e),n(t,pa,e),u(Ml,t,e),n(t,ma,e),n(t,ol,e),n(t,ya,e),u(pl,t,e),n(t,ua,e),u(R,t,e),n(t,da,e),u(ml,t,e),n(t,ra,e),n(t,yl,e),n(t,Ja,e),n(t,ul,e),n(t,wa,e),n(t,dl,e),n(t,Ua,e),u(rl,t,e),n(t,fa,e),n(t,Jl,e),n(t,ba,e),u(wl,t,e),n(t,Ta,e),n(t,Ul,e),n(t,ca,e),u(fl,t,e),n(t,ha,e),n(t,bl,e),n(t,$a,e),u(Tl,t,e),n(t,Za,e),n(t,cl,e),n(t,ja,e),n(t,Gl,e),n(t,ga,e),u(H,t,e),n(t,Ga,e),u(hl,t,e),n(t,Ia,e),n(t,$l,e),n(t,Wa,e),n(t,Zl,e),n(t,Ca,e),n(t,jl,e),n(t,Ba,e),u(gl,t,e),n(t,va,e),n(t,Il,e),Ra=!0},p(t,[e]){const fM={};e&2&&(fM.$$scope={dirty:e,ctx:t}),j.$set(fM);const bM={};e&2&&(bM.$$scope={dirty:e,ctx:t}),g.$set(bM);const TM={};e&2&&(TM.$$scope={dirty:e,ctx:t}),G.$set(TM);const cM={};e&2&&(cM.$$scope={dirty:e,ctx:t}),I.$set(cM);const hM={};e&2&&(hM.$$scope={dirty:e,ctx:t}),W.$set(hM);const $M={};e&2&&($M.$$scope={dirty:e,ctx:t}),C.$set($M);const ZM={};e&2&&(ZM.$$scope={dirty:e,ctx:t}),B.$set(ZM);const jM={};e&2&&(jM.$$scope={dirty:e,ctx:t}),v.$set(jM);const gM={};e&2&&(gM.$$scope={dirty:e,ctx:t}),R.$set(gM);const GM={};e&2&&(GM.$$scope={dirty:e,ctx:t}),H.$set(GM)},i(t){Ra||(d(Y.$$.fragment,t),d(j.$$.fragment,t),d(g.$$.fragment,t),d(X.$$.fragment,t),d(k.$$.fragment,t),d(F.$$.fragment,t),d(q.$$.fragment,t),d(A.$$.fragment,t),d(K.$$.fragment,t),d(G.$$.fragment,t),d(lt.$$.fragment,t),d(it.$$.fragment,t),d(ot.$$.fragment,t),d(yt.$$.fragment,t),d(rt.$$.fragment,t),d(Ut.$$.fragment,t),d(Tt.$$.fragment,t),d(ht.$$.fragment,t),d(Zt.$$.fragment,t),d(jt.$$.fragment,t),d(Gt.$$.fragment,t),d(Wt.$$.fragment,t),d(Bt.$$.fragment,t),d(Ht.$$.fragment,t),d(xt.$$.fragment,t),d(Nt.$$.fragment,t),d(Qt.$$.fragment,t),d(Et.$$.fragment,t),d(St.$$.fragment,t),d(zt.$$.fragment,t),d(I.$$.fragment,t),d(qt.$$.fragment,t),d(At.$$.fragment,t),d(W.$$.fragment,t),d(Kt.$$.fragment,t),d(Ot.$$.fragment,t),d(C.$$.fragment,t),d(ne.$$.fragment,t),d(Me.$$.fragment,t),d(pe.$$.fragment,t),d(ye.$$.fragment,t),d(de.$$.fragment,t),d(Je.$$.fragment,t),d(B.$$.fragment,t),d(fe.$$.fragment,t),d(be.$$.fragment,t),d(he.$$.fragment,t),d(je.$$.fragment,t),d(ge.$$.fragment,t),d(We.$$.fragment,t),d(Ce.$$.fragment,t),d(He.$$.fragment,t),d(xe.$$.fragment,t),d(Ne.$$.fragment,t),d(Ve.$$.fragment,t),d(ze.$$.fragment,t),d(Le.$$.fragment,t),d(Pe.$$.fragment,t),d(De.$$.fragment,t),d(tl.$$.fragment,t),d(ll.$$.fragment,t),d(sl.$$.fragment,t),d(v.$$.fragment,t),d(Ml.$$.fragment,t),d(pl.$$.fragment,t),d(R.$$.fragment,t),d(ml.$$.fragment,t),d(rl.$$.fragment,t),d(wl.$$.fragment,t),d(fl.$$.fragment,t),d(Tl.$$.fragment,t),d(H.$$.fragment,t),d(hl.$$.fragment,t),d(gl.$$.fragment,t),Ra=!0)},o(t){r(Y.$$.fragment,t),r(j.$$.fragment,t),r(g.$$.fragment,t),r(X.$$.fragment,t),r(k.$$.fragment,t),r(F.$$.fragment,t),r(q.$$.fragment,t),r(A.$$.fragment,t),r(K.$$.fragment,t),r(G.$$.fragment,t),r(lt.$$.fragment,t),r(it.$$.fragment,t),r(ot.$$.fragment,t),r(yt.$$.fragment,t),r(rt.$$.fragment,t),r(Ut.$$.fragment,t),r(Tt.$$.fragment,t),r(ht.$$.fragment,t),r(Zt.$$.fragment,t),r(jt.$$.fragment,t),r(Gt.$$.fragment,t),r(Wt.$$.fragment,t),r(Bt.$$.fragment,t),r(Ht.$$.fragment,t),r(xt.$$.fragment,t),r(Nt.$$.fragment,t),r(Qt.$$.fragment,t),r(Et.$$.fragment,t),r(St.$$.fragment,t),r(zt.$$.fragment,t),r(I.$$.fragment,t),r(qt.$$.fragment,t),r(At.$$.fragment,t),r(W.$$.fragment,t),r(Kt.$$.fragment,t),r(Ot.$$.fragment,t),r(C.$$.fragment,t),r(ne.$$.fragment,t),r(Me.$$.fragment,t),r(pe.$$.fragment,t),r(ye.$$.fragment,t),r(de.$$.fragment,t),r(Je.$$.fragment,t),r(B.$$.fragment,t),r(fe.$$.fragment,t),r(be.$$.fragment,t),r(he.$$.fragment,t),r(je.$$.fragment,t),r(ge.$$.fragment,t),r(We.$$.fragment,t),r(Ce.$$.fragment,t),r(He.$$.fragment,t),r(xe.$$.fragment,t),r(Ne.$$.fragment,t),r(Ve.$$.fragment,t),r(ze.$$.fragment,t),r(Le.$$.fragment,t),r(Pe.$$.fragment,t),r(De.$$.fragment,t),r(tl.$$.fragment,t),r(ll.$$.fragment,t),r(sl.$$.fragment,t),r(v.$$.fragment,t),r(Ml.$$.fragment,t),r(pl.$$.fragment,t),r(R.$$.fragment,t),r(ml.$$.fragment,t),r(rl.$$.fragment,t),r(wl.$$.fragment,t),r(fl.$$.fragment,t),r(Tl.$$.fragment,t),r(H.$$.fragment,t),r(hl.$$.fragment,t),r(gl.$$.fragment,t),Ra=!1},d(t){t&&(l(f),l(w),l(b),l(Wl),l(Cl),l(Bl),l(x),l(vl),l(_),l(Rl),l(Hl),l(N),l(Yl),l(xl),l(Q),l(_l),l(V),l(Xl),l(E),l(Nl),l(kl),l(S),l(Ql),l(z),l(Vl),l(El),l(L),l(Fl),l(Sl),l(P),l(zl),l(ql),l(D),l(Ll),l(O),l(Al),l(Pl),l(tt),l(Kl),l(et),l(Dl),l(Ol),l(nt),l(tn),l(st),l(en),l(at),l(ln),l(nn),l(Mt),l(sn),l(an),l(pt),l(Mn),l(mt),l(on),l(pn),l(ut),l(mn),l(dt),l(yn),l(un),l(Jt),l(dn),l(wt),l(rn),l(Jn),l(ft),l(wn),l(bt),l(Un),l(fn),l(ct),l(bn),l(Tn),l($t),l(cn),l(hn),l($n),l(gt),l(Zn),l(jn),l(It),l(gn),l(Gn),l(Ct),l(In),l(Wn),l(vt),l(Cn),l(Rt),l(Bn),l(vn),l(Yt),l(Rn),l(Hn),l(_t),l(Yn),l(Xt),l(xn),l(_n),l(kt),l(Xn),l(Nn),l(Vt),l(kn),l(Qn),l(Ft),l(Vn),l(En),l(Fn),l(Sn),l(zn),l(Lt),l(qn),l(Ln),l(An),l(Pt),l(Pn),l(Kn),l(Dt),l(Dn),l(On),l(ts),l(te),l(es),l(ee),l(ls),l(le),l(ns),l(ss),l(se),l(as),l(ae),l(is),l(ie),l(Ms),l(os),l(oe),l(ps),l(ms),l(me),l(ys),l(us),l(ue),l(ds),l(rs),l(re),l(Js),l(ws),l(we),l(Us),l(fs),l(Ue),l(bs),l(Ts),l(cs),l(Te),l(hs),l(ce),l($s),l(Zs),l($e),l(js),l(Ze),l(gs),l(Gs),l(Is),l(Ge),l(Ws),l(Ie),l(Cs),l(Bs),l(vs),l(Be),l(Rs),l(ve),l(Hs),l(Re),l(Ys),l(xs),l(Ye),l(_s),l(Xs),l(_e),l(Ns),l(Xe),l(ks),l(Qs),l(ke),l(Vs),l(Qe),l(Es),l(Fs),l(Ee),l(Ss),l(Fe),l(zs),l(Se),l(qs),l(Ls),l(qe),l(As),l(Ps),l(Ae),l(Ks),l(Ds),l(Ke),l(Os),l(ta),l(Oe),l(ea),l(la),l(el),l(na),l(sa),l(nl),l(aa),l(ia),l(al),l(Ma),l(il),l(oa),l(pa),l(ma),l(ol),l(ya),l(ua),l(da),l(ra),l(yl),l(Ja),l(ul),l(wa),l(dl),l(Ua),l(fa),l(Jl),l(ba),l(Ta),l(Ul),l(ca),l(ha),l(bl),l($a),l(Za),l(cl),l(ja),l(Gl),l(ga),l(Ga),l(Ia),l($l),l(Wa),l(Zl),l(Ca),l(jl),l(Ba),l(va),l(Il)),l(p),J(Y,t),J(j,t),J(g,t),J(X,t),J(k,t),J(F,t),J(q,t),J(A,t),J(K,t),J(G,t),J(lt,t),J(it,t),J(ot,t),J(yt,t),J(rt,t),J(Ut,t),J(Tt,t),J(ht,t),J(Zt,t),J(jt,t),J(Gt,t),J(Wt,t),J(Bt,t),J(Ht,t),J(xt,t),J(Nt,t),J(Qt,t),J(Et,t),J(St,t),J(zt,t),J(I,t),J(qt,t),J(At,t),J(W,t),J(Kt,t),J(Ot,t),J(C,t),J(ne,t),J(Me,t),J(pe,t),J(ye,t),J(de,t),J(Je,t),J(B,t),J(fe,t),J(be,t),J(he,t),J(je,t),J(ge,t),J(We,t),J(Ce,t),J(He,t),J(xe,t),J(Ne,t),J(Ve,t),J(ze,t),J(Le,t),J(Pe,t),J(De,t),J(tl,t),J(ll,t),J(sl,t),J(v,t),J(Ml,t),J(pl,t),J(R,t),J(ml,t),J(rl,t),J(wl,t),J(fl,t),J(Tl,t),J(H,t),J(hl,t),J(gl,t)}}}const qM='{"title":"사용자 정의 도구와 프롬프트","local":"custom-tools-and-prompts","sections":[{"title":"프롬프트를 사용자 정의하기","local":"customizing-the-prompt","sections":[{"title":"프롬프트의 구조","local":"structure-of-the-prompt","sections":[],"depth":3},{"title":"좋은 사용자 입력 작성하기","local":"writing-good-user-inputs","sections":[],"depth":3},{"title":"도구 설명 사용자 정의하기","local":"customizing-the-tool-descriptions","sections":[],"depth":3},{"title":"전체 프롬프트 사용자 정의하기","local":"customizing-the-whole-prompt","sections":[],"depth":3}],"depth":2},{"title":"사용자 정의 도구 사용하기","local":"using-custom-tools","sections":[{"title":"새 도구 추가하기","local":"adding-new-tools","sections":[{"title":"새 도구 만들기","local":"creating-a-new-tool","sections":[],"depth":4},{"title":"에이전트가 도구를 사용하게 하기","local":"Having-the-agent-use-the-tool","sections":[],"depth":4}],"depth":3},{"title":"기존 도구 대체하기","local":"replacing-existing-tools","sections":[],"depth":3}],"depth":2},{"title":"gradio-tools 사용하기","local":"leveraging-gradio-tools","sections":[],"depth":2},{"title":"향후 Langchain과의 호환성","local":"future-compatibility-with-langchain","sections":[],"depth":2}],"depth":1}';function LM(T){return CM(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class to extends BM{constructor(p){super(),vM(this,p,LM,zM,WM,{})}}export{to as component};
