import{s as Ds,o as Xs,n as z}from"../chunks/scheduler.f6319a2a.js";import{S as qs,i as Ps,g as T,s,r as w,m as Ls,A as Ks,h as M,f as l,c as a,j as H,u as c,x as U,n as zs,k as Rl,y as B,a as t,v as m,d as g,t as h,w as b}from"../chunks/index.85aa684c.js";import{C as Z}from"../chunks/CodeBlock.3400fc53.js";import{D as ea}from"../chunks/DocNotebookDropdown.3fc3604b.js";import{H as Q,E as la}from"../chunks/getInferenceSnippets.0233181f.js";import{H as Ys,a as L}from"../chunks/HfOption.bd631572.js";function ta(F){let i,j="Inference Providers need a <code>HF_TOKEN</code> to authenticate, but a free HF account already comes with included credits. Upgrade to PRO to raise your included credits.",J,u,d='To access gated models or rise your rate limits with a PRO account, you need to set the environment variable <code>HF_TOKEN</code> or pass <code>token</code> variable upon initialization of <code>InferenceClientModel</code>. You can get your token from your <a href="https://huggingface.co/settings/tokens" rel="nofollow">settings page</a>',p,I,k;return I=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIybWV0YS1sbGFtYSUyRkxsYW1hLTMuMy03MEItSW5zdHJ1Y3QlMjIlMEElMEFtb2RlbCUyMCUzRCUyMEluZmVyZW5jZUNsaWVudE1vZGVsKG1vZGVsX2lkJTNEbW9kZWxfaWQlMkMlMjB0b2tlbiUzRCUyMiUzQ1lPVVJfSFVHR0lOR0ZBQ0VIVUJfQVBJX1RPS0VOJTNFJTIyKSUyMCUyMyUyMFlvdSUyMGNhbiUyMGNob29zZSUyMHRvJTIwbm90JTIwcGFzcyUyMGFueSUyMG1vZGVsX2lkJTIwdG8lMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUyMHRvJTIwdXNlJTIwYSUyMGRlZmF1bHQlMjBtb2RlbCUwQSUyMyUyMHlvdSUyMGNhbiUyMGFsc28lMjBzcGVjaWZ5JTIwYSUyMHBhcnRpY3VsYXIlMjBwcm92aWRlciUyMGUuZy4lMjBwcm92aWRlciUzRCUyMnRvZ2V0aGVyJTIyJTIwb3IlMjBwcm92aWRlciUzRCUyMnNhbWJhbm92YSUyMiUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMGFkZF9iYXNlX3Rvb2xzJTNEVHJ1ZSklMEElMEFhZ2VudC5ydW4oJTBBJTIwJTIwJTIwJTIwJTIyQ291bGQlMjB5b3UlMjBnaXZlJTIwbWUlMjB0aGUlMjAxMTh0aCUyMG51bWJlciUyMGluJTIwdGhlJTIwRmlib25hY2NpJTIwc2VxdWVuY2UlM0YlMjIlMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, InferenceClientModel

model_id = <span class="hljs-string">&quot;meta-llama/Llama-3.3-70B-Instruct&quot;</span>

model = InferenceClientModel(model_id=model_id, token=<span class="hljs-string">&quot;&lt;YOUR_HUGGINGFACEHUB_API_TOKEN&gt;&quot;</span>) <span class="hljs-comment"># You can choose to not pass any model_id to InferenceClientModel to use a default model</span>
<span class="hljs-comment"># you can also specify a particular provider e.g. provider=&quot;together&quot; or provider=&quot;sambanova&quot;</span>
agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)

agent.run(
    <span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>,
)`,wrap:!1}}),{c(){i=T("p"),i.innerHTML=j,J=s(),u=T("p"),u.innerHTML=d,p=s(),w(I.$$.fragment)},l(r){i=M(r,"P",{"data-svelte-h":!0}),U(i)!=="svelte-1wdptq1"&&(i.innerHTML=j),J=a(r),u=M(r,"P",{"data-svelte-h":!0}),U(u)!=="svelte-bsbjyv"&&(u.innerHTML=d),p=a(r),c(I.$$.fragment,r)},m(r,v){t(r,i,v),t(r,J,v),t(r,u,v),t(r,p,v),m(I,r,v),k=!0},p:z,i(r){k||(g(I.$$.fragment,r),k=!0)},o(r){h(I.$$.fragment,r),k=!1},d(r){r&&(l(i),l(J),l(u),l(p)),b(I,r)}}}function na(F){let i,j;return i=new Z({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjAnc21vbGFnZW50cyU1QnRyYW5zZm9ybWVycyU1RCclMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMENvZGVBZ2VudCUyQyUyMFRyYW5zZm9ybWVyc01vZGVsJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJtZXRhLWxsYW1hJTJGTGxhbWEtMy4yLTNCLUluc3RydWN0JTIyJTBBJTBBbW9kZWwlMjAlM0QlMjBUcmFuc2Zvcm1lcnNNb2RlbChtb2RlbF9pZCUzRG1vZGVsX2lkKSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMGFkZF9iYXNlX3Rvb2xzJTNEVHJ1ZSklMEElMEFhZ2VudC5ydW4oJTBBJTIwJTIwJTIwJTIwJTIyQ291bGQlMjB5b3UlMjBnaXZlJTIwbWUlMjB0aGUlMjAxMTh0aCUyMG51bWJlciUyMGluJTIwdGhlJTIwRmlib25hY2NpJTIwc2VxdWVuY2UlM0YlMjIlMkMlMEEp",highlighted:`<span class="hljs-comment"># !pip install &#x27;smolagents[transformers]&#x27;</span>
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, TransformersModel

model_id = <span class="hljs-string">&quot;meta-llama/Llama-3.2-3B-Instruct&quot;</span>

model = TransformersModel(model_id=model_id)
agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)

agent.run(
    <span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>,
)`,wrap:!1}}),{c(){w(i.$$.fragment)},l(J){c(i.$$.fragment,J)},m(J,u){m(i,J,u),j=!0},p:z,i(J){j||(g(i.$$.fragment,J),j=!0)},o(J){h(i.$$.fragment,J),j=!1},d(J){b(i,J)}}}function sa(F){let i,j="To use <code>LiteLLMModel</code>, you need to set the environment variable <code>ANTHROPIC_API_KEY</code> or <code>OPENAI_API_KEY</code>, or pass <code>api_key</code> variable upon initialization.",J,u,d;return u=new Z({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjAnc21vbGFnZW50cyU1QmxpdGVsbG0lNUQnJTBBZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBMaXRlTExNTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMExpdGVMTE1Nb2RlbChtb2RlbF9pZCUzRCUyMmFudGhyb3BpYyUyRmNsYXVkZS0zLTUtc29ubmV0LWxhdGVzdCUyMiUyQyUyMGFwaV9rZXklM0QlMjJZT1VSX0FOVEhST1BJQ19BUElfS0VZJTIyKSUyMCUyMyUyMENvdWxkJTIwdXNlJTIwJ2dwdC00byclMEFhZ2VudCUyMCUzRCUyMENvZGVBZ2VudCh0b29scyUzRCU1QiU1RCUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjBhZGRfYmFzZV90b29scyUzRFRydWUpJTBBJTBBYWdlbnQucnVuKCUwQSUyMCUyMCUyMCUyMCUyMkNvdWxkJTIweW91JTIwZ2l2ZSUyMG1lJTIwdGhlJTIwMTE4dGglMjBudW1iZXIlMjBpbiUyMHRoZSUyMEZpYm9uYWNjaSUyMHNlcXVlbmNlJTNGJTIyJTJDJTBBKQ==",highlighted:`<span class="hljs-comment"># !pip install &#x27;smolagents[litellm]&#x27;</span>
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, LiteLLMModel

model = LiteLLMModel(model_id=<span class="hljs-string">&quot;anthropic/claude-3-5-sonnet-latest&quot;</span>, api_key=<span class="hljs-string">&quot;YOUR_ANTHROPIC_API_KEY&quot;</span>) <span class="hljs-comment"># Could use &#x27;gpt-4o&#x27;</span>
agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)

agent.run(
    <span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>,
)`,wrap:!1}}),{c(){i=T("p"),i.innerHTML=j,J=s(),w(u.$$.fragment)},l(p){i=M(p,"P",{"data-svelte-h":!0}),U(i)!=="svelte-1iplh0r"&&(i.innerHTML=j),J=a(p),c(u.$$.fragment,p)},m(p,I){t(p,i,I),t(p,J,I),m(u,p,I),d=!0},p:z,i(p){d||(g(u.$$.fragment,p),d=!0)},o(p){h(u.$$.fragment,p),d=!1},d(p){p&&(l(i),l(J)),b(u,p)}}}function aa(F){let i,j;return i=new Z({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjAnc21vbGFnZW50cyU1QmxpdGVsbG0lNUQnJTBBZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBMaXRlTExNTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMExpdGVMTE1Nb2RlbCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCUyMm9sbGFtYV9jaGF0JTJGbGxhbWEzLjIlMjIlMkMlMjAlMjMlMjBUaGlzJTIwbW9kZWwlMjBpcyUyMGElMjBiaXQlMjB3ZWFrJTIwZm9yJTIwYWdlbnRpYyUyMGJlaGF2aW91cnMlMjB0aG91Z2glMEElMjAlMjAlMjAlMjBhcGlfYmFzZSUzRCUyMmh0dHAlM0ElMkYlMkZsb2NhbGhvc3QlM0ExMTQzNCUyMiUyQyUyMCUyMyUyMHJlcGxhY2UlMjB3aXRoJTIwMTI3LjAuMC4xJTNBMTE0MzQlMjBvciUyMHJlbW90ZSUyMG9wZW4tYWklMjBjb21wYXRpYmxlJTIwc2VydmVyJTIwaWYlMjBuZWNlc3NhcnklMEElMjAlMjAlMjAlMjBhcGlfa2V5JTNEJTIyWU9VUl9BUElfS0VZJTIyJTJDJTIwJTIzJTIwcmVwbGFjZSUyMHdpdGglMjBBUEklMjBrZXklMjBpZiUyMG5lY2Vzc2FyeSUwQSUyMCUyMCUyMCUyMG51bV9jdHglM0Q4MTkyJTJDJTIwJTIzJTIwb2xsYW1hJTIwZGVmYXVsdCUyMGlzJTIwMjA0OCUyMHdoaWNoJTIwd2lsbCUyMGZhaWwlMjBob3JyaWJseS4lMjA4MTkyJTIwd29ya3MlMjBmb3IlMjBlYXN5JTIwdGFza3MlMkMlMjBtb3JlJTIwaXMlMjBiZXR0ZXIuJTIwQ2hlY2slMjBodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3BhY2VzJTJGTnl4S3JhZ2UlMkZMTE0tTW9kZWwtVlJBTS1DYWxjdWxhdG9yJTIwdG8lMjBjYWxjdWxhdGUlMjBob3clMjBtdWNoJTIwVlJBTSUyMHRoaXMlMjB3aWxsJTIwbmVlZCUyMGZvciUyMHRoZSUyMHNlbGVjdGVkJTIwbW9kZWwuJTBBKSUwQSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMGFkZF9iYXNlX3Rvb2xzJTNEVHJ1ZSklMEElMEFhZ2VudC5ydW4oJTBBJTIwJTIwJTIwJTIwJTIyQ291bGQlMjB5b3UlMjBnaXZlJTIwbWUlMjB0aGUlMjAxMTh0aCUyMG51bWJlciUyMGluJTIwdGhlJTIwRmlib25hY2NpJTIwc2VxdWVuY2UlM0YlMjIlMkMlMEEp",highlighted:`<span class="hljs-comment"># !pip install &#x27;smolagents[litellm]&#x27;</span>
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, LiteLLMModel

model = LiteLLMModel(
    model_id=<span class="hljs-string">&quot;ollama_chat/llama3.2&quot;</span>, <span class="hljs-comment"># This model is a bit weak for agentic behaviours though</span>
    api_base=<span class="hljs-string">&quot;http://localhost:11434&quot;</span>, <span class="hljs-comment"># replace with 127.0.0.1:11434 or remote open-ai compatible server if necessary</span>
    api_key=<span class="hljs-string">&quot;YOUR_API_KEY&quot;</span>, <span class="hljs-comment"># replace with API key if necessary</span>
    num_ctx=<span class="hljs-number">8192</span>, <span class="hljs-comment"># ollama default is 2048 which will fail horribly. 8192 works for easy tasks, more is better. Check https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator to calculate how much VRAM this will need for the selected model.</span>
)

agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)

agent.run(
    <span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>,
)`,wrap:!1}}),{c(){w(i.$$.fragment)},l(J){c(i.$$.fragment,J)},m(J,u){m(i,J,u),j=!0},p:z,i(J){j||(g(i.$$.fragment,J),j=!0)},o(J){h(i.$$.fragment,J),j=!1},d(J){b(i,J)}}}function oa(F){let i,j="To connect to Azure OpenAI, you can either use <code>AzureOpenAIServerModel</code> directly, or use <code>LiteLLMModel</code> and configure it accordingly.",J,u,d="To initialize an instance of <code>AzureOpenAIServerModel</code>, you need to pass your model deployment name and then either pass the <code>azure_endpoint</code>, <code>api_key</code>, and <code>api_version</code> arguments, or set the environment variables <code>AZURE_OPENAI_ENDPOINT</code>, <code>AZURE_OPENAI_API_KEY</code>, and <code>OPENAI_API_VERSION</code>.",p,I,k,r,v="Similarly, you can configure <code>LiteLLMModel</code> to connect to Azure OpenAI as follows:",V,A,E="<li>pass your model deployment name as <code>model_id</code>, and make sure to prefix it with <code>azure/</code></li> <li>make sure to set the environment variable <code>AZURE_API_VERSION</code></li> <li>either pass the <code>api_base</code> and <code>api_key</code> arguments, or set the environment variables <code>AZURE_API_KEY</code>, and <code>AZURE_API_BASE</code></li>",R,o,f;return I=new Z({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjAnc21vbGFnZW50cyU1Qm9wZW5haSU1RCclMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMENvZGVBZ2VudCUyQyUyMEF6dXJlT3BlbkFJU2VydmVyTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEF6dXJlT3BlbkFJU2VydmVyTW9kZWwobW9kZWxfaWQlM0QlMjJncHQtNG8tbWluaSUyMiklMEFhZ2VudCUyMCUzRCUyMENvZGVBZ2VudCh0b29scyUzRCU1QiU1RCUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjBhZGRfYmFzZV90b29scyUzRFRydWUpJTBBJTBBYWdlbnQucnVuKCUwQSUyMCUyMCUyMCUyMCUyMkNvdWxkJTIweW91JTIwZ2l2ZSUyMG1lJTIwdGhlJTIwMTE4dGglMjBudW1iZXIlMjBpbiUyMHRoZSUyMEZpYm9uYWNjaSUyMHNlcXVlbmNlJTNGJTIyJTJDJTBBKQ==",highlighted:`<span class="hljs-comment"># !pip install &#x27;smolagents[openai]&#x27;</span>
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, AzureOpenAIServerModel

model = AzureOpenAIServerModel(model_id=<span class="hljs-string">&quot;gpt-4o-mini&quot;</span>)
agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)

agent.run(
    <span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>,
)`,wrap:!1}}),o=new Z({props:{code:"aW1wb3J0JTIwb3MlMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMENvZGVBZ2VudCUyQyUyMExpdGVMTE1Nb2RlbCUwQSUwQUFaVVJFX09QRU5BSV9DSEFUX0RFUExPWU1FTlRfTkFNRSUzRCUyMmdwdC0zNS10dXJiby0xNmstZGVwbG95bWVudCUyMiUyMCUyMyUyMGV4YW1wbGUlMjBvZiUyMGRlcGxveW1lbnQlMjBuYW1lJTBBJTBBb3MuZW52aXJvbiU1QiUyMkFaVVJFX0FQSV9LRVklMjIlNUQlMjAlM0QlMjAlMjIlMjIlMjAlMjMlMjBhcGlfa2V5JTBBb3MuZW52aXJvbiU1QiUyMkFaVVJFX0FQSV9CQVNFJTIyJTVEJTIwJTNEJTIwJTIyJTIyJTIwJTIzJTIwJTIyaHR0cHMlM0ElMkYlMkZleGFtcGxlLWVuZHBvaW50Lm9wZW5haS5henVyZS5jb20lMjIlMEFvcy5lbnZpcm9uJTVCJTIyQVpVUkVfQVBJX1ZFUlNJT04lMjIlNUQlMjAlM0QlMjAlMjIlMjIlMjAlMjMlMjAlMjIyMDI0LTEwLTAxLXByZXZpZXclMjIlMEElMEFtb2RlbCUyMCUzRCUyMExpdGVMTE1Nb2RlbChtb2RlbF9pZCUzRCUyMmF6dXJlJTJGJTIyJTIwJTJCJTIwQVpVUkVfT1BFTkFJX0NIQVRfREVQTE9ZTUVOVF9OQU1FKSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMGFkZF9iYXNlX3Rvb2xzJTNEVHJ1ZSklMEElMEFhZ2VudC5ydW4oJTBBJTIwJTIwJTIwJTIyQ291bGQlMjB5b3UlMjBnaXZlJTIwbWUlMjB0aGUlMjAxMTh0aCUyMG51bWJlciUyMGluJTIwdGhlJTIwRmlib25hY2NpJTIwc2VxdWVuY2UlM0YlMjIlMkMlMEEp",highlighted:`<span class="hljs-keyword">import</span> os
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, LiteLLMModel

AZURE_OPENAI_CHAT_DEPLOYMENT_NAME=<span class="hljs-string">&quot;gpt-35-turbo-16k-deployment&quot;</span> <span class="hljs-comment"># example of deployment name</span>

os.environ[<span class="hljs-string">&quot;AZURE_API_KEY&quot;</span>] = <span class="hljs-string">&quot;&quot;</span> <span class="hljs-comment"># api_key</span>
os.environ[<span class="hljs-string">&quot;AZURE_API_BASE&quot;</span>] = <span class="hljs-string">&quot;&quot;</span> <span class="hljs-comment"># &quot;https://example-endpoint.openai.azure.com&quot;</span>
os.environ[<span class="hljs-string">&quot;AZURE_API_VERSION&quot;</span>] = <span class="hljs-string">&quot;&quot;</span> <span class="hljs-comment"># &quot;2024-10-01-preview&quot;</span>

model = LiteLLMModel(model_id=<span class="hljs-string">&quot;azure/&quot;</span> + AZURE_OPENAI_CHAT_DEPLOYMENT_NAME)
agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)

agent.run(
   <span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>,
)`,wrap:!1}}),{c(){i=T("p"),i.innerHTML=j,J=s(),u=T("p"),u.innerHTML=d,p=s(),w(I.$$.fragment),k=s(),r=T("p"),r.innerHTML=v,V=s(),A=T("ul"),A.innerHTML=E,R=s(),w(o.$$.fragment)},l(C){i=M(C,"P",{"data-svelte-h":!0}),U(i)!=="svelte-1hxxlnu"&&(i.innerHTML=j),J=a(C),u=M(C,"P",{"data-svelte-h":!0}),U(u)!=="svelte-1q2js0j"&&(u.innerHTML=d),p=a(C),c(I.$$.fragment,C),k=a(C),r=M(C,"P",{"data-svelte-h":!0}),U(r)!=="svelte-116rusl"&&(r.innerHTML=v),V=a(C),A=M(C,"UL",{"data-svelte-h":!0}),U(A)!=="svelte-1nzt61u"&&(A.innerHTML=E),R=a(C),c(o.$$.fragment,C)},m(C,$){t(C,i,$),t(C,J,$),t(C,u,$),t(C,p,$),m(I,C,$),t(C,k,$),t(C,r,$),t(C,V,$),t(C,A,$),t(C,R,$),m(o,C,$),f=!0},p:z,i(C){f||(g(I.$$.fragment,C),g(o.$$.fragment,C),f=!0)},o(C){h(I.$$.fragment,C),h(o.$$.fragment,C),f=!1},d(C){C&&(l(i),l(J),l(u),l(p),l(k),l(r),l(V),l(A),l(R)),b(I,C),b(o,C)}}}function ia(F){let i,j="The <code>AmazonBedrockServerModel</code> class provides native integration with Amazon Bedrock, allowing for direct API calls and comprehensive configuration.",J,u,d="Basic Usage:",p,I,k,r,v="Advanced Configuration:",V,A,E,R,o="Using LiteLLMModel:",f,C,$="Alternatively, you can use <code>LiteLLMModel</code> with Bedrock models:",W,G,x;return I=new Z({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjAnc21vbGFnZW50cyU1QmJlZHJvY2slNUQnJTBBZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBBbWF6b25CZWRyb2NrU2VydmVyTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEFtYXpvbkJlZHJvY2tTZXJ2ZXJNb2RlbChtb2RlbF9pZCUzRCUyMmFudGhyb3BpYy5jbGF1ZGUtMy1zb25uZXQtMjAyNDAyMjktdjElM0EwJTIyKSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMGFkZF9iYXNlX3Rvb2xzJTNEVHJ1ZSklMEElMEFhZ2VudC5ydW4oJTBBJTIwJTIwJTIwJTIwJTIyQ291bGQlMjB5b3UlMjBnaXZlJTIwbWUlMjB0aGUlMjAxMTh0aCUyMG51bWJlciUyMGluJTIwdGhlJTIwRmlib25hY2NpJTIwc2VxdWVuY2UlM0YlMjIlMkMlMEEp",highlighted:`<span class="hljs-comment"># !pip install &#x27;smolagents[bedrock]&#x27;</span>
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, AmazonBedrockServerModel

model = AmazonBedrockServerModel(model_id=<span class="hljs-string">&quot;anthropic.claude-3-sonnet-20240229-v1:0&quot;</span>)
agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)

agent.run(
    <span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>,
)`,wrap:!1}}),A=new Z({props:{code:"aW1wb3J0JTIwYm90bzMlMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMEFtYXpvbkJlZHJvY2tTZXJ2ZXJNb2RlbCUwQSUwQSUyMyUyMENyZWF0ZSUyMGElMjBjdXN0b20lMjBCZWRyb2NrJTIwY2xpZW50JTBBYmVkcm9ja19jbGllbnQlMjAlM0QlMjBib3RvMy5jbGllbnQoJTBBJTIwJTIwJTIwJTIwJ2JlZHJvY2stcnVudGltZSclMkMlMEElMjAlMjAlMjAlMjByZWdpb25fbmFtZSUzRCd1cy1lYXN0LTEnJTJDJTBBJTIwJTIwJTIwJTIwYXdzX2FjY2Vzc19rZXlfaWQlM0QnWU9VUl9BQ0NFU1NfS0VZJyUyQyUwQSUyMCUyMCUyMCUyMGF3c19zZWNyZXRfYWNjZXNzX2tleSUzRCdZT1VSX1NFQ1JFVF9LRVknJTBBKSUwQSUwQWFkZGl0aW9uYWxfYXBpX2NvbmZpZyUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMmluZmVyZW5jZUNvbmZpZyUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMm1heFRva2VucyUyMiUzQSUyMDMwMDAlMEElMjAlMjAlMjAlMjAlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjJndWFyZHJhaWxDb25maWclMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJndWFyZHJhaWxJZGVudGlmaWVyJTIyJTNBJTIwJTIyaWRlbnRpZnkxJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyZ3VhcmRyYWlsVmVyc2lvbiUyMiUzQSUyMCd2MSclMEElMjAlMjAlMjAlMjAlN0QlMkMlMEElN0QlMEElMEElMjMlMjBJbml0aWFsaXplJTIwd2l0aCUyMGNvbXByZWhlbnNpdmUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBBbWF6b25CZWRyb2NrU2VydmVyTW9kZWwoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlM0QlMjJ1cy5hbWF6b24ubm92YS1wcm8tdjElM0EwJTIyJTJDJTBBJTIwJTIwJTIwJTIwY2xpZW50JTNEYmVkcm9ja19jbGllbnQlMkMlMjAlMjAlMjMlMjBVc2UlMjBjdXN0b20lMjBjbGllbnQlMEElMjAlMjAlMjAlMjAqKmFkZGl0aW9uYWxfYXBpX2NvbmZpZyUwQSklMEElMEFhZ2VudCUyMCUzRCUyMENvZGVBZ2VudCh0b29scyUzRCU1QiU1RCUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjBhZGRfYmFzZV90b29scyUzRFRydWUpJTBBJTBBYWdlbnQucnVuKCUwQSUyMCUyMCUyMCUyMCUyMkNvdWxkJTIweW91JTIwZ2l2ZSUyMG1lJTIwdGhlJTIwMTE4dGglMjBudW1iZXIlMjBpbiUyMHRoZSUyMEZpYm9uYWNjaSUyMHNlcXVlbmNlJTNGJTIyJTJDJTBBKQ==",highlighted:`<span class="hljs-keyword">import</span> boto3
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> AmazonBedrockServerModel

<span class="hljs-comment"># Create a custom Bedrock client</span>
bedrock_client = boto3.client(
    <span class="hljs-string">&#x27;bedrock-runtime&#x27;</span>,
    region_name=<span class="hljs-string">&#x27;us-east-1&#x27;</span>,
    aws_access_key_id=<span class="hljs-string">&#x27;YOUR_ACCESS_KEY&#x27;</span>,
    aws_secret_access_key=<span class="hljs-string">&#x27;YOUR_SECRET_KEY&#x27;</span>
)

additional_api_config = {
    <span class="hljs-string">&quot;inferenceConfig&quot;</span>: {
        <span class="hljs-string">&quot;maxTokens&quot;</span>: <span class="hljs-number">3000</span>
    },
    <span class="hljs-string">&quot;guardrailConfig&quot;</span>: {
        <span class="hljs-string">&quot;guardrailIdentifier&quot;</span>: <span class="hljs-string">&quot;identify1&quot;</span>,
        <span class="hljs-string">&quot;guardrailVersion&quot;</span>: <span class="hljs-string">&#x27;v1&#x27;</span>
    },
}

<span class="hljs-comment"># Initialize with comprehensive configuration</span>
model = AmazonBedrockServerModel(
    model_id=<span class="hljs-string">&quot;us.amazon.nova-pro-v1:0&quot;</span>,
    client=bedrock_client,  <span class="hljs-comment"># Use custom client</span>
    **additional_api_config
)

agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)

agent.run(
    <span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>,
)`,wrap:!1}}),G=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBMaXRlTExNTW9kZWwlMkMlMjBDb2RlQWdlbnQlMEElMEFtb2RlbCUyMCUzRCUyMExpdGVMTE1Nb2RlbChtb2RlbF9uYW1lJTNEJTIyYmVkcm9jayUyRmFudGhyb3BpYy5jbGF1ZGUtMy1zb25uZXQtMjAyNDAyMjktdjElM0EwJTIyKSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0Rtb2RlbCklMEElMEFhZ2VudC5ydW4oJTIyRXhwbGFpbiUyMHRoZSUyMGNvbmNlcHQlMjBvZiUyMHF1YW50dW0lMjBjb21wdXRpbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> LiteLLMModel, CodeAgent

model = LiteLLMModel(model_name=<span class="hljs-string">&quot;bedrock/anthropic.claude-3-sonnet-20240229-v1:0&quot;</span>)
agent = CodeAgent(tools=[], model=model)

agent.run(<span class="hljs-string">&quot;Explain the concept of quantum computing&quot;</span>)`,wrap:!1}}),{c(){i=T("p"),i.innerHTML=j,J=s(),u=T("p"),u.textContent=d,p=s(),w(I.$$.fragment),k=s(),r=T("p"),r.textContent=v,V=s(),w(A.$$.fragment),E=s(),R=T("p"),R.textContent=o,f=s(),C=T("p"),C.innerHTML=$,W=s(),w(G.$$.fragment)},l(y){i=M(y,"P",{"data-svelte-h":!0}),U(i)!=="svelte-1t09vg6"&&(i.innerHTML=j),J=a(y),u=M(y,"P",{"data-svelte-h":!0}),U(u)!=="svelte-16zanz3"&&(u.textContent=d),p=a(y),c(I.$$.fragment,y),k=a(y),r=M(y,"P",{"data-svelte-h":!0}),U(r)!=="svelte-e5fqn2"&&(r.textContent=v),V=a(y),c(A.$$.fragment,y),E=a(y),R=M(y,"P",{"data-svelte-h":!0}),U(R)!=="svelte-121tojm"&&(R.textContent=o),f=a(y),C=M(y,"P",{"data-svelte-h":!0}),U(C)!=="svelte-zwun4n"&&(C.innerHTML=$),W=a(y),c(G.$$.fragment,y)},m(y,N){t(y,i,N),t(y,J,N),t(y,u,N),t(y,p,N),m(I,y,N),t(y,k,N),t(y,r,N),t(y,V,N),m(A,y,N),t(y,E,N),t(y,R,N),t(y,f,N),t(y,C,N),t(y,W,N),m(G,y,N),x=!0},p:z,i(y){x||(g(I.$$.fragment,y),g(A.$$.fragment,y),g(G.$$.fragment,y),x=!0)},o(y){h(I.$$.fragment,y),h(A.$$.fragment,y),h(G.$$.fragment,y),x=!1},d(y){y&&(l(i),l(J),l(u),l(p),l(k),l(r),l(V),l(E),l(R),l(f),l(C),l(W)),b(I,y),b(A,y),b(G,y)}}}function Ta(F){let i,j;return i=new Z({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjAnc21vbGFnZW50cyU1Qm1seC1sbSU1RCclMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMENvZGVBZ2VudCUyQyUyME1MWE1vZGVsJTBBJTBBbWx4X21vZGVsJTIwJTNEJTIwTUxYTW9kZWwoJTIybWx4LWNvbW11bml0eSUyRlF3ZW4yLjUtQ29kZXItMzJCLUluc3RydWN0LTRiaXQlMjIpJTBBYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQobW9kZWwlM0RtbHhfbW9kZWwlMkMlMjB0b29scyUzRCU1QiU1RCUyQyUyMGFkZF9iYXNlX3Rvb2xzJTNEVHJ1ZSklMEElMEFhZ2VudC5ydW4oJTIyQ291bGQlMjB5b3UlMjBnaXZlJTIwbWUlMjB0aGUlMjAxMTh0aCUyMG51bWJlciUyMGluJTIwdGhlJTIwRmlib25hY2NpJTIwc2VxdWVuY2UlM0YlMjIp",highlighted:`<span class="hljs-comment"># !pip install &#x27;smolagents[mlx-lm]&#x27;</span>
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, MLXModel

mlx_model = MLXModel(<span class="hljs-string">&quot;mlx-community/Qwen2.5-Coder-32B-Instruct-4bit&quot;</span>)
agent = CodeAgent(model=mlx_model, tools=[], add_base_tools=<span class="hljs-literal">True</span>)

agent.run(<span class="hljs-string">&quot;Could you give me the 118th number in the Fibonacci sequence?&quot;</span>)`,wrap:!1}}),{c(){w(i.$$.fragment)},l(J){c(i.$$.fragment,J)},m(J,u){m(i,J,u),j=!0},p:z,i(J){j||(g(i.$$.fragment,J),j=!0)},o(J){h(i.$$.fragment,J),j=!1},d(J){b(i,J)}}}function Ma(F){let i,j,J,u,d,p,I,k,r,v,V,A,E,R;return i=new L({props:{id:"Pick a LLM",option:"Inference Providers",$$slots:{default:[ta]},$$scope:{ctx:F}}}),J=new L({props:{id:"Pick a LLM",option:"Local Transformers Model",$$slots:{default:[na]},$$scope:{ctx:F}}}),d=new L({props:{id:"Pick a LLM",option:"OpenAI or Anthropic API",$$slots:{default:[sa]},$$scope:{ctx:F}}}),I=new L({props:{id:"Pick a LLM",option:"Ollama",$$slots:{default:[aa]},$$scope:{ctx:F}}}),r=new L({props:{id:"Pick a LLM",option:"Azure OpenAI",$$slots:{default:[oa]},$$scope:{ctx:F}}}),V=new L({props:{id:"Pick a LLM",option:"Amazon Bedrock",$$slots:{default:[ia]},$$scope:{ctx:F}}}),E=new L({props:{id:"Pick a LLM",option:"mlx-lm",$$slots:{default:[Ta]},$$scope:{ctx:F}}}),{c(){w(i.$$.fragment),j=s(),w(J.$$.fragment),u=s(),w(d.$$.fragment),p=s(),w(I.$$.fragment),k=s(),w(r.$$.fragment),v=s(),w(V.$$.fragment),A=s(),w(E.$$.fragment)},l(o){c(i.$$.fragment,o),j=a(o),c(J.$$.fragment,o),u=a(o),c(d.$$.fragment,o),p=a(o),c(I.$$.fragment,o),k=a(o),c(r.$$.fragment,o),v=a(o),c(V.$$.fragment,o),A=a(o),c(E.$$.fragment,o)},m(o,f){m(i,o,f),t(o,j,f),m(J,o,f),t(o,u,f),m(d,o,f),t(o,p,f),m(I,o,f),t(o,k,f),m(r,o,f),t(o,v,f),m(V,o,f),t(o,A,f),m(E,o,f),R=!0},p(o,f){const C={};f&2&&(C.$$scope={dirty:f,ctx:o}),i.$set(C);const $={};f&2&&($.$$scope={dirty:f,ctx:o}),J.$set($);const W={};f&2&&(W.$$scope={dirty:f,ctx:o}),d.$set(W);const G={};f&2&&(G.$$scope={dirty:f,ctx:o}),I.$set(G);const x={};f&2&&(x.$$scope={dirty:f,ctx:o}),r.$set(x);const y={};f&2&&(y.$$scope={dirty:f,ctx:o}),V.$set(y);const N={};f&2&&(N.$$scope={dirty:f,ctx:o}),E.$set(N)},i(o){R||(g(i.$$.fragment,o),g(J.$$.fragment,o),g(d.$$.fragment,o),g(I.$$.fragment,o),g(r.$$.fragment,o),g(V.$$.fragment,o),g(E.$$.fragment,o),R=!0)},o(o){h(i.$$.fragment,o),h(J.$$.fragment,o),h(d.$$.fragment,o),h(I.$$.fragment,o),h(r.$$.fragment,o),h(V.$$.fragment,o),h(E.$$.fragment,o),R=!1},d(o){o&&(l(j),l(u),l(p),l(k),l(v),l(A)),b(i,o),b(J,o),b(d,o),b(I,o),b(r,o),b(V,o),b(E,o)}}}function Ja(F){let i,j,J,u="The function needs:",d,p,I="<li>A clear name. The name should be descriptive enough of what this tool does to help the LLM brain powering the agent. Since this tool returns the model with the most downloads for a task, let’s name it <code>model_download_tool</code>.</li> <li>Type hints on both inputs and output</li> <li>A description, that includes an ‘Args:’ part where each argument is described (without a type indication this time, it will be pulled from the type hint). Same as for the tool name, this description is an instruction manual for the LLM powering your agent, so do not neglect it.</li>",k,r,v="All these elements will be automatically baked into the agent’s system prompt upon initialization: so strive to make them as clear as possible!",V,A,E='<p>This definition format is the same as tool schemas used in <code>apply_chat_template</code>, the only difference is the added <code>tool</code> decorator: read more on our tool use API <a href="https://huggingface.co/blog/unified-tool-use#passing-tools-to-a-chat-template" rel="nofollow">here</a>.</p>',R;return i=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjB0b29sJTBBJTBBJTQwdG9vbCUwQWRlZiUyMG1vZGVsX2Rvd25sb2FkX3Rvb2wodGFzayUzQSUyMHN0ciklMjAtJTNFJTIwc3RyJTNBJTBBJTIwJTIwJTIwJTIwJTIyJTIyJTIyJTBBJTIwJTIwJTIwJTIwVGhpcyUyMGlzJTIwYSUyMHRvb2wlMjB0aGF0JTIwcmV0dXJucyUyMHRoZSUyMG1vc3QlMjBkb3dubG9hZGVkJTIwbW9kZWwlMjBvZiUyMGElMjBnaXZlbiUyMHRhc2slMjBvbiUyMHRoZSUyMEh1Z2dpbmclMjBGYWNlJTIwSHViLiUwQSUyMCUyMCUyMCUyMEl0JTIwcmV0dXJucyUyMHRoZSUyMG5hbWUlMjBvZiUyMHRoZSUyMGNoZWNrcG9pbnQuJTBBJTBBJTIwJTIwJTIwJTIwQXJncyUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHRhc2slM0ElMjBUaGUlMjB0YXNrJTIwZm9yJTIwd2hpY2glMjB0byUyMGdldCUyMHRoZSUyMGRvd25sb2FkJTIwY291bnQuJTBBJTIwJTIwJTIwJTIwJTIyJTIyJTIyJTBBJTIwJTIwJTIwJTIwbW9zdF9kb3dubG9hZGVkX21vZGVsJTIwJTNEJTIwbmV4dChpdGVyKGxpc3RfbW9kZWxzKGZpbHRlciUzRHRhc2slMkMlMjBzb3J0JTNEJTIyZG93bmxvYWRzJTIyJTJDJTIwZGlyZWN0aW9uJTNELTEpKSklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBtb3N0X2Rvd25sb2FkZWRfbW9kZWwuaWQ=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> tool

<span class="hljs-meta">@tool</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">model_download_tool</span>(<span class="hljs-params">task: <span class="hljs-built_in">str</span></span>) -&gt; <span class="hljs-built_in">str</span>:
    <span class="hljs-string">&quot;&quot;&quot;
    This is a tool that returns the most downloaded model of a given task on the Hugging Face Hub.
    It returns the name of the checkpoint.

    Args:
        task: The task for which to get the download count.
    &quot;&quot;&quot;</span>
    most_downloaded_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> most_downloaded_model.<span class="hljs-built_in">id</span>`,wrap:!1}}),{c(){w(i.$$.fragment),j=s(),J=T("p"),J.textContent=u,d=s(),p=T("ul"),p.innerHTML=I,k=s(),r=T("p"),r.textContent=v,V=s(),A=T("blockquote"),A.innerHTML=E,this.h()},l(o){c(i.$$.fragment,o),j=a(o),J=M(o,"P",{"data-svelte-h":!0}),U(J)!=="svelte-10btble"&&(J.textContent=u),d=a(o),p=M(o,"UL",{"data-svelte-h":!0}),U(p)!=="svelte-1uouvtx"&&(p.innerHTML=I),k=a(o),r=M(o,"P",{"data-svelte-h":!0}),U(r)!=="svelte-1prqddm"&&(r.textContent=v),V=a(o),A=M(o,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(A)!=="svelte-1262wle"&&(A.innerHTML=E),this.h()},h(){Rl(A,"class","tip")},m(o,f){m(i,o,f),t(o,j,f),t(o,J,f),t(o,d,f),t(o,p,f),t(o,k,f),t(o,r,f),t(o,V,f),t(o,A,f),R=!0},p:z,i(o){R||(g(i.$$.fragment,o),R=!0)},o(o){h(i.$$.fragment,o),R=!1},d(o){o&&(l(j),l(J),l(d),l(p),l(k),l(r),l(V),l(A)),b(i,o)}}}function Ua(F){let i,j,J,u="The subclass needs the following attributes:",d,p,I=`<li>A clear <code>name</code>. The name should be descriptive enough of what this tool does to help the LLM brain powering the agent. Since this tool returns the model with the most downloads for a task, let’s name it <code>model_download_tool</code>.</li> <li>A <code>description</code>. Same as for the <code>name</code>, this description is an instruction manual for the LLM powering your agent, so do not neglect it.</li> <li>Input types and descriptions</li> <li>Output type
All these attributes will be automatically baked into the agent’s system prompt upon initialization: so strive to make them as clear as possible!</li>`,k;return i=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBUb29sJTBBJTBBY2xhc3MlMjBNb2RlbERvd25sb2FkVG9vbChUb29sKSUzQSUwQSUyMCUyMCUyMCUyMG5hbWUlMjAlM0QlMjAlMjJtb2RlbF9kb3dubG9hZF90b29sJTIyJTBBJTIwJTIwJTIwJTIwZGVzY3JpcHRpb24lMjAlM0QlMjAlMjJUaGlzJTIwaXMlMjBhJTIwdG9vbCUyMHRoYXQlMjByZXR1cm5zJTIwdGhlJTIwbW9zdCUyMGRvd25sb2FkZWQlMjBtb2RlbCUyMG9mJTIwYSUyMGdpdmVuJTIwdGFzayUyMG9uJTIwdGhlJTIwSHVnZ2luZyUyMEZhY2UlMjBIdWIuJTIwSXQlMjByZXR1cm5zJTIwdGhlJTIwbmFtZSUyMG9mJTIwdGhlJTIwY2hlY2twb2ludC4lMjIlMEElMjAlMjAlMjAlMjBpbnB1dHMlMjAlM0QlMjAlN0IlMjJ0YXNrJTIyJTNBJTIwJTdCJTIydHlwZSUyMiUzQSUyMCUyMnN0cmluZyUyMiUyQyUyMCUyMmRlc2NyaXB0aW9uJTIyJTNBJTIwJTIyVGhlJTIwdGFzayUyMGZvciUyMHdoaWNoJTIwdG8lMjBnZXQlMjB0aGUlMjBkb3dubG9hZCUyMGNvdW50LiUyMiU3RCU3RCUwQSUyMCUyMCUyMCUyMG91dHB1dF90eXBlJTIwJTNEJTIwJTIyc3RyaW5nJTIyJTBBJTBBJTIwJTIwJTIwJTIwZGVmJTIwZm9yd2FyZChzZWxmJTJDJTIwdGFzayUzQSUyMHN0ciklMjAtJTNFJTIwc3RyJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbW9zdF9kb3dubG9hZGVkX21vZGVsJTIwJTNEJTIwbmV4dChpdGVyKGxpc3RfbW9kZWxzKGZpbHRlciUzRHRhc2slMkMlMjBzb3J0JTNEJTIyZG93bmxvYWRzJTIyJTJDJTIwZGlyZWN0aW9uJTNELTEpKSklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjBtb3N0X2Rvd25sb2FkZWRfbW9kZWwuaWQ=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> Tool

<span class="hljs-keyword">class</span> <span class="hljs-title class_">ModelDownloadTool</span>(<span class="hljs-title class_ inherited__">Tool</span>):
    name = <span class="hljs-string">&quot;model_download_tool&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. It returns the name of the checkpoint.&quot;</span>
    inputs = {<span class="hljs-string">&quot;task&quot;</span>: {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>, <span class="hljs-string">&quot;description&quot;</span>: <span class="hljs-string">&quot;The task for which to get the download count.&quot;</span>}}
    output_type = <span class="hljs-string">&quot;string&quot;</span>

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">self, task: <span class="hljs-built_in">str</span></span>) -&gt; <span class="hljs-built_in">str</span>:
        most_downloaded_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> most_downloaded_model.<span class="hljs-built_in">id</span>`,wrap:!1}}),{c(){w(i.$$.fragment),j=s(),J=T("p"),J.textContent=u,d=s(),p=T("ul"),p.innerHTML=I},l(r){c(i.$$.fragment,r),j=a(r),J=M(r,"P",{"data-svelte-h":!0}),U(J)!=="svelte-1axnp6t"&&(J.textContent=u),d=a(r),p=M(r,"UL",{"data-svelte-h":!0}),U(p)!=="svelte-1e7an1b"&&(p.innerHTML=I)},m(r,v){m(i,r,v),t(r,j,v),t(r,J,v),t(r,d,v),t(r,p,v),k=!0},p:z,i(r){k||(g(i.$$.fragment,r),k=!0)},o(r){h(i.$$.fragment,r),k=!1},d(r){r&&(l(j),l(J),l(d),l(p)),b(i,r)}}}function ra(F){let i,j,J,u;return i=new L({props:{id:"build-a-tool",option:"Decorate a function with @tool",$$slots:{default:[Ja]},$$scope:{ctx:F}}}),J=new L({props:{id:"build-a-tool",option:"Subclass Tool",$$slots:{default:[Ua]},$$scope:{ctx:F}}}),{c(){w(i.$$.fragment),j=s(),w(J.$$.fragment)},l(d){c(i.$$.fragment,d),j=a(d),c(J.$$.fragment,d)},m(d,p){m(i,d,p),t(d,j,p),m(J,d,p),u=!0},p(d,p){const I={};p&2&&(I.$$scope={dirty:p,ctx:d}),i.$set(I);const k={};p&2&&(k.$$scope={dirty:p,ctx:d}),J.$set(k)},i(d){u||(g(i.$$.fragment,d),g(J.$$.fragment,d),u=!0)},o(d){h(i.$$.fragment,d),h(J.$$.fragment,d),u=!1},d(d){d&&l(j),b(i,d),b(J,d)}}}function pa(F){let i,j,J,u,d,p,I,k,r,v="In this guided visit, you will learn how to build an agent, how to run it, and how to customize it to make it work better for your use-case.",V,A,E,R,o=`<code>smolagents</code> comes with two agent classes: <a href="/docs/smolagents/main/en/reference/agents#smolagents.CodeAgent">CodeAgent</a> and <a href="/docs/smolagents/main/en/reference/agents#smolagents.ToolCallingAgent">ToolCallingAgent</a>, which represent two different paradigms for how agents interact with tools.
The key difference lies in how actions are specified and executed: code generation vs structured tool calling.`,f,C,$,W,G='<a href="/docs/smolagents/main/en/reference/agents#smolagents.CodeAgent">CodeAgent</a> generates tool calls as Python code snippets.',x,y,N,Nn="The code is executed either locally (potentially unsecure) or in a secure sandbox.",hn,Bl,Fn="Tools are exposed as Python functions (via bindings).",bn,vl,In,ee,fn,Vl,En="Strengths:<ul><li>Highly expressive: Allows for complex logic and control flow and can combine tools, loop, transform, reason.</li> <li>Flexible: No need to predefine every possible action, can dynamically generate new actions/tools.</li> <li>Emergent reasoning: Ideal for multi-step problems or dynamic logic.</li></ul>",Cn,Zl,Qn="Limitations<ul><li>Risk of errors: Must handle syntax errors, exceptions.</li> <li>Less predictable: More prone to unexpected or unsafe outputs.</li> <li>Requires secure execution environment.</li></ul>",jn,le,$l,Wn='<a href="/docs/smolagents/main/en/reference/agents#smolagents.ToolCallingAgent">ToolCallingAgent</a> writes tool calls as structured JSON.',kn,_,Nl,Gn="This is the common format used in many frameworks (OpenAI API), allowing for structured tool interactions without code execution.",An,Fl,_n="Tools are defined with a JSON schema: name, description, parameter types, etc.",Rn,El,Bn,te,vn,Ql,xn="Strengths:<ul><li>Reliable: Less prone to hallucination, outputs are structured and validated.</li> <li>Safe: Arguments are strictly validated, no risk of arbitrary code running.</li> <li>Interoperable: Easy to map to external APIs or services.</li></ul>",Vn,Wl,On="Limitations:<ul><li>Low expressivity: Can’t easily combine or transform results dynamically, or perform complex logic or control flow.</li> <li>Inflexible: Must define all possible actions in advance, limited to predefined tools.</li> <li>No code synthesis: Limited to tool capabilities.</li></ul>",_l,ne,Sn="When to use which agent type:",xl,se,Hn='<li><p>Use <a href="/docs/smolagents/main/en/reference/agents#smolagents.CodeAgent">CodeAgent</a> when:</p> <ul><li>You need reasoning, chaining, or dynamic composition.</li> <li>Tools are functions that can be combined (e.g., parsing + math + querying).</li> <li>Your agent is a problem solver or programmer.</li></ul></li> <li><p>Use <a href="/docs/smolagents/main/en/reference/agents#smolagents.ToolCallingAgent">ToolCallingAgent</a> when:</p> <ul><li>You have simple, atomic tools (e.g., call an API, fetch a document).</li> <li>You want high reliability and clear validation.</li> <li>Your agent is like a dispatcher or controller.</li></ul></li>',Ol,ae,Sl,oe,Ln='<a href="/docs/smolagents/main/en/reference/agents#smolagents.CodeAgent">CodeAgent</a> generates Python code snippets to perform actions and solve tasks.',Hl,ie,zn=`By default, the Python code execution is done in your local environment.
This should be safe because the only functions that can be called are the tools you provided (especially if it’s only tools by Hugging Face) and a set of predefined safe functions like <code>print</code> or functions from the <code>math</code> module, so you’re already limited in what can be executed.`,Ll,Te,Yn=`The Python interpreter also doesn’t allow imports by default outside of a safe list, so all the most obvious attacks shouldn’t be an issue.
You can authorize additional imports by passing the authorized modules as a list of strings in argument <code>additional_authorized_imports</code> upon initialization of your <a href="/docs/smolagents/main/en/reference/agents#smolagents.CodeAgent">CodeAgent</a>:`,zl,Me,Yl,Je,Dn=`Additionally, as an extra security layer, access to submodule is forbidden by default, unless explicitly authorized within the import list.
For instance, to access the <code>numpy.random</code> submodule, you need to add <code>&#39;numpy.random&#39;</code> to the <code>additional_authorized_imports</code> list.
This could also be authorized by using <code>numpy.*</code>, which will allow <code>numpy</code> as well as any subpackage like <code>numpy.random</code> and its own subpackages.`,Dl,Y,Xn="<p>The LLM can generate arbitrary code that will then be executed: do not add any unsafe imports!</p>",Xl,Ue,qn="The execution will stop at any code trying to perform an illegal operation or if there is a regular Python error with the code generated by the agent.",ql,re,Pn='You can also use <a href="https://e2b.dev/docs#what-is-e2-b" rel="nofollow">E2B code executor</a> or Docker instead of a local Python interpreter. For E2B, first <a href="https://e2b.dev/dashboard?tab=keys" rel="nofollow">set the <code>E2B_API_KEY</code> environment variable</a> and then pass <code>executor_type=&quot;e2b&quot;</code> upon agent initialization. For Docker, pass <code>executor_type=&quot;docker&quot;</code> during initialization.',Pl,D,Kn='<p>Learn more about code execution <a href="tutorials/secure_code_execution">in this tutorial</a>.</p>',Kl,pe,et,de,es='<a href="/docs/smolagents/main/en/reference/agents#smolagents.ToolCallingAgent">ToolCallingAgent</a> outputs JSON tool calls, which is the common format used in many frameworks (OpenAI API), allowing for structured tool interactions without code execution.',lt,ye,ls='It works much in the same way like <a href="/docs/smolagents/main/en/reference/agents#smolagents.CodeAgent">CodeAgent</a>, of course without <code>additional_authorized_imports</code> since it doesn’t execute code:',tt,ue,nt,we,st,ce,ts="To initialize a minimal agent, you need at least these two arguments:",at,me,ns='<li><p><code>model</code>, a text-generation model to power your agent - because the agent is different from a simple LLM, it is a system that uses a LLM as its engine. You can use any of these options:</p> <ul><li><a href="/docs/smolagents/main/en/reference/models#smolagents.TransformersModel">TransformersModel</a> takes a pre-initialized <code>transformers</code> pipeline to run inference on your local machine using <code>transformers</code>.</li> <li><a href="/docs/smolagents/main/en/reference/models#smolagents.InferenceClientModel">InferenceClientModel</a> leverages a <code>huggingface_hub.InferenceClient</code> under the hood and supports all Inference Providers on the Hub: Cerebras, Cohere, Fal, Fireworks, HF-Inference, Hyperbolic, Nebius, Novita, Replicate, SambaNova, Together, and more.</li> <li><a href="/docs/smolagents/main/en/reference/models#smolagents.LiteLLMModel">LiteLLMModel</a> similarly lets you call 100+ different models and providers through <a href="https://docs.litellm.ai/" rel="nofollow">LiteLLM</a>!</li> <li><a href="/docs/smolagents/main/en/reference/models#smolagents.AzureOpenAIServerModel">AzureOpenAIServerModel</a> allows you to use OpenAI models deployed in <a href="https://azure.microsoft.com/en-us/products/ai-services/openai-service" rel="nofollow">Azure</a>.</li> <li><a href="/docs/smolagents/main/en/reference/models#smolagents.AmazonBedrockServerModel">AmazonBedrockServerModel</a> allows you to use Amazon Bedrock in <a href="https://aws.amazon.com/bedrock/?nc1=h_ls" rel="nofollow">AWS</a>.</li> <li><a href="/docs/smolagents/main/en/reference/models#smolagents.MLXModel">MLXModel</a> creates a <a href="https://pypi.org/project/mlx-lm/" rel="nofollow">mlx-lm</a> pipeline to run inference on your local machine.</li></ul></li> <li><p><code>tools</code>, a list of <code>Tools</code> that the agent can use to solve the task. It can be an empty list. You can also add the default toolbox on top of your <code>tools</code> list by defining the optional argument <code>add_base_tools=True</code>.</p></li>',ot,ge,ss='Once you have these two arguments, <code>tools</code> and <code>model</code>,  you can create an agent and run it. You can use any LLM you’d like, either through <a href="https://huggingface.co/blog/inference-providers" rel="nofollow">Inference Providers</a>, <a href="https://github.com/huggingface/transformers/" rel="nofollow">transformers</a>, <a href="https://ollama.com/" rel="nofollow">ollama</a>, <a href="https://www.litellm.ai/" rel="nofollow">LiteLLM</a>, <a href="https://azure.microsoft.com/en-us/products/ai-services/openai-service" rel="nofollow">Azure OpenAI</a>, <a href="https://aws.amazon.com/bedrock/?nc1=h_ls" rel="nofollow">Amazon Bedrock</a>, or <a href="https://pypi.org/project/mlx-lm/" rel="nofollow">mlx-lm</a>.',it,he,as=`All model classes support passing additional keyword arguments (like <code>temperature</code>, <code>max_tokens</code>, <code>top_p</code>, etc.) directly at instantiation time.
These parameters are automatically forwarded to the underlying model’s completion calls, allowing you to configure model behavior such as creativity, response length, and sampling strategies.`,Tt,X,Mt,be,Jt,Ie,os=`When initializing models, you can pass keyword arguments that will be forwarded as completion parameters to the
underlying model API during inference.`,Ut,fe,is=`For fine-grained control over parameter handling, the <code>REMOVE_PARAMETER</code> sentinel value allows you to explicitly exclude
parameters that might otherwise be set by default or passed through elsewhere:`,rt,Ce,pt,je,Ts="This is particularly useful when:",dt,ke,Ms="<li>You want to override default parameters that might be applied automatically</li> <li>You need to ensure certain parameters are completely excluded from API calls</li> <li>You want to let the model provider use their own defaults for specific parameters</li>",yt,Ae,ut,Re,wt,Be,Js=`By default, an agent continues running until it calls the <code>final_answer</code> function or reaches the maximum number of steps.
The <code>final_answer_checks</code> parameter gives you more control over when and how an agent terminates its execution:`,ct,ve,mt,Ve,Us="The <code>final_answer_checks</code> parameter accepts a list of functions that each:",gt,Ze,rs="<li>Take the agent’s final_answer string the agent’s memory as parameters</li> <li>Return a boolean indicating whether the final_answer is valid (True) or not (False)</li>",ht,$e,ps=`If any function returns <code>False</code>, the agent will log the error message and continue the run.
This validation mechanism enables:`,bt,Ne,ds="<li>Enforcing output format requirements (e.g., ensuring numeric answers for math problems)</li> <li>Implementing domain-specific validation rules</li> <li>Creating more robust agents that validate their own outputs</li>",It,Fe,ft,Ee,ys="Here are a few useful attributes to inspect what happened after a run:",Ct,Qe,us="<li><code>agent.logs</code> stores the fine-grained logs of the agent. At every step of the agent’s run, everything gets stored in a dictionary that then is appended to <code>agent.logs</code>.</li> <li>Running <code>agent.write_memory_to_messages()</code> writes the agent’s memory as list of chat messages for the Model to view. This method goes over each step of the log and only stores what it’s interested in as a message: for instance, it will save the system prompt and task in separate messages, then for each step it will store the LLM output as a message, and the tool call output as another message. Use this if you want a higher-level view of what has happened - but not every log will be transcripted by this method.</li>",jt,We,kt,Ge,ws="A tool is an atomic function to be used by an agent. To be used by an LLM, it also needs a few attributes that constitute its API and will be used to describe to the LLM how to call this tool:",At,_e,cs="<li>A name</li> <li>A description</li> <li>Input types and descriptions</li> <li>An output type</li>",Rt,xe,ms='You can for instance check the <a href="/docs/smolagents/main/en/reference/default_tools#smolagents.PythonInterpreterTool">PythonInterpreterTool</a>: it has a name, a description, input descriptions, an output type, and a <code>forward</code> method to perform the action.',Bt,Oe,gs="When the agent is initialized, the tool attributes are used to generate a tool description which is baked into the agent’s system prompt. This lets the agent know which tools it can use and why.",vt,Se,hs="<strong>Schema Information</strong>: For tools that have an <code>output_schema</code> defined (such as MCP tools with structured output), the <code>CodeAgent</code> system prompt automatically includes the JSON schema information. This helps the agent understand the expected structure of tool outputs and access the data appropriately.",Vt,He,Zt,Le,bs="If you install <code>smolagents</code> with the “toolkit” extra, it comes with a default toolbox for empowering agents, that you can add to your agent upon initialization with argument <code>add_base_tools=True</code>:",$t,ze,Is='<li><strong>DuckDuckGo web search*</strong>: performs a web search using DuckDuckGo browser.</li> <li><strong>Python code interpreter</strong>: runs your LLM generated Python code in a secure environment. This tool will only be added to <a href="/docs/smolagents/main/en/reference/agents#smolagents.ToolCallingAgent">ToolCallingAgent</a> if you initialize it with <code>add_base_tools=True</code>, since code-based agent can already natively execute Python code</li> <li><strong>Transcriber</strong>: a speech-to-text pipeline built on Whisper-Turbo that transcribes an audio to text.</li>',Nt,Ye,fs="You can manually use a tool by calling it with its arguments.",Ft,De,Et,Xe,Qt,qe,Cs=`You can create your own tool for use cases not covered by the default tools from Hugging Face.
For example, let’s create a tool that returns the most downloaded model for a given task from the Hub.`,Wt,Pe,js="You’ll start with the code below.",Gt,Ke,_t,el,ks=`This code can quickly be converted into a tool, just by wrapping it in a function and adding the <code>tool</code> decorator:
This is not the only way to build the tool: you can directly define it as a subclass of <a href="/docs/smolagents/main/en/reference/tools#smolagents.Tool">Tool</a>, which gives you more flexibility, for instance the possibility to initialize heavy class attributes.`,xt,ll,As="Let’s see how it works for both options:",Ot,q,St,tl,Rs="Then you can directly initialize your agent:",Ht,nl,Lt,sl,Bs="You get the following logs:",zt,al,Yt,P,vs='<p>Read more on tools in the <a href="./tutorials/tools#what-is-a-tool-and-how-to-build-one">dedicated tutorial</a>.</p>',Dt,ol,Xt,il,Vs='Multi-agent systems have been introduced with Microsoft’s framework <a href="https://huggingface.co/papers/2308.08155" rel="nofollow">Autogen</a>.',qt,Tl,Zs=`In this type of framework, you have several agents working together to solve your task instead of only one.
It empirically yields better performance on most benchmarks. The reason for this better performance is conceptually simple: for many tasks, rather than using a do-it-all system, you would prefer to specialize units on sub-tasks. Here, having agents with separate tool sets and memories allows to achieve efficient specialization. For instance, why fill the memory of the code generating agent with all the content of webpages visited by the web search agent? It’s better to keep them separate.`,Pt,Ml,$s="You can easily build hierarchical multi-agent systems with <code>smolagents</code>.",Kt,Jl,Ns=`To do so, just ensure your agent has <code>name</code> and<code>description</code> attributes, which will then be embedded in the manager agent’s system prompt to let it know how to call this managed agent, as we also do for tools.
Then you can pass this managed agent in the parameter managed_agents upon initialization of the manager agent.`,en,Ul,Fs='Here’s an example of making an agent that managed a specific web search agent using our native <a href="/docs/smolagents/main/en/reference/default_tools#smolagents.WebSearchTool">WebSearchTool</a>:',ln,rl,tn,K,Es='<p>For an in-depth example of an efficient multi-agent implementation, see <a href="https://huggingface.co/blog/beating-gaia" rel="nofollow">how we pushed our multi-agent system to the top of the GAIA leaderboard</a>.</p>',nn,pl,sn,dl,Qs="You can use <code>GradioUI</code> to interactively submit tasks to your agent and observe its thought and execution process, here is an example:",an,yl,on,ul,Ws=`Under the hood, when the user types a new answer, the agent is launched with <code>agent.run(user_request, reset=False)</code>.
The <code>reset=False</code> flag means the agent’s memory is not flushed before launching this new task, which lets the conversation go on.`,Tn,wl,Gs="You can also use this <code>reset=False</code> argument to keep the conversation going in any other agentic application.",Mn,cl,_s=`In gradio UIs, if you want to allow users to interrupt a running agent, you could do this with a button that triggers method <code>agent.interrupt()</code>.
This will stop the agent at the end of its current step, then raise an error.`,Jn,ml,Un,gl,xs="Finally, when you’ve configured your agent to your needs, you can share it to the Hub!",rn,hl,pn,bl,Os="Similarly, to load an agent that has been pushed to hub, if you trust the code from its tools, use:",dn,Il,yn,fl,Ss="For more in-depth usage, you will then want to check out our tutorials:",un,Cl,Hs='<li><a href="./tutorials/secure_code_execution">the explanation of how our code agents work</a></li> <li><a href="./tutorials/building_good_agents">this guide on how to build good agents</a>.</li> <li><a href="./tutorials/building_good_agents">the in-depth guide for tool usage</a>.</li>',wn,jl,cn,Gl,mn;return d=new Q({props:{title:"Agents - Guided tour",local:"agents---guided-tour",headingTag:"h1"}}),I=new ea({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/en/guided_tour.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/en/pytorch/guided_tour.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/en/tensorflow/guided_tour.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/guided_tour.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/pytorch/guided_tour.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/tensorflow/guided_tour.ipynb"}]}}),A=new Q({props:{title:"Choosing an agent type: CodeAgent or ToolCallingAgent",local:"choosing-an-agent-type-codeagent-or-toolcallingagent",headingTag:"h2"}}),ee=new Z({props:{code:"cmVzdWx0JTIwJTNEJTIwc2VhcmNoX2RvY3MoJTIyV2hhdCUyMGlzJTIwdGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTNGJTIyKSUwQXByaW50KHJlc3VsdCk=",highlighted:`result = search_docs(<span class="hljs-string">&quot;What is the capital of France?&quot;</span>)
<span class="hljs-built_in">print</span>(result)`,wrap:!1}}),te=new Z({props:{code:"JTdCJTBBJTIwJTIwJTIydG9vbF9jYWxsJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIybmFtZSUyMiUzQSUyMCUyMnNlYXJjaF9kb2NzJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyYXJndW1lbnRzJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIycXVlcnklMjIlM0ElMjAlMjJXaGF0JTIwaXMlMjB0aGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlM0YlMjIlMEElMjAlMjAlMjAlMjAlN0QlMEElMjAlMjAlN0QlMEElN0Q=",highlighted:`<span class="hljs-punctuation">{</span>
  <span class="hljs-attr">&quot;tool_call&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
    <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;search_docs&quot;</span><span class="hljs-punctuation">,</span>
    <span class="hljs-attr">&quot;arguments&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
      <span class="hljs-attr">&quot;query&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;What is the capital of France?&quot;</span>
    <span class="hljs-punctuation">}</span>
  <span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>`,wrap:!1}}),ae=new Q({props:{title:"CodeAgent",local:"codeagent",headingTag:"h2"}}),Me=new Z({props:{code:"bW9kZWwlMjAlM0QlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCgpJTBBYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQodG9vbHMlM0QlNUIlNUQlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwYWRkaXRpb25hbF9hdXRob3JpemVkX2ltcG9ydHMlM0QlNUIncmVxdWVzdHMnJTJDJTIwJ2JzNCclNUQpJTBBYWdlbnQucnVuKCUyMkNvdWxkJTIweW91JTIwZ2V0JTIwbWUlMjB0aGUlMjB0aXRsZSUyMG9mJTIwdGhlJTIwcGFnZSUyMGF0JTIwdXJsJTIwJ2h0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZibG9nJyUzRiUyMik=",highlighted:`model = InferenceClientModel()
agent = CodeAgent(tools=[], model=model, additional_authorized_imports=[<span class="hljs-string">&#x27;requests&#x27;</span>, <span class="hljs-string">&#x27;bs4&#x27;</span>])
agent.run(<span class="hljs-string">&quot;Could you get me the title of the page at url &#x27;https://huggingface.co/blog&#x27;?&quot;</span>)`,wrap:!1}}),pe=new Q({props:{title:"ToolCallingAgent",local:"toolcallingagent",headingTag:"h3"}}),ue=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBUb29sQ2FsbGluZ0FnZW50JTBBJTBBYWdlbnQlMjAlM0QlMjBUb29sQ2FsbGluZ0FnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0Rtb2RlbCklMEFhZ2VudC5ydW4oJTIyQ291bGQlMjB5b3UlMjBnZXQlMjBtZSUyMHRoZSUyMHRpdGxlJTIwb2YlMjB0aGUlMjBwYWdlJTIwYXQlMjB1cmwlMjAnaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmJsb2cnJTNGJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> ToolCallingAgent

agent = ToolCallingAgent(tools=[], model=model)
agent.run(<span class="hljs-string">&quot;Could you get me the title of the page at url &#x27;https://huggingface.co/blog&#x27;?&quot;</span>)`,wrap:!1}}),we=new Q({props:{title:"Building your agent",local:"building-your-agent",headingTag:"h2"}}),X=new Ys({props:{id:"Pick a LLM",options:["Inference Providers","Local Transformers Model","OpenAI or Anthropic API","Ollama","Azure OpenAI","Amazon Bedrock","mlx-lm"],$$slots:{default:[Ma]},$$scope:{ctx:F}}}),be=new Q({props:{title:"Model parameter management",local:"model-parameter-management",headingTag:"h3"}}),Ce=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBPcGVuQUlTZXJ2ZXJNb2RlbCUyQyUyMFJFTU9WRV9QQVJBTUVURVIlMEElMEElMjMlMjBSZW1vdmUlMjAlMjJzdG9wJTIyJTIwcGFyYW1ldGVyJTBBbW9kZWwlMjAlM0QlMjBPcGVuQUlTZXJ2ZXJNb2RlbCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCUyMmdwdC01JTIyJTJDJTBBJTIwJTIwJTIwJTIwc3RvcCUzRFJFTU9WRV9QQVJBTUVURVIlMkMlMjAlMjAlMjMlMjBFbnN1cmVzJTIwJTIyc3RvcCUyMiUyMGlzJTIwbm90JTIwaW5jbHVkZWQlMjBpbiUyMEFQSSUyMGNhbGxzJTBBJTIwJTIwJTIwJTIwdGVtcGVyYXR1cmUlM0QwLjclMEEpJTBBJTBBYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQodG9vbHMlM0QlNUIlNUQlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwYWRkX2Jhc2VfdG9vbHMlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> OpenAIServerModel, REMOVE_PARAMETER

<span class="hljs-comment"># Remove &quot;stop&quot; parameter</span>
model = OpenAIServerModel(
    model_id=<span class="hljs-string">&quot;gpt-5&quot;</span>,
    stop=REMOVE_PARAMETER,  <span class="hljs-comment"># Ensures &quot;stop&quot; is not included in API calls</span>
    temperature=<span class="hljs-number">0.7</span>
)

agent = CodeAgent(tools=[], model=model, add_base_tools=<span class="hljs-literal">True</span>)`,wrap:!1}}),Ae=new Q({props:{title:"Advanced agent configuration",local:"advanced-agent-configuration",headingTag:"h2"}}),Re=new Q({props:{title:"Customizing agent termination conditions",local:"customizing-agent-termination-conditions",headingTag:"h3"}}),ve=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUwQSUwQSUyMyUyMERlZmluZSUyMGElMjBjdXN0b20lMjBmaW5hbCUyMGFuc3dlciUyMGNoZWNrJTIwZnVuY3Rpb24lMEFkZWYlMjBpc19pbnRlZ2VyKGZpbmFsX2Fuc3dlciUzQSUyMHN0ciUyQyUyMGFnZW50X21lbW9yeSUzRE5vbmUpJTIwLSUzRSUyMGJvb2wlM0ElMEElMjAlMjAlMjAlMjAlMjIlMjIlMjJSZXR1cm4lMjBUcnVlJTIwaWYlMjBmaW5hbF9hbnN3ZXIlMjBpcyUyMGFuJTIwaW50ZWdlci4lMjIlMjIlMjIlMEElMjAlMjAlMjAlMjB0cnklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBpbnQoZmluYWxfYW5zd2VyKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMFRydWUlMEElMjAlMjAlMjAlMjBleGNlcHQlMjBWYWx1ZUVycm9yJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwRmFsc2UlMEElMEElMjMlMjBJbml0aWFsaXplJTIwYWdlbnQlMjB3aXRoJTIwY3VzdG9tJTIwZmluYWwlMjBhbnN3ZXIlMjBjaGVjayUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KCUwQSUyMCUyMCUyMCUyMHRvb2xzJTNEJTVCJTVEJTJDJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0RJbmZlcmVuY2VDbGllbnRNb2RlbCgpJTJDJTBBJTIwJTIwJTIwJTIwZmluYWxfYW5zd2VyX2NoZWNrcyUzRCU1QmlzX2ludGVnZXIlNUQlMEEpJTBBJTBBYWdlbnQucnVuKCUyMkNhbGN1bGF0ZSUyMHRoZSUyMGxlYXN0JTIwY29tbW9uJTIwbXVsdGlwbGUlMjBvZiUyMDMlMjBhbmQlMjA3JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, InferenceClientModel

<span class="hljs-comment"># Define a custom final answer check function</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">is_integer</span>(<span class="hljs-params">final_answer: <span class="hljs-built_in">str</span>, agent_memory=<span class="hljs-literal">None</span></span>) -&gt; <span class="hljs-built_in">bool</span>:
    <span class="hljs-string">&quot;&quot;&quot;Return True if final_answer is an integer.&quot;&quot;&quot;</span>
    <span class="hljs-keyword">try</span>:
        <span class="hljs-built_in">int</span>(final_answer)
        <span class="hljs-keyword">return</span> <span class="hljs-literal">True</span>
    <span class="hljs-keyword">except</span> ValueError:
        <span class="hljs-keyword">return</span> <span class="hljs-literal">False</span>

<span class="hljs-comment"># Initialize agent with custom final answer check</span>
agent = CodeAgent(
    tools=[],
    model=InferenceClientModel(),
    final_answer_checks=[is_integer]
)

agent.run(<span class="hljs-string">&quot;Calculate the least common multiple of 3 and 7&quot;</span>)`,wrap:!1}}),Fe=new Q({props:{title:"Inspecting an agent run",local:"inspecting-an-agent-run",headingTag:"h2"}}),We=new Q({props:{title:"Tools",local:"tools",headingTag:"h2"}}),He=new Q({props:{title:"Default toolbox",local:"default-toolbox",headingTag:"h3"}}),De=new Z({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjAnc21vbGFnZW50cyU1QnRvb2xraXQlNUQnJTBBZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBXZWJTZWFyY2hUb29sJTBBJTBBc2VhcmNoX3Rvb2wlMjAlM0QlMjBXZWJTZWFyY2hUb29sKCklMEFwcmludChzZWFyY2hfdG9vbCglMjJXaG8ncyUyMHRoZSUyMGN1cnJlbnQlMjBwcmVzaWRlbnQlMjBvZiUyMFJ1c3NpYSUzRiUyMikp",highlighted:`<span class="hljs-comment"># !pip install &#x27;smolagents[toolkit]&#x27;</span>
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> WebSearchTool

search_tool = WebSearchTool()
<span class="hljs-built_in">print</span>(search_tool(<span class="hljs-string">&quot;Who&#x27;s the current president of Russia?&quot;</span>))`,wrap:!1}}),Xe=new Q({props:{title:"Create a new tool",local:"create-a-new-tool",headingTag:"h3"}}),Ke=new Z({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGxpc3RfbW9kZWxzJTBBJTBBdGFzayUyMCUzRCUyMCUyMnRleHQtY2xhc3NpZmljYXRpb24lMjIlMEElMEFtb3N0X2Rvd25sb2FkZWRfbW9kZWwlMjAlM0QlMjBuZXh0KGl0ZXIobGlzdF9tb2RlbHMoZmlsdGVyJTNEdGFzayUyQyUyMHNvcnQlM0QlMjJkb3dubG9hZHMlMjIlMkMlMjBkaXJlY3Rpb24lM0QtMSkpKSUwQXByaW50KG1vc3RfZG93bmxvYWRlZF9tb2RlbC5pZCk=",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>

most_downloaded_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>(most_downloaded_model.<span class="hljs-built_in">id</span>)`,wrap:!1}}),q=new Ys({props:{id:"build-a-tool",options:["Decorate a function with @tool","Subclass Tool"],$$slots:{default:[ra]},$$scope:{ctx:F}}}),nl=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCbW9kZWxfZG93bmxvYWRfdG9vbCU1RCUyQyUyMG1vZGVsJTNESW5mZXJlbmNlQ2xpZW50TW9kZWwoKSklMEFhZ2VudC5ydW4oJTBBJTIwJTIwJTIwJTIwJTIyQ2FuJTIweW91JTIwZ2l2ZSUyMG1lJTIwdGhlJTIwbmFtZSUyMG9mJTIwdGhlJTIwbW9kZWwlMjB0aGF0JTIwaGFzJTIwdGhlJTIwbW9zdCUyMGRvd25sb2FkcyUyMGluJTIwdGhlJTIwJ3RleHQtdG8tdmlkZW8nJTIwdGFzayUyMG9uJTIwdGhlJTIwSHVnZ2luZyUyMEZhY2UlMjBIdWIlM0YlMjIlMEEp",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, InferenceClientModel
agent = CodeAgent(tools=[model_download_tool], model=InferenceClientModel())
agent.run(
    <span class="hljs-string">&quot;Can you give me 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}}),al=new Z({props:{code:" ",highlighted:`╭──────────────────────────────────────── New run ─────────────────────────────────────────╮
│                                                                                          │
│ Can you give me the name of the model that has the most downloads in the &#x27;text-to-video&#x27; │
│ task on the Hugging Face Hub?                                                            │
│                                                                                          │
╰─ InferenceClientModel - Qwen/Qwen2.5-Coder-32B-Instruct ───────────────────────────────────────────╯
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 0 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╭─ Executing this code: ───────────────────────────────────────────────────────────────────╮
│   1 model_name = model_download_tool(task=&quot;text-to-video&quot;)                               │
│   2 print(model_name)                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Execution logs:
ByteDance/AnimateDiff-Lightning

Out: None
[Step 0: Duration 0.27 seconds| Input tokens: 2,069 | Output tokens: 60]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╭─ Executing this code: ───────────────────────────────────────────────────────────────────╮
│   1 final_answer(&quot;ByteDance/AnimateDiff-Lightning&quot;)                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Out - Final answer: ByteDance/AnimateDiff-Lightning
[Step 1: Duration 0.10 seconds| Input tokens: 4,288 | Output tokens: 148]
Out[20]: &#x27;ByteDance/AnimateDiff-Lightning&#x27;`,wrap:!1}}),ol=new Q({props:{title:"Multi-agents",local:"multi-agents",headingTag:"h2"}}),rl=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUyQyUyMFdlYlNlYXJjaFRvb2wlMEElMEFtb2RlbCUyMCUzRCUyMEluZmVyZW5jZUNsaWVudE1vZGVsKCklMEElMEF3ZWJfYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQoJTBBJTIwJTIwJTIwJTIwdG9vbHMlM0QlNUJXZWJTZWFyY2hUb29sKCklNUQlMkMlMEElMjAlMjAlMjAlMjBtb2RlbCUzRG1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwbmFtZSUzRCUyMndlYl9zZWFyY2hfYWdlbnQlMjIlMkMlMEElMjAlMjAlMjAlMjBkZXNjcmlwdGlvbiUzRCUyMlJ1bnMlMjB3ZWIlMjBzZWFyY2hlcyUyMGZvciUyMHlvdS4lMjBHaXZlJTIwaXQlMjB5b3VyJTIwcXVlcnklMjBhcyUyMGFuJTIwYXJndW1lbnQuJTIyJTBBKSUwQSUwQW1hbmFnZXJfYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQoJTBBJTIwJTIwJTIwJTIwdG9vbHMlM0QlNUIlNUQlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwbWFuYWdlZF9hZ2VudHMlM0QlNUJ3ZWJfYWdlbnQlNUQlMEEpJTBBJTBBbWFuYWdlcl9hZ2VudC5ydW4oJTIyV2hvJTIwaXMlMjB0aGUlMjBDRU8lMjBvZiUyMEh1Z2dpbmclMjBGYWNlJTNGJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, InferenceClientModel, WebSearchTool

model = InferenceClientModel()

web_agent = CodeAgent(
    tools=[WebSearchTool()],
    model=model,
    name=<span class="hljs-string">&quot;web_search_agent&quot;</span>,
    description=<span class="hljs-string">&quot;Runs web searches for you. Give it your query as an argument.&quot;</span>
)

manager_agent = CodeAgent(
    tools=[], model=model, managed_agents=[web_agent]
)

manager_agent.run(<span class="hljs-string">&quot;Who is the CEO of Hugging Face?&quot;</span>)`,wrap:!1}}),pl=new Q({props:{title:"Talk with your agent and visualize its thoughts in a cool Gradio interface",local:"talk-with-your-agent-and-visualize-its-thoughts-in-a-cool-gradio-interface",headingTag:"h2"}}),yl=new Z({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjAoJTBBJTIwJTIwJTIwJTIwbG9hZF90b29sJTJDJTBBJTIwJTIwJTIwJTIwQ29kZUFnZW50JTJDJTBBJTIwJTIwJTIwJTIwSW5mZXJlbmNlQ2xpZW50TW9kZWwlMkMlMEElMjAlMjAlMjAlMjBHcmFkaW9VSSUwQSklMEElMEElMjMlMjBJbXBvcnQlMjB0b29sJTIwZnJvbSUyMEh1YiUwQWltYWdlX2dlbmVyYXRpb25fdG9vbCUyMCUzRCUyMGxvYWRfdG9vbCglMjJtLXJpYyUyRnRleHQtdG8taW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBJTBBbW9kZWwlMjAlM0QlMjBJbmZlcmVuY2VDbGllbnRNb2RlbChtb2RlbF9pZCUzRG1vZGVsX2lkKSUwQSUwQSUyMyUyMEluaXRpYWxpemUlMjB0aGUlMjBhZ2VudCUyMHdpdGglMjB0aGUlMjBpbWFnZSUyMGdlbmVyYXRpb24lMjB0b29sJTBBYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQodG9vbHMlM0QlNUJpbWFnZV9nZW5lcmF0aW9uX3Rvb2wlNUQlMkMlMjBtb2RlbCUzRG1vZGVsKSUwQSUwQUdyYWRpb1VJKGFnZW50KS5sYXVuY2goKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> (
    load_tool,
    CodeAgent,
    InferenceClientModel,
    GradioUI
)

<span class="hljs-comment"># Import tool from Hub</span>
image_generation_tool = load_tool(<span class="hljs-string">&quot;m-ric/text-to-image&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)

model = InferenceClientModel(model_id=model_id)

<span class="hljs-comment"># Initialize the agent with the image generation tool</span>
agent = CodeAgent(tools=[image_generation_tool], model=model)

GradioUI(agent).launch()`,wrap:!1}}),ml=new Q({props:{title:"Next steps",local:"next-steps",headingTag:"h2"}}),hl=new Z({props:{code:"YWdlbnQucHVzaF90b19odWIoJTIybS1yaWMlMkZteV9hZ2VudCUyMik=",highlighted:'agent.push_to_hub(<span class="hljs-string">&quot;m-ric/my_agent&quot;</span>)',wrap:!1}}),Il=new Z({props:{code:"YWdlbnQuZnJvbV9odWIoJTIybS1yaWMlMkZteV9hZ2VudCUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSk=",highlighted:'agent.from_hub(<span class="hljs-string">&quot;m-ric/my_agent&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)',wrap:!1}}),jl=new la({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/en/guided_tour.md"}}),{c(){i=T("meta"),j=s(),J=T("p"),u=s(),w(d.$$.fragment),p=s(),w(I.$$.fragment),k=s(),r=T("p"),r.textContent=v,V=s(),w(A.$$.fragment),E=s(),R=T("p"),R.innerHTML=o,f=s(),C=T("ul"),$=T("li"),W=T("p"),W.innerHTML=G,x=s(),y=T("ul"),N=T("li"),N.textContent=Nn,hn=s(),Bl=T("li"),Bl.textContent=Fn,bn=s(),vl=T("li"),In=Ls(`Example of tool call:
	`),w(ee.$$.fragment),fn=s(),Vl=T("li"),Vl.innerHTML=En,Cn=s(),Zl=T("li"),Zl.innerHTML=Qn,jn=s(),le=T("li"),$l=T("p"),$l.innerHTML=Wn,kn=s(),_=T("ul"),Nl=T("li"),Nl.textContent=Gn,An=s(),Fl=T("li"),Fl.textContent=_n,Rn=s(),El=T("li"),Bn=Ls(`Example of tool call:
	`),w(te.$$.fragment),vn=s(),Ql=T("li"),Ql.innerHTML=xn,Vn=s(),Wl=T("li"),Wl.innerHTML=On,_l=s(),ne=T("p"),ne.textContent=Sn,xl=s(),se=T("ul"),se.innerHTML=Hn,Ol=s(),w(ae.$$.fragment),Sl=s(),oe=T("p"),oe.innerHTML=Ln,Hl=s(),ie=T("p"),ie.innerHTML=zn,Ll=s(),Te=T("p"),Te.innerHTML=Yn,zl=s(),w(Me.$$.fragment),Yl=s(),Je=T("p"),Je.innerHTML=Dn,Dl=s(),Y=T("blockquote"),Y.innerHTML=Xn,Xl=s(),Ue=T("p"),Ue.textContent=qn,ql=s(),re=T("p"),re.innerHTML=Pn,Pl=s(),D=T("blockquote"),D.innerHTML=Kn,Kl=s(),w(pe.$$.fragment),et=s(),de=T("p"),de.innerHTML=es,lt=s(),ye=T("p"),ye.innerHTML=ls,tt=s(),w(ue.$$.fragment),nt=s(),w(we.$$.fragment),st=s(),ce=T("p"),ce.textContent=ts,at=s(),me=T("ul"),me.innerHTML=ns,ot=s(),ge=T("p"),ge.innerHTML=ss,it=s(),he=T("p"),he.innerHTML=as,Tt=s(),w(X.$$.fragment),Mt=s(),w(be.$$.fragment),Jt=s(),Ie=T("p"),Ie.textContent=os,Ut=s(),fe=T("p"),fe.innerHTML=is,rt=s(),w(Ce.$$.fragment),pt=s(),je=T("p"),je.textContent=Ts,dt=s(),ke=T("ul"),ke.innerHTML=Ms,yt=s(),w(Ae.$$.fragment),ut=s(),w(Re.$$.fragment),wt=s(),Be=T("p"),Be.innerHTML=Js,ct=s(),w(ve.$$.fragment),mt=s(),Ve=T("p"),Ve.innerHTML=Us,gt=s(),Ze=T("ul"),Ze.innerHTML=rs,ht=s(),$e=T("p"),$e.innerHTML=ps,bt=s(),Ne=T("ul"),Ne.innerHTML=ds,It=s(),w(Fe.$$.fragment),ft=s(),Ee=T("p"),Ee.textContent=ys,Ct=s(),Qe=T("ul"),Qe.innerHTML=us,jt=s(),w(We.$$.fragment),kt=s(),Ge=T("p"),Ge.textContent=ws,At=s(),_e=T("ul"),_e.innerHTML=cs,Rt=s(),xe=T("p"),xe.innerHTML=ms,Bt=s(),Oe=T("p"),Oe.textContent=gs,vt=s(),Se=T("p"),Se.innerHTML=hs,Vt=s(),w(He.$$.fragment),Zt=s(),Le=T("p"),Le.innerHTML=bs,$t=s(),ze=T("ul"),ze.innerHTML=Is,Nt=s(),Ye=T("p"),Ye.textContent=fs,Ft=s(),w(De.$$.fragment),Et=s(),w(Xe.$$.fragment),Qt=s(),qe=T("p"),qe.textContent=Cs,Wt=s(),Pe=T("p"),Pe.textContent=js,Gt=s(),w(Ke.$$.fragment),_t=s(),el=T("p"),el.innerHTML=ks,xt=s(),ll=T("p"),ll.textContent=As,Ot=s(),w(q.$$.fragment),St=s(),tl=T("p"),tl.textContent=Rs,Ht=s(),w(nl.$$.fragment),Lt=s(),sl=T("p"),sl.textContent=Bs,zt=s(),w(al.$$.fragment),Yt=s(),P=T("blockquote"),P.innerHTML=vs,Dt=s(),w(ol.$$.fragment),Xt=s(),il=T("p"),il.innerHTML=Vs,qt=s(),Tl=T("p"),Tl.textContent=Zs,Pt=s(),Ml=T("p"),Ml.innerHTML=$s,Kt=s(),Jl=T("p"),Jl.innerHTML=Ns,en=s(),Ul=T("p"),Ul.innerHTML=Fs,ln=s(),w(rl.$$.fragment),tn=s(),K=T("blockquote"),K.innerHTML=Es,nn=s(),w(pl.$$.fragment),sn=s(),dl=T("p"),dl.innerHTML=Qs,an=s(),w(yl.$$.fragment),on=s(),ul=T("p"),ul.innerHTML=Ws,Tn=s(),wl=T("p"),wl.innerHTML=Gs,Mn=s(),cl=T("p"),cl.innerHTML=_s,Jn=s(),w(ml.$$.fragment),Un=s(),gl=T("p"),gl.textContent=xs,rn=s(),w(hl.$$.fragment),pn=s(),bl=T("p"),bl.textContent=Os,dn=s(),w(Il.$$.fragment),yn=s(),fl=T("p"),fl.textContent=Ss,un=s(),Cl=T("ul"),Cl.innerHTML=Hs,wn=s(),w(jl.$$.fragment),cn=s(),Gl=T("p"),this.h()},l(e){const n=Ks("svelte-u9bgzb",document.head);i=M(n,"META",{name:!0,content:!0}),n.forEach(l),j=a(e),J=M(e,"P",{}),H(J).forEach(l),u=a(e),c(d.$$.fragment,e),p=a(e),c(I.$$.fragment,e),k=a(e),r=M(e,"P",{"data-svelte-h":!0}),U(r)!=="svelte-c0efqa"&&(r.textContent=v),V=a(e),c(A.$$.fragment,e),E=a(e),R=M(e,"P",{"data-svelte-h":!0}),U(R)!=="svelte-h5uonc"&&(R.innerHTML=o),f=a(e),C=M(e,"UL",{});var kl=H(C);$=M(kl,"LI",{});var Al=H($);W=M(Al,"P",{"data-svelte-h":!0}),U(W)!=="svelte-1af8c8i"&&(W.innerHTML=G),x=a(Al),y=M(Al,"UL",{});var O=H(y);N=M(O,"LI",{"data-svelte-h":!0}),U(N)!=="svelte-162n4d9"&&(N.textContent=Nn),hn=a(O),Bl=M(O,"LI",{"data-svelte-h":!0}),U(Bl)!=="svelte-8tmb6j"&&(Bl.textContent=Fn),bn=a(O),vl=M(O,"LI",{});var Zn=H(vl);In=zs(Zn,`Example of tool call:
	`),c(ee.$$.fragment,Zn),Zn.forEach(l),fn=a(O),Vl=M(O,"LI",{"data-svelte-h":!0}),U(Vl)!=="svelte-lcg58m"&&(Vl.innerHTML=En),Cn=a(O),Zl=M(O,"LI",{"data-svelte-h":!0}),U(Zl)!=="svelte-1aoquu3"&&(Zl.innerHTML=Qn),O.forEach(l),Al.forEach(l),jn=a(kl),le=M(kl,"LI",{});var gn=H(le);$l=M(gn,"P",{"data-svelte-h":!0}),U($l)!=="svelte-1415nt2"&&($l.innerHTML=Wn),kn=a(gn),_=M(gn,"UL",{});var S=H(_);Nl=M(S,"LI",{"data-svelte-h":!0}),U(Nl)!=="svelte-zh2lf7"&&(Nl.textContent=Gn),An=a(S),Fl=M(S,"LI",{"data-svelte-h":!0}),U(Fl)!=="svelte-11jmc23"&&(Fl.textContent=_n),Rn=a(S),El=M(S,"LI",{});var $n=H(El);Bn=zs($n,`Example of tool call:
	`),c(te.$$.fragment,$n),$n.forEach(l),vn=a(S),Ql=M(S,"LI",{"data-svelte-h":!0}),U(Ql)!=="svelte-1mp0djq"&&(Ql.innerHTML=xn),Vn=a(S),Wl=M(S,"LI",{"data-svelte-h":!0}),U(Wl)!=="svelte-xj73p6"&&(Wl.innerHTML=On),S.forEach(l),gn.forEach(l),kl.forEach(l),_l=a(e),ne=M(e,"P",{"data-svelte-h":!0}),U(ne)!=="svelte-hdti8c"&&(ne.textContent=Sn),xl=a(e),se=M(e,"UL",{"data-svelte-h":!0}),U(se)!=="svelte-e8ufzt"&&(se.innerHTML=Hn),Ol=a(e),c(ae.$$.fragment,e),Sl=a(e),oe=M(e,"P",{"data-svelte-h":!0}),U(oe)!=="svelte-14emhi0"&&(oe.innerHTML=Ln),Hl=a(e),ie=M(e,"P",{"data-svelte-h":!0}),U(ie)!=="svelte-j8myns"&&(ie.innerHTML=zn),Ll=a(e),Te=M(e,"P",{"data-svelte-h":!0}),U(Te)!=="svelte-kajc6a"&&(Te.innerHTML=Yn),zl=a(e),c(Me.$$.fragment,e),Yl=a(e),Je=M(e,"P",{"data-svelte-h":!0}),U(Je)!=="svelte-1gm9mfe"&&(Je.innerHTML=Dn),Dl=a(e),Y=M(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(Y)!=="svelte-1dnx9c"&&(Y.innerHTML=Xn),Xl=a(e),Ue=M(e,"P",{"data-svelte-h":!0}),U(Ue)!=="svelte-1iiqbq7"&&(Ue.textContent=qn),ql=a(e),re=M(e,"P",{"data-svelte-h":!0}),U(re)!=="svelte-1kjrzws"&&(re.innerHTML=Pn),Pl=a(e),D=M(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(D)!=="svelte-ypn55a"&&(D.innerHTML=Kn),Kl=a(e),c(pe.$$.fragment,e),et=a(e),de=M(e,"P",{"data-svelte-h":!0}),U(de)!=="svelte-1fmui99"&&(de.innerHTML=es),lt=a(e),ye=M(e,"P",{"data-svelte-h":!0}),U(ye)!=="svelte-6g59dc"&&(ye.innerHTML=ls),tt=a(e),c(ue.$$.fragment,e),nt=a(e),c(we.$$.fragment,e),st=a(e),ce=M(e,"P",{"data-svelte-h":!0}),U(ce)!=="svelte-fbbc6g"&&(ce.textContent=ts),at=a(e),me=M(e,"UL",{"data-svelte-h":!0}),U(me)!=="svelte-4vxn4y"&&(me.innerHTML=ns),ot=a(e),ge=M(e,"P",{"data-svelte-h":!0}),U(ge)!=="svelte-rh57s1"&&(ge.innerHTML=ss),it=a(e),he=M(e,"P",{"data-svelte-h":!0}),U(he)!=="svelte-zqae9j"&&(he.innerHTML=as),Tt=a(e),c(X.$$.fragment,e),Mt=a(e),c(be.$$.fragment,e),Jt=a(e),Ie=M(e,"P",{"data-svelte-h":!0}),U(Ie)!=="svelte-pfkmt8"&&(Ie.textContent=os),Ut=a(e),fe=M(e,"P",{"data-svelte-h":!0}),U(fe)!=="svelte-sessxc"&&(fe.innerHTML=is),rt=a(e),c(Ce.$$.fragment,e),pt=a(e),je=M(e,"P",{"data-svelte-h":!0}),U(je)!=="svelte-1nzhrrw"&&(je.textContent=Ts),dt=a(e),ke=M(e,"UL",{"data-svelte-h":!0}),U(ke)!=="svelte-1waly9s"&&(ke.innerHTML=Ms),yt=a(e),c(Ae.$$.fragment,e),ut=a(e),c(Re.$$.fragment,e),wt=a(e),Be=M(e,"P",{"data-svelte-h":!0}),U(Be)!=="svelte-1e83m24"&&(Be.innerHTML=Js),ct=a(e),c(ve.$$.fragment,e),mt=a(e),Ve=M(e,"P",{"data-svelte-h":!0}),U(Ve)!=="svelte-a39tyc"&&(Ve.innerHTML=Us),gt=a(e),Ze=M(e,"UL",{"data-svelte-h":!0}),U(Ze)!=="svelte-1f3fqeb"&&(Ze.innerHTML=rs),ht=a(e),$e=M(e,"P",{"data-svelte-h":!0}),U($e)!=="svelte-11i007g"&&($e.innerHTML=ps),bt=a(e),Ne=M(e,"UL",{"data-svelte-h":!0}),U(Ne)!=="svelte-xlpltp"&&(Ne.innerHTML=ds),It=a(e),c(Fe.$$.fragment,e),ft=a(e),Ee=M(e,"P",{"data-svelte-h":!0}),U(Ee)!=="svelte-4h2er2"&&(Ee.textContent=ys),Ct=a(e),Qe=M(e,"UL",{"data-svelte-h":!0}),U(Qe)!=="svelte-1bxk7ay"&&(Qe.innerHTML=us),jt=a(e),c(We.$$.fragment,e),kt=a(e),Ge=M(e,"P",{"data-svelte-h":!0}),U(Ge)!=="svelte-izglpm"&&(Ge.textContent=ws),At=a(e),_e=M(e,"UL",{"data-svelte-h":!0}),U(_e)!=="svelte-eja4z2"&&(_e.innerHTML=cs),Rt=a(e),xe=M(e,"P",{"data-svelte-h":!0}),U(xe)!=="svelte-12z848a"&&(xe.innerHTML=ms),Bt=a(e),Oe=M(e,"P",{"data-svelte-h":!0}),U(Oe)!=="svelte-u83m8z"&&(Oe.textContent=gs),vt=a(e),Se=M(e,"P",{"data-svelte-h":!0}),U(Se)!=="svelte-130hadi"&&(Se.innerHTML=hs),Vt=a(e),c(He.$$.fragment,e),Zt=a(e),Le=M(e,"P",{"data-svelte-h":!0}),U(Le)!=="svelte-t7zb7o"&&(Le.innerHTML=bs),$t=a(e),ze=M(e,"UL",{"data-svelte-h":!0}),U(ze)!=="svelte-1t8zibg"&&(ze.innerHTML=Is),Nt=a(e),Ye=M(e,"P",{"data-svelte-h":!0}),U(Ye)!=="svelte-1o4z3y"&&(Ye.textContent=fs),Ft=a(e),c(De.$$.fragment,e),Et=a(e),c(Xe.$$.fragment,e),Qt=a(e),qe=M(e,"P",{"data-svelte-h":!0}),U(qe)!=="svelte-8dd7rj"&&(qe.textContent=Cs),Wt=a(e),Pe=M(e,"P",{"data-svelte-h":!0}),U(Pe)!=="svelte-jio97"&&(Pe.textContent=js),Gt=a(e),c(Ke.$$.fragment,e),_t=a(e),el=M(e,"P",{"data-svelte-h":!0}),U(el)!=="svelte-1e46wc2"&&(el.innerHTML=ks),xt=a(e),ll=M(e,"P",{"data-svelte-h":!0}),U(ll)!=="svelte-x6h8bb"&&(ll.textContent=As),Ot=a(e),c(q.$$.fragment,e),St=a(e),tl=M(e,"P",{"data-svelte-h":!0}),U(tl)!=="svelte-1bc8e8e"&&(tl.textContent=Rs),Ht=a(e),c(nl.$$.fragment,e),Lt=a(e),sl=M(e,"P",{"data-svelte-h":!0}),U(sl)!=="svelte-1rndc0g"&&(sl.textContent=Bs),zt=a(e),c(al.$$.fragment,e),Yt=a(e),P=M(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(P)!=="svelte-1asgeq0"&&(P.innerHTML=vs),Dt=a(e),c(ol.$$.fragment,e),Xt=a(e),il=M(e,"P",{"data-svelte-h":!0}),U(il)!=="svelte-6s34wk"&&(il.innerHTML=Vs),qt=a(e),Tl=M(e,"P",{"data-svelte-h":!0}),U(Tl)!=="svelte-1x0er27"&&(Tl.textContent=Zs),Pt=a(e),Ml=M(e,"P",{"data-svelte-h":!0}),U(Ml)!=="svelte-1n3puco"&&(Ml.innerHTML=$s),Kt=a(e),Jl=M(e,"P",{"data-svelte-h":!0}),U(Jl)!=="svelte-1mo0wtw"&&(Jl.innerHTML=Ns),en=a(e),Ul=M(e,"P",{"data-svelte-h":!0}),U(Ul)!=="svelte-fr8l0z"&&(Ul.innerHTML=Fs),ln=a(e),c(rl.$$.fragment,e),tn=a(e),K=M(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(K)!=="svelte-gxkl5t"&&(K.innerHTML=Es),nn=a(e),c(pl.$$.fragment,e),sn=a(e),dl=M(e,"P",{"data-svelte-h":!0}),U(dl)!=="svelte-8ye7ad"&&(dl.innerHTML=Qs),an=a(e),c(yl.$$.fragment,e),on=a(e),ul=M(e,"P",{"data-svelte-h":!0}),U(ul)!=="svelte-1k7bqf2"&&(ul.innerHTML=Ws),Tn=a(e),wl=M(e,"P",{"data-svelte-h":!0}),U(wl)!=="svelte-130f0gy"&&(wl.innerHTML=Gs),Mn=a(e),cl=M(e,"P",{"data-svelte-h":!0}),U(cl)!=="svelte-3zhnpr"&&(cl.innerHTML=_s),Jn=a(e),c(ml.$$.fragment,e),Un=a(e),gl=M(e,"P",{"data-svelte-h":!0}),U(gl)!=="svelte-1hjlm82"&&(gl.textContent=xs),rn=a(e),c(hl.$$.fragment,e),pn=a(e),bl=M(e,"P",{"data-svelte-h":!0}),U(bl)!=="svelte-2wlmjx"&&(bl.textContent=Os),dn=a(e),c(Il.$$.fragment,e),yn=a(e),fl=M(e,"P",{"data-svelte-h":!0}),U(fl)!=="svelte-1emppws"&&(fl.textContent=Ss),un=a(e),Cl=M(e,"UL",{"data-svelte-h":!0}),U(Cl)!=="svelte-1hcect5"&&(Cl.innerHTML=Hs),wn=a(e),c(jl.$$.fragment,e),cn=a(e),Gl=M(e,"P",{}),H(Gl).forEach(l),this.h()},h(){Rl(i,"name","hf:doc:metadata"),Rl(i,"content",da),Rl(Y,"class","warning"),Rl(D,"class","tip"),Rl(P,"class","tip"),Rl(K,"class","tip")},m(e,n){B(document.head,i),t(e,j,n),t(e,J,n),t(e,u,n),m(d,e,n),t(e,p,n),m(I,e,n),t(e,k,n),t(e,r,n),t(e,V,n),m(A,e,n),t(e,E,n),t(e,R,n),t(e,f,n),t(e,C,n),B(C,$),B($,W),B($,x),B($,y),B(y,N),B(y,hn),B(y,Bl),B(y,bn),B(y,vl),B(vl,In),m(ee,vl,null),B(y,fn),B(y,Vl),B(y,Cn),B(y,Zl),B(C,jn),B(C,le),B(le,$l),B(le,kn),B(le,_),B(_,Nl),B(_,An),B(_,Fl),B(_,Rn),B(_,El),B(El,Bn),m(te,El,null),B(_,vn),B(_,Ql),B(_,Vn),B(_,Wl),t(e,_l,n),t(e,ne,n),t(e,xl,n),t(e,se,n),t(e,Ol,n),m(ae,e,n),t(e,Sl,n),t(e,oe,n),t(e,Hl,n),t(e,ie,n),t(e,Ll,n),t(e,Te,n),t(e,zl,n),m(Me,e,n),t(e,Yl,n),t(e,Je,n),t(e,Dl,n),t(e,Y,n),t(e,Xl,n),t(e,Ue,n),t(e,ql,n),t(e,re,n),t(e,Pl,n),t(e,D,n),t(e,Kl,n),m(pe,e,n),t(e,et,n),t(e,de,n),t(e,lt,n),t(e,ye,n),t(e,tt,n),m(ue,e,n),t(e,nt,n),m(we,e,n),t(e,st,n),t(e,ce,n),t(e,at,n),t(e,me,n),t(e,ot,n),t(e,ge,n),t(e,it,n),t(e,he,n),t(e,Tt,n),m(X,e,n),t(e,Mt,n),m(be,e,n),t(e,Jt,n),t(e,Ie,n),t(e,Ut,n),t(e,fe,n),t(e,rt,n),m(Ce,e,n),t(e,pt,n),t(e,je,n),t(e,dt,n),t(e,ke,n),t(e,yt,n),m(Ae,e,n),t(e,ut,n),m(Re,e,n),t(e,wt,n),t(e,Be,n),t(e,ct,n),m(ve,e,n),t(e,mt,n),t(e,Ve,n),t(e,gt,n),t(e,Ze,n),t(e,ht,n),t(e,$e,n),t(e,bt,n),t(e,Ne,n),t(e,It,n),m(Fe,e,n),t(e,ft,n),t(e,Ee,n),t(e,Ct,n),t(e,Qe,n),t(e,jt,n),m(We,e,n),t(e,kt,n),t(e,Ge,n),t(e,At,n),t(e,_e,n),t(e,Rt,n),t(e,xe,n),t(e,Bt,n),t(e,Oe,n),t(e,vt,n),t(e,Se,n),t(e,Vt,n),m(He,e,n),t(e,Zt,n),t(e,Le,n),t(e,$t,n),t(e,ze,n),t(e,Nt,n),t(e,Ye,n),t(e,Ft,n),m(De,e,n),t(e,Et,n),m(Xe,e,n),t(e,Qt,n),t(e,qe,n),t(e,Wt,n),t(e,Pe,n),t(e,Gt,n),m(Ke,e,n),t(e,_t,n),t(e,el,n),t(e,xt,n),t(e,ll,n),t(e,Ot,n),m(q,e,n),t(e,St,n),t(e,tl,n),t(e,Ht,n),m(nl,e,n),t(e,Lt,n),t(e,sl,n),t(e,zt,n),m(al,e,n),t(e,Yt,n),t(e,P,n),t(e,Dt,n),m(ol,e,n),t(e,Xt,n),t(e,il,n),t(e,qt,n),t(e,Tl,n),t(e,Pt,n),t(e,Ml,n),t(e,Kt,n),t(e,Jl,n),t(e,en,n),t(e,Ul,n),t(e,ln,n),m(rl,e,n),t(e,tn,n),t(e,K,n),t(e,nn,n),m(pl,e,n),t(e,sn,n),t(e,dl,n),t(e,an,n),m(yl,e,n),t(e,on,n),t(e,ul,n),t(e,Tn,n),t(e,wl,n),t(e,Mn,n),t(e,cl,n),t(e,Jn,n),m(ml,e,n),t(e,Un,n),t(e,gl,n),t(e,rn,n),m(hl,e,n),t(e,pn,n),t(e,bl,n),t(e,dn,n),m(Il,e,n),t(e,yn,n),t(e,fl,n),t(e,un,n),t(e,Cl,n),t(e,wn,n),m(jl,e,n),t(e,cn,n),t(e,Gl,n),mn=!0},p(e,[n]){const kl={};n&2&&(kl.$$scope={dirty:n,ctx:e}),X.$set(kl);const Al={};n&2&&(Al.$$scope={dirty:n,ctx:e}),q.$set(Al)},i(e){mn||(g(d.$$.fragment,e),g(I.$$.fragment,e),g(A.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(ae.$$.fragment,e),g(Me.$$.fragment,e),g(pe.$$.fragment,e),g(ue.$$.fragment,e),g(we.$$.fragment,e),g(X.$$.fragment,e),g(be.$$.fragment,e),g(Ce.$$.fragment,e),g(Ae.$$.fragment,e),g(Re.$$.fragment,e),g(ve.$$.fragment,e),g(Fe.$$.fragment,e),g(We.$$.fragment,e),g(He.$$.fragment,e),g(De.$$.fragment,e),g(Xe.$$.fragment,e),g(Ke.$$.fragment,e),g(q.$$.fragment,e),g(nl.$$.fragment,e),g(al.$$.fragment,e),g(ol.$$.fragment,e),g(rl.$$.fragment,e),g(pl.$$.fragment,e),g(yl.$$.fragment,e),g(ml.$$.fragment,e),g(hl.$$.fragment,e),g(Il.$$.fragment,e),g(jl.$$.fragment,e),mn=!0)},o(e){h(d.$$.fragment,e),h(I.$$.fragment,e),h(A.$$.fragment,e),h(ee.$$.fragment,e),h(te.$$.fragment,e),h(ae.$$.fragment,e),h(Me.$$.fragment,e),h(pe.$$.fragment,e),h(ue.$$.fragment,e),h(we.$$.fragment,e),h(X.$$.fragment,e),h(be.$$.fragment,e),h(Ce.$$.fragment,e),h(Ae.$$.fragment,e),h(Re.$$.fragment,e),h(ve.$$.fragment,e),h(Fe.$$.fragment,e),h(We.$$.fragment,e),h(He.$$.fragment,e),h(De.$$.fragment,e),h(Xe.$$.fragment,e),h(Ke.$$.fragment,e),h(q.$$.fragment,e),h(nl.$$.fragment,e),h(al.$$.fragment,e),h(ol.$$.fragment,e),h(rl.$$.fragment,e),h(pl.$$.fragment,e),h(yl.$$.fragment,e),h(ml.$$.fragment,e),h(hl.$$.fragment,e),h(Il.$$.fragment,e),h(jl.$$.fragment,e),mn=!1},d(e){e&&(l(j),l(J),l(u),l(p),l(k),l(r),l(V),l(E),l(R),l(f),l(C),l(_l),l(ne),l(xl),l(se),l(Ol),l(Sl),l(oe),l(Hl),l(ie),l(Ll),l(Te),l(zl),l(Yl),l(Je),l(Dl),l(Y),l(Xl),l(Ue),l(ql),l(re),l(Pl),l(D),l(Kl),l(et),l(de),l(lt),l(ye),l(tt),l(nt),l(st),l(ce),l(at),l(me),l(ot),l(ge),l(it),l(he),l(Tt),l(Mt),l(Jt),l(Ie),l(Ut),l(fe),l(rt),l(pt),l(je),l(dt),l(ke),l(yt),l(ut),l(wt),l(Be),l(ct),l(mt),l(Ve),l(gt),l(Ze),l(ht),l($e),l(bt),l(Ne),l(It),l(ft),l(Ee),l(Ct),l(Qe),l(jt),l(kt),l(Ge),l(At),l(_e),l(Rt),l(xe),l(Bt),l(Oe),l(vt),l(Se),l(Vt),l(Zt),l(Le),l($t),l(ze),l(Nt),l(Ye),l(Ft),l(Et),l(Qt),l(qe),l(Wt),l(Pe),l(Gt),l(_t),l(el),l(xt),l(ll),l(Ot),l(St),l(tl),l(Ht),l(Lt),l(sl),l(zt),l(Yt),l(P),l(Dt),l(Xt),l(il),l(qt),l(Tl),l(Pt),l(Ml),l(Kt),l(Jl),l(en),l(Ul),l(ln),l(tn),l(K),l(nn),l(sn),l(dl),l(an),l(on),l(ul),l(Tn),l(wl),l(Mn),l(cl),l(Jn),l(Un),l(gl),l(rn),l(pn),l(bl),l(dn),l(yn),l(fl),l(un),l(Cl),l(wn),l(cn),l(Gl)),l(i),b(d,e),b(I,e),b(A,e),b(ee),b(te),b(ae,e),b(Me,e),b(pe,e),b(ue,e),b(we,e),b(X,e),b(be,e),b(Ce,e),b(Ae,e),b(Re,e),b(ve,e),b(Fe,e),b(We,e),b(He,e),b(De,e),b(Xe,e),b(Ke,e),b(q,e),b(nl,e),b(al,e),b(ol,e),b(rl,e),b(pl,e),b(yl,e),b(ml,e),b(hl,e),b(Il,e),b(jl,e)}}}const da='{"title":"Agents - Guided tour","local":"agents---guided-tour","sections":[{"title":"Choosing an agent type: CodeAgent or ToolCallingAgent","local":"choosing-an-agent-type-codeagent-or-toolcallingagent","sections":[],"depth":2},{"title":"CodeAgent","local":"codeagent","sections":[{"title":"ToolCallingAgent","local":"toolcallingagent","sections":[],"depth":3}],"depth":2},{"title":"Building your agent","local":"building-your-agent","sections":[{"title":"Model parameter management","local":"model-parameter-management","sections":[],"depth":3}],"depth":2},{"title":"Advanced agent configuration","local":"advanced-agent-configuration","sections":[{"title":"Customizing agent termination conditions","local":"customizing-agent-termination-conditions","sections":[],"depth":3}],"depth":2},{"title":"Inspecting an agent run","local":"inspecting-an-agent-run","sections":[],"depth":2},{"title":"Tools","local":"tools","sections":[{"title":"Default toolbox","local":"default-toolbox","sections":[],"depth":3},{"title":"Create a new tool","local":"create-a-new-tool","sections":[],"depth":3}],"depth":2},{"title":"Multi-agents","local":"multi-agents","sections":[],"depth":2},{"title":"Talk with your agent and visualize its thoughts in a cool Gradio interface","local":"talk-with-your-agent-and-visualize-its-thoughts-in-a-cool-gradio-interface","sections":[],"depth":2},{"title":"Next steps","local":"next-steps","sections":[],"depth":2}],"depth":1}';function ya(F){return Xs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ba extends qs{constructor(i){super(),Ps(this,i,ya,pa,Ds,{})}}export{ba as component};
