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