import{s as Re,o as Xe,n as Ve}from"../chunks/scheduler.37c15a92.js";import{S as He,i as Ye,g as r,s as n,r as u,A as Le,h as p,f as l,c as a,j as de,u as c,x as h,k as xt,y as k,a as s,v as m,d as J,t as y,w as T,m as $t,n as bt}from"../chunks/index.2bf4358c.js";import{T as At}from"../chunks/Tip.363c041f.js";import{C as S}from"../chunks/CodeBlock.4f5fc1ad.js";import{C as De}from"../chunks/CourseFloatingBanner.15ba07e6.js";import{H as v,E as Pe}from"../chunks/EditOnGithub.8916dc7c.js";function Oe(b){let M;return{c(){M=$t(`Chat templates are crucial for:
- Maintaining consistent conversation structure
- Ensuring proper role identification
- Managing context across multiple turns
- Supporting advanced features like tool use`)},l(i){M=bt(i,`Chat templates are crucial for:
- Maintaining consistent conversation structure
- Ensuring proper role identification
- Managing context across multiple turns
- Supporting advanced features like tool use`)},m(i,U){s(i,M,U)},d(i){i&&l(M)}}}function Ke(b){let M,i,U="this configuration",w;return{c(){M=$t("When using an instruct model, always verify you're using the correct chat template format. Using the wrong template can result in poor model performance or unexpected behavior. The easiest way to ensure this is to check the model tokenizer configuration on the Hub. For example, the `SmolLM2-135M-Instruct` model uses "),i=r("a"),i.textContent=U,w=$t("."),this.h()},l(d){M=bt(d,"When using an instruct model, always verify you're using the correct chat template format. Using the wrong template can result in poor model performance or unexpected behavior. The easiest way to ensure this is to check the model tokenizer configuration on the Hub. For example, the `SmolLM2-135M-Instruct` model uses "),i=p(d,"A",{href:!0,"data-svelte-h":!0}),h(i)!=="svelte-xnja4f"&&(i.textContent=U),w=bt(d,"."),this.h()},h(){xt(i,"href","https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct/blob/e2c3f7557efbdec707ae3a336371d169783f1da1/tokenizer_config.json#L146")},m(d,f){s(d,M,f),s(d,i,f),s(d,w,f)},p:Ve,d(d){d&&(l(M),l(i),l(w))}}}function tl(b){let M;return{c(){M=$t(`When implementing advanced features:
- Test thoroughly with your specific model. Vision and tool use template are particularly diverse.
- Monitor token usage carefully between each feature and model.
- Document the expected format for each feature`)},l(i){M=bt(i,`When implementing advanced features:
- Test thoroughly with your specific model. Vision and tool use template are particularly diverse.
- Monitor token usage carefully between each feature and model.
- Document the expected format for each feature`)},m(i,U){s(i,M,U)},d(i){i&&l(M)}}}function el(b){let M;return{c(){M=$t(`Common pitfalls to avoid:
- Mixing different template formats in the same application
- Exceeding token limits with long conversation histories
- Not properly escaping special characters in messages
- Forgetting to validate input message structure
- Ignoring model-specific template requirements`)},l(i){M=bt(i,`Common pitfalls to avoid:
- Mixing different template formats in the same application
- Exceeding token limits with long conversation histories
- Not properly escaping special characters in messages
- Forgetting to validate input message structure
- Ignoring model-specific template requirements`)},m(i,U){s(i,M,U)},d(i){i&&l(M)}}}function ll(b){let M,i,U="<li>Load the dataset:</li>",w,d,f,g,F="<li>Create a processing function:</li>",q,A,x,B,W="<li>Apply the chat template using your chosen model’s tokenizer</li>",C,G,N="Remember to validate your output format matches your target model’s requirements!",E;return d=new S({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJIdWdnaW5nRmFjZVRCJTJGc21vbHRhbGslMjIp",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

dataset = load_dataset(<span class="hljs-string">&quot;HuggingFaceTB/smoltalk&quot;</span>)`,wrap:!1}}),A=new S({props:{code:"ZGVmJTIwY29udmVydF90b19jaGF0bWwoZXhhbXBsZSklM0ElMEElMjAlMjAlMjAlMjByZXR1cm4lMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJtZXNzYWdlcyUyMiUzQSUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMGV4YW1wbGUlNUIlMjJpbnB1dCUyMiU1RCU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJhc3Npc3RhbnQlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwZXhhbXBsZSU1QiUyMm91dHB1dCUyMiU1RCU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1RCUwQSUyMCUyMCUyMCUyMCU3RA==",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">convert_to_chatml</span>(<span class="hljs-params">example</span>):
    <span class="hljs-keyword">return</span> {
        <span class="hljs-string">&quot;messages&quot;</span>: [
            {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: example[<span class="hljs-string">&quot;input&quot;</span>]},
            {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: example[<span class="hljs-string">&quot;output&quot;</span>]},
        ]
    }`,wrap:!1}}),{c(){M=$t("Follow these steps to convert the `HuggingFaceTB/smoltalk` dataset into chatml format:\n"),i=r("ol"),i.innerHTML=U,w=n(),u(d.$$.fragment),f=n(),g=r("ol"),g.innerHTML=F,q=n(),u(A.$$.fragment),x=n(),B=r("ol"),B.innerHTML=W,C=n(),G=r("p"),G.textContent=N,this.h()},l(o){M=bt(o,"Follow these steps to convert the `HuggingFaceTB/smoltalk` dataset into chatml format:\n"),i=p(o,"OL",{"data-svelte-h":!0}),h(i)!=="svelte-1r7vb1q"&&(i.innerHTML=U),w=a(o),c(d.$$.fragment,o),f=a(o),g=p(o,"OL",{start:!0,"data-svelte-h":!0}),h(g)!=="svelte-1uqov0c"&&(g.innerHTML=F),q=a(o),c(A.$$.fragment,o),x=a(o),B=p(o,"OL",{start:!0,"data-svelte-h":!0}),h(B)!=="svelte-17g86i3"&&(B.innerHTML=W),C=a(o),G=p(o,"P",{"data-svelte-h":!0}),h(G)!=="svelte-tib7t6"&&(G.textContent=N),this.h()},h(){xt(g,"start","2"),xt(B,"start","3")},m(o,j){s(o,M,j),s(o,i,j),s(o,w,j),m(d,o,j),s(o,f,j),s(o,g,j),s(o,q,j),m(A,o,j),s(o,x,j),s(o,B,j),s(o,C,j),s(o,G,j),E=!0},p:Ve,i(o){E||(J(d.$$.fragment,o),J(A.$$.fragment,o),E=!0)},o(o){y(d.$$.fragment,o),y(A.$$.fragment,o),E=!1},d(o){o&&(l(M),l(i),l(w),l(f),l(g),l(q),l(x),l(B),l(C),l(G)),T(d,o),T(A,o)}}}function sl(b){let M,i,U,w,d,f,g,F,q,A,x,B="Chat templates are essential for structuring interactions between language models and users. Whether you’re building a simple chatbot or a complex AI agent, understanding how to properly format your conversations is crucial for getting the best results from your model. In this guide, we’ll explore what chat templates are, why they matter, and how to use them effectively.",W,C,G,N,E,o,j,V,Ue='A base model is trained on raw text data to predict the next token, while an instruct model is fine-tuned specifically to follow instructions and engage in conversations. For example, <a href="https://huggingface.co/HuggingFaceTB/SmolLM2-135M" rel="nofollow"><code>SmolLM2-135M</code></a> is a base model, while <a href="https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct" rel="nofollow"><code>SmolLM2-135M-Instruct</code></a> is its instruction-tuned variant.',Gt,R,je="Instuction tuned models are trained to follow a specific conversational structure, making them more suitable for chatbot applications. Moreover, instruct models can handle complex interactions, including tool use, multimodal inputs, and function calling.",Bt,X,ge='To make a base model behave like an instruct model, we need to format our prompts in a consistent way that the model can understand. This is where chat templates come in. ChatML is one such template format that structures conversations with clear role indicators (system, user, assistant). Here’s a guide on <a href="https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct/blob/e2c3f7557efbdec707ae3a336371d169783f1da1/tokenizer_config.json#L146" rel="nofollow">ChatML</a>.',Nt,Q,vt,H,St,Y,we="Before diving into specific implementations, it’s important to understand how different models expect their conversations to be formatted. Let’s explore some common template formats using a simple example conversation:",Et,L,Ie="We’ll use the following conversation structure for all examples:",Qt,D,Zt,P,fe="This is the ChatML template used in models like SmolLM2 and Qwen 2:",zt,O,_t,K,Ce="This is using the <code>mistral</code> template format:",kt,tt,Ft,et,$e="Key differences between these formats include:",Wt,lt,be="<li><p><strong>System Message Handling</strong>:</p> <ul><li>Llama 2 wraps system messages in <code>&lt;&lt;SYS&gt;&gt;</code> tags</li> <li>Llama 3 uses <code>&lt;|system|&gt;</code> tags with <code>&lt;/s&gt;</code> endings</li> <li>Mistral includes system message in the first instruction</li> <li>Qwen uses explicit <code>system</code> role with <code>&lt;|im_start|&gt;</code> tags</li> <li>ChatGPT uses <code>SYSTEM:</code> prefix</li></ul></li> <li><p><strong>Message Boundaries</strong>:</p> <ul><li>Llama 2 uses <code>[INST]</code> and <code>[/INST]</code> tags</li> <li>Llama 3 uses role-specific tags (<code>&lt;|system|&gt;</code>, <code>&lt;|user|&gt;</code>, <code>&lt;|assistant|&gt;</code>) with <code>&lt;/s&gt;</code> endings</li> <li>Mistral uses <code>[INST]</code> and <code>[/INST]</code> with <code>&lt;s&gt;</code> and <code>&lt;/s&gt;</code></li> <li>Qwen uses role-specific start/end tokens</li></ul></li> <li><p><strong>Special Tokens</strong>:</p> <ul><li>Llama 2 uses <code>&lt;s&gt;</code> and <code>&lt;/s&gt;</code> for conversation boundaries</li> <li>Llama 3 uses <code>&lt;/s&gt;</code> to end each message</li> <li>Mistral uses <code>&lt;s&gt;</code> and <code>&lt;/s&gt;</code> for turn boundaries</li> <li>Qwen uses role-specific start/end tokens</li></ul></li>",Vt,st,qe="Understanding these differences is key to working with various models. Let’s look at how the transformers library helps us handle these variations automatically:",Rt,nt,Xt,I,It,Ae="Click to see template examples",Je,ft,xe="Qwen 2 and SmolLM2 ChatML template:",ye,at,Te,Ct,Ge="Mistral template:",he,ot,Ht,it,Yt,Mt,Be="Chat templates can handle more complex scenarios beyond just conversational interactions, including:",Lt,rt,Ne="<li><strong>Tool Use</strong>: When models need to interact with external tools or APIs</li> <li><strong>Multimodal Inputs</strong>: For handling images, audio, or other media types</li> <li><strong>Function Calling</strong>: For structured function execution</li> <li><strong>Multi-turn Context</strong>: For maintaining conversation history</li>",Dt,Z,Pt,pt,ve="For multimodal conversations, chat templates can include image references or base64-encoded images:",Ot,ut,Kt,ct,Se="Here’s an example of a chat template with tool use:",te,mt,ee,Jt,le,yt,se,Tt,Ee="When working with chat templates, follow these key practices:",ne,ht,Qe="<li><strong>Consistent Formatting</strong>: Always use the same template format throughout your application</li> <li><strong>Clear Role Definition</strong>: Clearly specify roles (system, user, assistant, tool) for each message</li> <li><strong>Context Management</strong>: Be mindful of token limits when maintaining conversation history</li> <li><strong>Error Handling</strong>: Include proper error handling for tool calls and multimodal inputs</li> <li><strong>Validation</strong>: Validate message structure before sending to the model</li>",ae,z,oe,dt,ie,Ut,Ze="Let’s practice implementing chat templates with a real-world example.",Me,_,re,jt,pe,gt,ze='<li><a href="https://huggingface.co/docs/transformers/main/en/chat_templating" rel="nofollow">Hugging Face Chat Templating Guide</a></li> <li><a href="https://huggingface.co/docs/transformers" rel="nofollow">Transformers Documentation</a></li> <li><a href="https://github.com/chujiezheng/chat_templates" rel="nofollow">Chat Templates Examples Repository</a></li>',ue,wt,ce,qt,me;return d=new De({props:{chapter:2,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/course/en/chapter11/section2.ipynb"}]}}),g=new v({props:{title:"Chat Templates",local:"chat-templates",headingTag:"h1"}}),q=new v({props:{title:"Introduction",local:"introduction",headingTag:"h2"}}),C=new At({props:{$$slots:{default:[Oe]},$$scope:{ctx:b}}}),N=new v({props:{title:"Model Types and Templates",local:"model-types-and-templates",headingTag:"h2"}}),o=new v({props:{title:"Base Models vs Instruct Models",local:"base-models-vs-instruct-models",headingTag:"h3"}}),Q=new At({props:{warning:!0,$$slots:{default:[Ke]},$$scope:{ctx:b}}}),H=new v({props:{title:"Common Template Formats",local:"common-template-formats",headingTag:"h3"}}),D=new S({props:{code:"bWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIyc3lzdGVtJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMllvdSUyMGFyZSUyMGElMjBoZWxwZnVsJTIwYXNzaXN0YW50LiUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMkhlbGxvISUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJhc3Npc3RhbnQlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIySGkhJTIwSG93JTIwY2FuJTIwSSUyMGhlbHAlMjB5b3UlMjB0b2RheSUzRiUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMldoYXQncyUyMHRoZSUyMHdlYXRoZXIlM0YlMjIlN0QlMkMlMEElNUQ=",highlighted:`messages = [
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a helpful assistant.&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Hello!&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Hi! How can I help you today?&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;What&#x27;s the weather?&quot;</span>},
]`,wrap:!1}}),O=new S({props:{code:"JTNDJTdDaW1fc3RhcnQlN0MlM0VzeXN0ZW0lMEFZb3UlMjBhcmUlMjBhJTIwaGVscGZ1bCUyMGFzc2lzdGFudC4lM0MlN0NpbV9lbmQlN0MlM0UlMEElM0MlN0NpbV9zdGFydCU3QyUzRXVzZXIlMEFIZWxsbyElM0MlN0NpbV9lbmQlN0MlM0UlMEElM0MlN0NpbV9zdGFydCU3QyUzRWFzc2lzdGFudCUwQUhpISUyMEhvdyUyMGNhbiUyMEklMjBoZWxwJTIweW91JTIwdG9kYXklM0YlM0MlN0NpbV9lbmQlN0MlM0UlMEElM0MlN0NpbV9zdGFydCU3QyUzRXVzZXIlMEFXaGF0J3MlMjB0aGUlMjB3ZWF0aGVyJTNGJTNDJTdDaW1fc3RhcnQlN0MlM0Vhc3Npc3RhbnQ=",highlighted:`&lt;|im_start|&gt;system
You are a helpful assistant.&lt;|im_end|&gt;
&lt;|im_start|&gt;user
Hello!&lt;|im_end|&gt;
&lt;|im_start|&gt;assistant
Hi! How can I <span class="hljs-built_in">help</span> you today?&lt;|im_end|&gt;
&lt;|im_start|&gt;user
What<span class="hljs-string">&#x27;s the weather?&lt;|im_start|&gt;assistant</span>`,wrap:!1}}),tt=new S({props:{code:"JTNDcyUzRSU1QklOU1QlNUQlMjBZb3UlMjBhcmUlMjBhJTIwaGVscGZ1bCUyMGFzc2lzdGFudC4lMjAlNUIlMkZJTlNUJTVEJTBBSGkhJTIwSG93JTIwY2FuJTIwSSUyMGhlbHAlMjB5b3UlMjB0b2RheSUzRiUzQyUyRnMlM0UlMEElNUJJTlNUJTVEJTIwSGVsbG8hJTIwJTVCJTJGSU5TVCU1RA==",highlighted:`&lt;s&gt;[INST] You are a helpful assistant. [/INST]
Hi! How can I <span class="hljs-built_in">help</span> you today?&lt;/s&gt;
[INST] Hello! [/INST]`,wrap:!1}}),nt=new S({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEElMjMlMjBUaGVzZSUyMHdpbGwlMjB1c2UlMjBkaWZmZXJlbnQlMjB0ZW1wbGF0ZXMlMjBhdXRvbWF0aWNhbGx5JTBBbWlzdHJhbF90b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtaXN0cmFsYWklMkZNaXN0cmFsLTdCLUluc3RydWN0LXYwLjElMjIpJTBBcXdlbl90b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJRd2VuJTJGUXdlbi03Qi1DaGF0JTIyKSUwQXNtb2xfdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIySHVnZ2luZ0ZhY2VUQiUyRlNtb2xMTTItMTM1TS1JbnN0cnVjdCUyMiklMEElMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJzeXN0ZW0lMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyWW91JTIwYXJlJTIwYSUyMGhlbHBmdWwlMjBhc3Npc3RhbnQuJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIySGVsbG8hJTIyJTdEJTJDJTBBJTVEJTBBJTBBJTIzJTIwRWFjaCUyMHdpbGwlMjBmb3JtYXQlMjBhY2NvcmRpbmclMjB0byUyMGl0cyUyMG1vZGVsJ3MlMjB0ZW1wbGF0ZSUwQW1pc3RyYWxfY2hhdCUyMCUzRCUyMG1pc3RyYWxfdG9rZW5pemVyLmFwcGx5X2NoYXRfdGVtcGxhdGUobWVzc2FnZXMlMkMlMjB0b2tlbml6ZSUzREZhbHNlKSUwQXF3ZW5fY2hhdCUyMCUzRCUyMHF3ZW5fdG9rZW5pemVyLmFwcGx5X2NoYXRfdGVtcGxhdGUobWVzc2FnZXMlMkMlMjB0b2tlbml6ZSUzREZhbHNlKSUwQXNtb2xfY2hhdCUyMCUzRCUyMHNtb2xfdG9rZW5pemVyLmFwcGx5X2NoYXRfdGVtcGxhdGUobWVzc2FnZXMlMkMlMjB0b2tlbml6ZSUzREZhbHNlKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-comment"># These will use different templates automatically</span>
mistral_tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-Instruct-v0.1&quot;</span>)
qwen_tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Qwen/Qwen-7B-Chat&quot;</span>)
smol_tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;HuggingFaceTB/SmolLM2-135M-Instruct&quot;</span>)

messages = [
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a helpful assistant.&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Hello!&quot;</span>},
]

<span class="hljs-comment"># Each will format according to its model&#x27;s template</span>
mistral_chat = mistral_tokenizer.apply_chat_template(messages, tokenize=<span class="hljs-literal">False</span>)
qwen_chat = qwen_tokenizer.apply_chat_template(messages, tokenize=<span class="hljs-literal">False</span>)
smol_chat = smol_tokenizer.apply_chat_template(messages, tokenize=<span class="hljs-literal">False</span>)`,wrap:!1}}),at=new S({props:{code:"JTNDJTdDaW1fc3RhcnQlN0MlM0VzeXN0ZW0lMEFZb3UlMjBhcmUlMjBhJTIwaGVscGZ1bCUyMGFzc2lzdGFudC4lM0MlN0NpbV9lbmQlN0MlM0UlMEElM0MlN0NpbV9zdGFydCU3QyUzRXVzZXIlMEFIZWxsbyElM0MlN0NpbV9lbmQlN0MlM0UlMEElM0MlN0NpbV9zdGFydCU3QyUzRWFzc2lzdGFudCUwQUhpISUyMEhvdyUyMGNhbiUyMEklMjBoZWxwJTIweW91JTIwdG9kYXklM0YlM0MlN0NpbV9lbmQlN0MlM0UlMEElM0MlN0NpbV9zdGFydCU3QyUzRXVzZXIlMEFXaGF0J3MlMjB0aGUlMjB3ZWF0aGVyJTNGJTNDJTdDaW1fc3RhcnQlN0MlM0Vhc3Npc3RhbnQ=",highlighted:`&lt;|im_start|&gt;system
You are a helpful assistant.&lt;|im_end|&gt;
&lt;|im_start|&gt;user
Hello!&lt;|im_end|&gt;
&lt;|im_start|&gt;assistant
Hi! How can I <span class="hljs-built_in">help</span> you today?&lt;|im_end|&gt;
&lt;|im_start|&gt;user
What<span class="hljs-string">&#x27;s the weather?&lt;|im_start|&gt;assistant</span>`,wrap:!1}}),ot=new S({props:{code:"JTNDcyUzRSU1QklOU1QlNUQlMjBZb3UlMjBhcmUlMjBhJTIwaGVscGZ1bCUyMGFzc2lzdGFudC4lMjAlNUIlMkZJTlNUJTVEJTBBSGkhJTIwSG93JTIwY2FuJTIwSSUyMGhlbHAlMjB5b3UlMjB0b2RheSUzRiUzQyUyRnMlM0UlMEElNUJJTlNUJTVEJTIwSGVsbG8hJTIwJTVCJTJGSU5TVCU1RA==",highlighted:`&lt;s&gt;[INST] You are a helpful assistant. [/INST]
Hi! How can I <span class="hljs-built_in">help</span> you today?&lt;/s&gt;
[INST] Hello! [/INST]`,wrap:!1}}),it=new v({props:{title:"Advanced Features",local:"advanced-features",headingTag:"h3"}}),Z=new At({props:{$$slots:{default:[tl]},$$scope:{ctx:b}}}),ut=new S({props:{code:"bWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJyb2xlJTIyJTNBJTIwJTIyc3lzdGVtJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMllvdSUyMGFyZSUyMGElMjBoZWxwZnVsJTIwdmlzaW9uJTIwYXNzaXN0YW50JTIwdGhhdCUyMGNhbiUyMGFuYWx5emUlMjBpbWFnZXMuJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJjb250ZW50JTIyJTNBJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTIydHlwZSUyMiUzQSUyMCUyMnRleHQlMjIlMkMlMjAlMjJ0ZXh0JTIyJTNBJTIwJTIyV2hhdCdzJTIwaW4lMjB0aGlzJTIwaW1hZ2UlM0YlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0eXBlJTIyJTNBJTIwJTIyaW1hZ2UlMjIlMkMlMjAlMjJpbWFnZV91cmwlMjIlM0ElMjAlMjJodHRwcyUzQSUyRiUyRmV4YW1wbGUuY29tJTJGaW1hZ2UuanBnJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTVE",highlighted:`messages = [
    {
        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>,
        <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a helpful vision assistant that can analyze images.&quot;</span>,
    },
    {
        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>,
        <span class="hljs-string">&quot;content&quot;</span>: [
            {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;What&#x27;s in this image?&quot;</span>},
            {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;image&quot;</span>, <span class="hljs-string">&quot;image_url&quot;</span>: <span class="hljs-string">&quot;https://example.com/image.jpg&quot;</span>},
        ],
    },
]`,wrap:!1}}),mt=new S({props:{code:"bWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJyb2xlJTIyJTNBJTIwJTIyc3lzdGVtJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMllvdSUyMGFyZSUyMGFuJTIwQUklMjBhc3Npc3RhbnQlMjB0aGF0JTIwY2FuJTIwdXNlJTIwdG9vbHMuJTIwQXZhaWxhYmxlJTIwdG9vbHMlM0ElMjBjYWxjdWxhdG9yJTJDJTIwd2VhdGhlcl9hcGklMjIlMkMlMEElMjAlMjAlMjAlMjAlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJXaGF0J3MlMjAxMjMlMjAqJTIwNDU2JTIwYW5kJTIwaXMlMjBpdCUyMHJhaW5pbmclMjBpbiUyMFBhcmlzJTNGJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycm9sZSUyMiUzQSUyMCUyMmFzc2lzdGFudCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJMZXQlMjBtZSUyMGhlbHAlMjB5b3UlMjB3aXRoJTIwdGhhdC4lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJ0b29sX2NhbGxzJTIyJTNBJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIydG9vbCUyMiUzQSUyMCUyMmNhbGN1bGF0b3IlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJwYXJhbWV0ZXJzJTIyJTNBJTIwJTdCJTIyb3BlcmF0aW9uJTIyJTNBJTIwJTIybXVsdGlwbHklMjIlMkMlMjAlMjJ4JTIyJTNBJTIwMTIzJTJDJTIwJTIyeSUyMiUzQSUyMDQ1NiU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QiUyMnRvb2wlMjIlM0ElMjAlMjJ3ZWF0aGVyX2FwaSUyMiUyQyUyMCUyMnBhcmFtZXRlcnMlMjIlM0ElMjAlN0IlMjJjaXR5JTIyJTNBJTIwJTIyUGFyaXMlMjIlMkMlMjAlMjJjb3VudHJ5JTIyJTNBJTIwJTIyRnJhbmNlJTIyJTdEJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnRvb2wlMjIlMkMlMjAlMjJ0b29sX25hbWUlMjIlM0ElMjAlMjJjYWxjdWxhdG9yJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMjU2MDg4JTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycm9sZSUyMiUzQSUyMCUyMnRvb2wlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJ0b29sX25hbWUlMjIlM0ElMjAlMjJ3ZWF0aGVyX2FwaSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjIlN0InY29uZGl0aW9uJyUzQSUyMCdyYWluJyUyQyUyMCd0ZW1wZXJhdHVyZSclM0ElMjAxNSU3RCUyMiUyQyUwQSUyMCUyMCUyMCUyMCU3RCUyQyUwQSU1RA==",highlighted:`messages = [
    {
        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>,
        <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are an AI assistant that can use tools. Available tools: calculator, weather_api&quot;</span>,
    },
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;What&#x27;s 123 * 456 and is it raining in Paris?&quot;</span>},
    {
        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>,
        <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Let me help you with that.&quot;</span>,
        <span class="hljs-string">&quot;tool_calls&quot;</span>: [
            {
                <span class="hljs-string">&quot;tool&quot;</span>: <span class="hljs-string">&quot;calculator&quot;</span>,
                <span class="hljs-string">&quot;parameters&quot;</span>: {<span class="hljs-string">&quot;operation&quot;</span>: <span class="hljs-string">&quot;multiply&quot;</span>, <span class="hljs-string">&quot;x&quot;</span>: <span class="hljs-number">123</span>, <span class="hljs-string">&quot;y&quot;</span>: <span class="hljs-number">456</span>},
            },
            {<span class="hljs-string">&quot;tool&quot;</span>: <span class="hljs-string">&quot;weather_api&quot;</span>, <span class="hljs-string">&quot;parameters&quot;</span>: {<span class="hljs-string">&quot;city&quot;</span>: <span class="hljs-string">&quot;Paris&quot;</span>, <span class="hljs-string">&quot;country&quot;</span>: <span class="hljs-string">&quot;France&quot;</span>}},
        ],
    },
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;tool&quot;</span>, <span class="hljs-string">&quot;tool_name&quot;</span>: <span class="hljs-string">&quot;calculator&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;56088&quot;</span>},
    {
        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;tool&quot;</span>,
        <span class="hljs-string">&quot;tool_name&quot;</span>: <span class="hljs-string">&quot;weather_api&quot;</span>,
        <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;{&#x27;condition&#x27;: &#x27;rain&#x27;, &#x27;temperature&#x27;: 15}&quot;</span>,
    },
]`,wrap:!1}}),Jt=new v({props:{title:"Best Practices",local:"best-practices",headingTag:"h2"}}),yt=new v({props:{title:"General Guidelines",local:"general-guidelines",headingTag:"h3"}}),z=new At({props:{warning:!0,$$slots:{default:[el]},$$scope:{ctx:b}}}),dt=new v({props:{title:"Hands-on Exercise",local:"hands-on-exercise",headingTag:"h2"}}),_=new At({props:{$$slots:{default:[ll]},$$scope:{ctx:b}}}),jt=new v({props:{title:"Additional Resources",local:"additional-resources",headingTag:"h2"}}),wt=new Pe({props:{source:"https://github.com/huggingface/course/blob/main/chapters/en/chapter11/2.mdx"}}),{c(){M=r("meta"),i=n(),U=r("p"),w=n(),u(d.$$.fragment),f=n(),u(g.$$.fragment),F=n(),u(q.$$.fragment),A=n(),x=r("p"),x.textContent=B,W=n(),u(C.$$.fragment),G=n(),u(N.$$.fragment),E=n(),u(o.$$.fragment),j=n(),V=r("p"),V.innerHTML=Ue,Gt=n(),R=r("p"),R.textContent=je,Bt=n(),X=r("p"),X.innerHTML=ge,Nt=n(),u(Q.$$.fragment),vt=n(),u(H.$$.fragment),St=n(),Y=r("p"),Y.textContent=we,Et=n(),L=r("p"),L.textContent=Ie,Qt=n(),u(D.$$.fragment),Zt=n(),P=r("p"),P.textContent=fe,zt=n(),u(O.$$.fragment),_t=n(),K=r("p"),K.innerHTML=Ce,kt=n(),u(tt.$$.fragment),Ft=n(),et=r("p"),et.textContent=$e,Wt=n(),lt=r("ol"),lt.innerHTML=be,Vt=n(),st=r("p"),st.textContent=qe,Rt=n(),u(nt.$$.fragment),Xt=n(),I=r("details"),It=r("summary"),It.textContent=Ae,Je=n(),ft=r("p"),ft.textContent=xe,ye=n(),u(at.$$.fragment),Te=n(),Ct=r("p"),Ct.textContent=Ge,he=n(),u(ot.$$.fragment),Ht=n(),u(it.$$.fragment),Yt=n(),Mt=r("p"),Mt.textContent=Be,Lt=n(),rt=r("ol"),rt.innerHTML=Ne,Dt=n(),u(Z.$$.fragment),Pt=n(),pt=r("p"),pt.textContent=ve,Ot=n(),u(ut.$$.fragment),Kt=n(),ct=r("p"),ct.textContent=Se,te=n(),u(mt.$$.fragment),ee=n(),u(Jt.$$.fragment),le=n(),u(yt.$$.fragment),se=n(),Tt=r("p"),Tt.textContent=Ee,ne=n(),ht=r("ol"),ht.innerHTML=Qe,ae=n(),u(z.$$.fragment),oe=n(),u(dt.$$.fragment),ie=n(),Ut=r("p"),Ut.textContent=Ze,Me=n(),u(_.$$.fragment),re=n(),u(jt.$$.fragment),pe=n(),gt=r("ul"),gt.innerHTML=ze,ue=n(),u(wt.$$.fragment),ce=n(),qt=r("p"),this.h()},l(t){const e=Le("svelte-u9bgzb",document.head);M=p(e,"META",{name:!0,content:!0}),e.forEach(l),i=a(t),U=p(t,"P",{}),de(U).forEach(l),w=a(t),c(d.$$.fragment,t),f=a(t),c(g.$$.fragment,t),F=a(t),c(q.$$.fragment,t),A=a(t),x=p(t,"P",{"data-svelte-h":!0}),h(x)!=="svelte-1k3k0tu"&&(x.textContent=B),W=a(t),c(C.$$.fragment,t),G=a(t),c(N.$$.fragment,t),E=a(t),c(o.$$.fragment,t),j=a(t),V=p(t,"P",{"data-svelte-h":!0}),h(V)!=="svelte-pqh38m"&&(V.innerHTML=Ue),Gt=a(t),R=p(t,"P",{"data-svelte-h":!0}),h(R)!=="svelte-bw0cej"&&(R.textContent=je),Bt=a(t),X=p(t,"P",{"data-svelte-h":!0}),h(X)!=="svelte-t1qpmx"&&(X.innerHTML=ge),Nt=a(t),c(Q.$$.fragment,t),vt=a(t),c(H.$$.fragment,t),St=a(t),Y=p(t,"P",{"data-svelte-h":!0}),h(Y)!=="svelte-1rnoysy"&&(Y.textContent=we),Et=a(t),L=p(t,"P",{"data-svelte-h":!0}),h(L)!=="svelte-1domsij"&&(L.textContent=Ie),Qt=a(t),c(D.$$.fragment,t),Zt=a(t),P=p(t,"P",{"data-svelte-h":!0}),h(P)!=="svelte-8sxtx3"&&(P.textContent=fe),zt=a(t),c(O.$$.fragment,t),_t=a(t),K=p(t,"P",{"data-svelte-h":!0}),h(K)!=="svelte-1yg6yh7"&&(K.innerHTML=Ce),kt=a(t),c(tt.$$.fragment,t),Ft=a(t),et=p(t,"P",{"data-svelte-h":!0}),h(et)!=="svelte-qxk9qi"&&(et.textContent=$e),Wt=a(t),lt=p(t,"OL",{"data-svelte-h":!0}),h(lt)!=="svelte-udw0je"&&(lt.innerHTML=be),Vt=a(t),st=p(t,"P",{"data-svelte-h":!0}),h(st)!=="svelte-c21ogw"&&(st.textContent=qe),Rt=a(t),c(nt.$$.fragment,t),Xt=a(t),I=p(t,"DETAILS",{});var $=de(I);It=p($,"SUMMARY",{"data-svelte-h":!0}),h(It)!=="svelte-so6cx1"&&(It.textContent=Ae),Je=a($),ft=p($,"P",{"data-svelte-h":!0}),h(ft)!=="svelte-2rzsq5"&&(ft.textContent=xe),ye=a($),c(at.$$.fragment,$),Te=a($),Ct=p($,"P",{"data-svelte-h":!0}),h(Ct)!=="svelte-c25hqw"&&(Ct.textContent=Ge),he=a($),c(ot.$$.fragment,$),$.forEach(l),Ht=a(t),c(it.$$.fragment,t),Yt=a(t),Mt=p(t,"P",{"data-svelte-h":!0}),h(Mt)!=="svelte-157lci4"&&(Mt.textContent=Be),Lt=a(t),rt=p(t,"OL",{"data-svelte-h":!0}),h(rt)!=="svelte-15wiqjs"&&(rt.innerHTML=Ne),Dt=a(t),c(Z.$$.fragment,t),Pt=a(t),pt=p(t,"P",{"data-svelte-h":!0}),h(pt)!=="svelte-4u84x6"&&(pt.textContent=ve),Ot=a(t),c(ut.$$.fragment,t),Kt=a(t),ct=p(t,"P",{"data-svelte-h":!0}),h(ct)!=="svelte-djgs24"&&(ct.textContent=Se),te=a(t),c(mt.$$.fragment,t),ee=a(t),c(Jt.$$.fragment,t),le=a(t),c(yt.$$.fragment,t),se=a(t),Tt=p(t,"P",{"data-svelte-h":!0}),h(Tt)!=="svelte-18063wt"&&(Tt.textContent=Ee),ne=a(t),ht=p(t,"OL",{"data-svelte-h":!0}),h(ht)!=="svelte-tdiy2"&&(ht.innerHTML=Qe),ae=a(t),c(z.$$.fragment,t),oe=a(t),c(dt.$$.fragment,t),ie=a(t),Ut=p(t,"P",{"data-svelte-h":!0}),h(Ut)!=="svelte-1r51sxe"&&(Ut.textContent=Ze),Me=a(t),c(_.$$.fragment,t),re=a(t),c(jt.$$.fragment,t),pe=a(t),gt=p(t,"UL",{"data-svelte-h":!0}),h(gt)!=="svelte-kyf9sf"&&(gt.innerHTML=ze),ue=a(t),c(wt.$$.fragment,t),ce=a(t),qt=p(t,"P",{}),de(qt).forEach(l),this.h()},h(){xt(M,"name","hf:doc:metadata"),xt(M,"content",nl)},m(t,e){k(document.head,M),s(t,i,e),s(t,U,e),s(t,w,e),m(d,t,e),s(t,f,e),m(g,t,e),s(t,F,e),m(q,t,e),s(t,A,e),s(t,x,e),s(t,W,e),m(C,t,e),s(t,G,e),m(N,t,e),s(t,E,e),m(o,t,e),s(t,j,e),s(t,V,e),s(t,Gt,e),s(t,R,e),s(t,Bt,e),s(t,X,e),s(t,Nt,e),m(Q,t,e),s(t,vt,e),m(H,t,e),s(t,St,e),s(t,Y,e),s(t,Et,e),s(t,L,e),s(t,Qt,e),m(D,t,e),s(t,Zt,e),s(t,P,e),s(t,zt,e),m(O,t,e),s(t,_t,e),s(t,K,e),s(t,kt,e),m(tt,t,e),s(t,Ft,e),s(t,et,e),s(t,Wt,e),s(t,lt,e),s(t,Vt,e),s(t,st,e),s(t,Rt,e),m(nt,t,e),s(t,Xt,e),s(t,I,e),k(I,It),k(I,Je),k(I,ft),k(I,ye),m(at,I,null),k(I,Te),k(I,Ct),k(I,he),m(ot,I,null),s(t,Ht,e),m(it,t,e),s(t,Yt,e),s(t,Mt,e),s(t,Lt,e),s(t,rt,e),s(t,Dt,e),m(Z,t,e),s(t,Pt,e),s(t,pt,e),s(t,Ot,e),m(ut,t,e),s(t,Kt,e),s(t,ct,e),s(t,te,e),m(mt,t,e),s(t,ee,e),m(Jt,t,e),s(t,le,e),m(yt,t,e),s(t,se,e),s(t,Tt,e),s(t,ne,e),s(t,ht,e),s(t,ae,e),m(z,t,e),s(t,oe,e),m(dt,t,e),s(t,ie,e),s(t,Ut,e),s(t,Me,e),m(_,t,e),s(t,re,e),m(jt,t,e),s(t,pe,e),s(t,gt,e),s(t,ue,e),m(wt,t,e),s(t,ce,e),s(t,qt,e),me=!0},p(t,[e]){const $={};e&2&&($.$$scope={dirty:e,ctx:t}),C.$set($);const _e={};e&2&&(_e.$$scope={dirty:e,ctx:t}),Q.$set(_e);const ke={};e&2&&(ke.$$scope={dirty:e,ctx:t}),Z.$set(ke);const Fe={};e&2&&(Fe.$$scope={dirty:e,ctx:t}),z.$set(Fe);const We={};e&2&&(We.$$scope={dirty:e,ctx:t}),_.$set(We)},i(t){me||(J(d.$$.fragment,t),J(g.$$.fragment,t),J(q.$$.fragment,t),J(C.$$.fragment,t),J(N.$$.fragment,t),J(o.$$.fragment,t),J(Q.$$.fragment,t),J(H.$$.fragment,t),J(D.$$.fragment,t),J(O.$$.fragment,t),J(tt.$$.fragment,t),J(nt.$$.fragment,t),J(at.$$.fragment,t),J(ot.$$.fragment,t),J(it.$$.fragment,t),J(Z.$$.fragment,t),J(ut.$$.fragment,t),J(mt.$$.fragment,t),J(Jt.$$.fragment,t),J(yt.$$.fragment,t),J(z.$$.fragment,t),J(dt.$$.fragment,t),J(_.$$.fragment,t),J(jt.$$.fragment,t),J(wt.$$.fragment,t),me=!0)},o(t){y(d.$$.fragment,t),y(g.$$.fragment,t),y(q.$$.fragment,t),y(C.$$.fragment,t),y(N.$$.fragment,t),y(o.$$.fragment,t),y(Q.$$.fragment,t),y(H.$$.fragment,t),y(D.$$.fragment,t),y(O.$$.fragment,t),y(tt.$$.fragment,t),y(nt.$$.fragment,t),y(at.$$.fragment,t),y(ot.$$.fragment,t),y(it.$$.fragment,t),y(Z.$$.fragment,t),y(ut.$$.fragment,t),y(mt.$$.fragment,t),y(Jt.$$.fragment,t),y(yt.$$.fragment,t),y(z.$$.fragment,t),y(dt.$$.fragment,t),y(_.$$.fragment,t),y(jt.$$.fragment,t),y(wt.$$.fragment,t),me=!1},d(t){t&&(l(i),l(U),l(w),l(f),l(F),l(A),l(x),l(W),l(G),l(E),l(j),l(V),l(Gt),l(R),l(Bt),l(X),l(Nt),l(vt),l(St),l(Y),l(Et),l(L),l(Qt),l(Zt),l(P),l(zt),l(_t),l(K),l(kt),l(Ft),l(et),l(Wt),l(lt),l(Vt),l(st),l(Rt),l(Xt),l(I),l(Ht),l(Yt),l(Mt),l(Lt),l(rt),l(Dt),l(Pt),l(pt),l(Ot),l(Kt),l(ct),l(te),l(ee),l(le),l(se),l(Tt),l(ne),l(ht),l(ae),l(oe),l(ie),l(Ut),l(Me),l(re),l(pe),l(gt),l(ue),l(ce),l(qt)),l(M),T(d,t),T(g,t),T(q,t),T(C,t),T(N,t),T(o,t),T(Q,t),T(H,t),T(D,t),T(O,t),T(tt,t),T(nt,t),T(at),T(ot),T(it,t),T(Z,t),T(ut,t),T(mt,t),T(Jt,t),T(yt,t),T(z,t),T(dt,t),T(_,t),T(jt,t),T(wt,t)}}}const nl='{"title":"Chat Templates","local":"chat-templates","sections":[{"title":"Introduction","local":"introduction","sections":[],"depth":2},{"title":"Model Types and Templates","local":"model-types-and-templates","sections":[{"title":"Base Models vs Instruct Models","local":"base-models-vs-instruct-models","sections":[],"depth":3},{"title":"Common Template Formats","local":"common-template-formats","sections":[],"depth":3},{"title":"Advanced Features","local":"advanced-features","sections":[],"depth":3}],"depth":2},{"title":"Best Practices","local":"best-practices","sections":[{"title":"General Guidelines","local":"general-guidelines","sections":[],"depth":3}],"depth":2},{"title":"Hands-on Exercise","local":"hands-on-exercise","sections":[],"depth":2},{"title":"Additional Resources","local":"additional-resources","sections":[],"depth":2}],"depth":1}';function al(b){return Xe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class cl extends He{constructor(M){super(),Ye(this,M,al,sl,Re,{})}}export{cl as component};
