import{s as qs,o as Ps,n as Y}from"../chunks/scheduler.3d32dc09.js";import{S as Ks,i as eo,e as T,s,c as w,q as Ys,h as lo,a as M,d as l,b as o,f as L,g as c,j as U,r as Ds,k as Rl,l as V,m as t,n as m,t as g,o as h,p as b}from"../chunks/index.f9718211.js";import{C as to,H as G,E as no}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.51c38499.js";import{C as $}from"../chunks/CodeBlock.ab331c21.js";import{D as so}from"../chunks/DocNotebookDropdown.79c5aa63.js";import{H as Xs,a as z}from"../chunks/HfOption.7cc30e92.js";function oo(Z){let i,I="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,y,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,f,k;return f=new $({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=I,J=s(),y=T("p"),y.innerHTML=d,p=s(),w(f.$$.fragment)},l(r){i=M(r,"P",{"data-svelte-h":!0}),U(i)!=="svelte-1wdptq1"&&(i.innerHTML=I),J=o(r),y=M(r,"P",{"data-svelte-h":!0}),U(y)!=="svelte-bsbjyv"&&(y.innerHTML=d),p=o(r),c(f.$$.fragment,r)},m(r,R){t(r,i,R),t(r,J,R),t(r,y,R),t(r,p,R),m(f,r,R),k=!0},p:Y,i(r){k||(g(f.$$.fragment,r),k=!0)},o(r){h(f.$$.fragment,r),k=!1},d(r){r&&(l(i),l(J),l(y),l(p)),b(f,r)}}}function ao(Z){let i,I;return i=new $({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,y){m(i,J,y),I=!0},p:Y,i(J){I||(g(i.$$.fragment,J),I=!0)},o(J){h(i.$$.fragment,J),I=!1},d(J){b(i,J)}}}function io(Z){let i,I="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,y,d;return y=new $({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=I,J=s(),w(y.$$.fragment)},l(p){i=M(p,"P",{"data-svelte-h":!0}),U(i)!=="svelte-1iplh0r"&&(i.innerHTML=I),J=o(p),c(y.$$.fragment,p)},m(p,f){t(p,i,f),t(p,J,f),m(y,p,f),d=!0},p:Y,i(p){d||(g(y.$$.fragment,p),d=!0)},o(p){h(y.$$.fragment,p),d=!1},d(p){p&&(l(i),l(J)),b(y,p)}}}function To(Z){let i,I;return i=new $({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,y){m(i,J,y),I=!0},p:Y,i(J){I||(g(i.$$.fragment,J),I=!0)},o(J){h(i.$$.fragment,J),I=!1},d(J){b(i,J)}}}function Mo(Z){let i,I="To connect to Azure OpenAI, you can either use <code>AzureOpenAIServerModel</code> directly, or use <code>LiteLLMModel</code> and configure it accordingly.",J,y,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,f,k,r,R="Similarly, you can configure <code>LiteLLMModel</code> to connect to Azure OpenAI as follows:",A,v,N="<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>",B,a,u;return f=new $({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}}),a=new $({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=I,J=s(),y=T("p"),y.innerHTML=d,p=s(),w(f.$$.fragment),k=s(),r=T("p"),r.innerHTML=R,A=s(),v=T("ul"),v.innerHTML=N,B=s(),w(a.$$.fragment)},l(j){i=M(j,"P",{"data-svelte-h":!0}),U(i)!=="svelte-1hxxlnu"&&(i.innerHTML=I),J=o(j),y=M(j,"P",{"data-svelte-h":!0}),U(y)!=="svelte-1q2js0j"&&(y.innerHTML=d),p=o(j),c(f.$$.fragment,j),k=o(j),r=M(j,"P",{"data-svelte-h":!0}),U(r)!=="svelte-116rusl"&&(r.innerHTML=R),A=o(j),v=M(j,"UL",{"data-svelte-h":!0}),U(v)!=="svelte-1nzt61u"&&(v.innerHTML=N),B=o(j),c(a.$$.fragment,j)},m(j,F){t(j,i,F),t(j,J,F),t(j,y,F),t(j,p,F),m(f,j,F),t(j,k,F),t(j,r,F),t(j,A,F),t(j,v,F),t(j,B,F),m(a,j,F),u=!0},p:Y,i(j){u||(g(f.$$.fragment,j),g(a.$$.fragment,j),u=!0)},o(j){h(f.$$.fragment,j),h(a.$$.fragment,j),u=!1},d(j){j&&(l(i),l(J),l(y),l(p),l(k),l(r),l(A),l(v),l(B)),b(f,j),b(a,j)}}}function Jo(Z){let i,I="The <code>AmazonBedrockServerModel</code> class provides native integration with Amazon Bedrock, allowing for direct API calls and comprehensive configuration.",J,y,d="Basic Usage:",p,f,k,r,R="Advanced Configuration:",A,v,N,B,a="Using LiteLLMModel:",u,j,F="Alternatively, you can use <code>LiteLLMModel</code> with Bedrock models:",W,Q,_;return f=new $({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}}),v=new $({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}}),Q=new $({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=I,J=s(),y=T("p"),y.textContent=d,p=s(),w(f.$$.fragment),k=s(),r=T("p"),r.textContent=R,A=s(),w(v.$$.fragment),N=s(),B=T("p"),B.textContent=a,u=s(),j=T("p"),j.innerHTML=F,W=s(),w(Q.$$.fragment)},l(C){i=M(C,"P",{"data-svelte-h":!0}),U(i)!=="svelte-1t09vg6"&&(i.innerHTML=I),J=o(C),y=M(C,"P",{"data-svelte-h":!0}),U(y)!=="svelte-16zanz3"&&(y.textContent=d),p=o(C),c(f.$$.fragment,C),k=o(C),r=M(C,"P",{"data-svelte-h":!0}),U(r)!=="svelte-e5fqn2"&&(r.textContent=R),A=o(C),c(v.$$.fragment,C),N=o(C),B=M(C,"P",{"data-svelte-h":!0}),U(B)!=="svelte-121tojm"&&(B.textContent=a),u=o(C),j=M(C,"P",{"data-svelte-h":!0}),U(j)!=="svelte-zwun4n"&&(j.innerHTML=F),W=o(C),c(Q.$$.fragment,C)},m(C,E){t(C,i,E),t(C,J,E),t(C,y,E),t(C,p,E),m(f,C,E),t(C,k,E),t(C,r,E),t(C,A,E),m(v,C,E),t(C,N,E),t(C,B,E),t(C,u,E),t(C,j,E),t(C,W,E),m(Q,C,E),_=!0},p:Y,i(C){_||(g(f.$$.fragment,C),g(v.$$.fragment,C),g(Q.$$.fragment,C),_=!0)},o(C){h(f.$$.fragment,C),h(v.$$.fragment,C),h(Q.$$.fragment,C),_=!1},d(C){C&&(l(i),l(J),l(y),l(p),l(k),l(r),l(A),l(N),l(B),l(u),l(j),l(W)),b(f,C),b(v,C),b(Q,C)}}}function Uo(Z){let i,I;return i=new $({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,y){m(i,J,y),I=!0},p:Y,i(J){I||(g(i.$$.fragment,J),I=!0)},o(J){h(i.$$.fragment,J),I=!1},d(J){b(i,J)}}}function ro(Z){let i,I,J,y,d,p,f,k,r,R,A,v,N,B;return i=new z({props:{id:"Pick a LLM",option:"Inference Providers",$$slots:{default:[oo]},$$scope:{ctx:Z}}}),J=new z({props:{id:"Pick a LLM",option:"Local Transformers Model",$$slots:{default:[ao]},$$scope:{ctx:Z}}}),d=new z({props:{id:"Pick a LLM",option:"OpenAI or Anthropic API",$$slots:{default:[io]},$$scope:{ctx:Z}}}),f=new z({props:{id:"Pick a LLM",option:"Ollama",$$slots:{default:[To]},$$scope:{ctx:Z}}}),r=new z({props:{id:"Pick a LLM",option:"Azure OpenAI",$$slots:{default:[Mo]},$$scope:{ctx:Z}}}),A=new z({props:{id:"Pick a LLM",option:"Amazon Bedrock",$$slots:{default:[Jo]},$$scope:{ctx:Z}}}),N=new z({props:{id:"Pick a LLM",option:"mlx-lm",$$slots:{default:[Uo]},$$scope:{ctx:Z}}}),{c(){w(i.$$.fragment),I=s(),w(J.$$.fragment),y=s(),w(d.$$.fragment),p=s(),w(f.$$.fragment),k=s(),w(r.$$.fragment),R=s(),w(A.$$.fragment),v=s(),w(N.$$.fragment)},l(a){c(i.$$.fragment,a),I=o(a),c(J.$$.fragment,a),y=o(a),c(d.$$.fragment,a),p=o(a),c(f.$$.fragment,a),k=o(a),c(r.$$.fragment,a),R=o(a),c(A.$$.fragment,a),v=o(a),c(N.$$.fragment,a)},m(a,u){m(i,a,u),t(a,I,u),m(J,a,u),t(a,y,u),m(d,a,u),t(a,p,u),m(f,a,u),t(a,k,u),m(r,a,u),t(a,R,u),m(A,a,u),t(a,v,u),m(N,a,u),B=!0},p(a,u){const j={};u&2&&(j.$$scope={dirty:u,ctx:a}),i.$set(j);const F={};u&2&&(F.$$scope={dirty:u,ctx:a}),J.$set(F);const W={};u&2&&(W.$$scope={dirty:u,ctx:a}),d.$set(W);const Q={};u&2&&(Q.$$scope={dirty:u,ctx:a}),f.$set(Q);const _={};u&2&&(_.$$scope={dirty:u,ctx:a}),r.$set(_);const C={};u&2&&(C.$$scope={dirty:u,ctx:a}),A.$set(C);const E={};u&2&&(E.$$scope={dirty:u,ctx:a}),N.$set(E)},i(a){B||(g(i.$$.fragment,a),g(J.$$.fragment,a),g(d.$$.fragment,a),g(f.$$.fragment,a),g(r.$$.fragment,a),g(A.$$.fragment,a),g(N.$$.fragment,a),B=!0)},o(a){h(i.$$.fragment,a),h(J.$$.fragment,a),h(d.$$.fragment,a),h(f.$$.fragment,a),h(r.$$.fragment,a),h(A.$$.fragment,a),h(N.$$.fragment,a),B=!1},d(a){a&&(l(I),l(y),l(p),l(k),l(R),l(v)),b(i,a),b(J,a),b(d,a),b(f,a),b(r,a),b(A,a),b(N,a)}}}function po(Z){let i,I,J,y="The function needs:",d,p,f="<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,R="All these elements will be automatically baked into the agent’s system prompt upon initialization: so strive to make them as clear as possible!",A,v,N='<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>',B;return i=new $({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),I=s(),J=T("p"),J.textContent=y,d=s(),p=T("ul"),p.innerHTML=f,k=s(),r=T("p"),r.textContent=R,A=s(),v=T("blockquote"),v.innerHTML=N,this.h()},l(a){c(i.$$.fragment,a),I=o(a),J=M(a,"P",{"data-svelte-h":!0}),U(J)!=="svelte-10btble"&&(J.textContent=y),d=o(a),p=M(a,"UL",{"data-svelte-h":!0}),U(p)!=="svelte-1uouvtx"&&(p.innerHTML=f),k=o(a),r=M(a,"P",{"data-svelte-h":!0}),U(r)!=="svelte-1prqddm"&&(r.textContent=R),A=o(a),v=M(a,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(v)!=="svelte-1262wle"&&(v.innerHTML=N),this.h()},h(){Rl(v,"class","tip")},m(a,u){m(i,a,u),t(a,I,u),t(a,J,u),t(a,d,u),t(a,p,u),t(a,k,u),t(a,r,u),t(a,A,u),t(a,v,u),B=!0},p:Y,i(a){B||(g(i.$$.fragment,a),B=!0)},o(a){h(i.$$.fragment,a),B=!1},d(a){a&&(l(I),l(J),l(d),l(p),l(k),l(r),l(A),l(v)),b(i,a)}}}function yo(Z){let i,I,J,y="The subclass needs the following attributes:",d,p,f=`<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 $({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),I=s(),J=T("p"),J.textContent=y,d=s(),p=T("ul"),p.innerHTML=f},l(r){c(i.$$.fragment,r),I=o(r),J=M(r,"P",{"data-svelte-h":!0}),U(J)!=="svelte-1axnp6t"&&(J.textContent=y),d=o(r),p=M(r,"UL",{"data-svelte-h":!0}),U(p)!=="svelte-1e7an1b"&&(p.innerHTML=f)},m(r,R){m(i,r,R),t(r,I,R),t(r,J,R),t(r,d,R),t(r,p,R),k=!0},p:Y,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(d),l(p)),b(i,r)}}}function uo(Z){let i,I,J,y;return i=new z({props:{id:"build-a-tool",option:"Decorate a function with @tool",$$slots:{default:[po]},$$scope:{ctx:Z}}}),J=new z({props:{id:"build-a-tool",option:"Subclass Tool",$$slots:{default:[yo]},$$scope:{ctx:Z}}}),{c(){w(i.$$.fragment),I=s(),w(J.$$.fragment)},l(d){c(i.$$.fragment,d),I=o(d),c(J.$$.fragment,d)},m(d,p){m(i,d,p),t(d,I,p),m(J,d,p),y=!0},p(d,p){const f={};p&2&&(f.$$scope={dirty:p,ctx:d}),i.$set(f);const k={};p&2&&(k.$$scope={dirty:p,ctx:d}),J.$set(k)},i(d){y||(g(i.$$.fragment,d),g(J.$$.fragment,d),y=!0)},o(d){h(i.$$.fragment,d),h(J.$$.fragment,d),y=!1},d(d){d&&l(I),b(i,d),b(J,d)}}}function wo(Z){let i,I,J,y,d,p,f,k,r,R,A,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.",N,B,a,u,j=`<code>smolagents</code> comes with two agent classes: <a href="/docs/smolagents/v1.22.0/en/reference/agents#smolagents.CodeAgent">CodeAgent</a> and <a href="/docs/smolagents/v1.22.0/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,W,Q,_,C='<a href="/docs/smolagents/v1.22.0/en/reference/agents#smolagents.CodeAgent">CodeAgent</a> generates tool calls as Python code snippets.',E,x,Bl,En="The code is executed either locally (potentially unsecure) or in a secure sandbox.",fn,Vl,Qn="Tools are exposed as Python functions (via bindings).",In,$l,Cn,le,jn,Zl,Wn="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>",kn,Nl,Gn="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>",vn,te,Fl,_n='<a href="/docs/smolagents/v1.22.0/en/reference/agents#smolagents.ToolCallingAgent">ToolCallingAgent</a> writes tool calls as structured JSON.',An,O,El,xn="This is the common format used in many frameworks (OpenAI API), allowing for structured tool interactions without code execution.",Rn,Ql,On="Tools are defined with a JSON schema: name, description, parameter types, etc.",Bn,Wl,Vn,ne,$n,Gl,Sn="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>",Zn,_l,Hn="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>",Ol,se,Ln="When to use which agent type:",Sl,oe,zn='<li><p>Use <a href="/docs/smolagents/v1.22.0/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/v1.22.0/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>',Hl,ae,Ll,ie,Yn='<a href="/docs/smolagents/v1.22.0/en/reference/agents#smolagents.CodeAgent">CodeAgent</a> generates Python code snippets to perform actions and solve tasks.',zl,Te,Dn=`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.`,Yl,Me,Xn=`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/v1.22.0/en/reference/agents#smolagents.CodeAgent">CodeAgent</a>:`,Dl,Je,Xl,Ue,qn=`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.`,ql,D,Pn="<p>The LLM can generate arbitrary code that will then be executed: do not add any unsafe imports!</p>",Pl,re,Kn="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.",Kl,pe,es='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.',et,X,ls='<p>Learn more about code execution <a href="tutorials/secure_code_execution">in this tutorial</a>.</p>',lt,de,tt,ye,ts='<a href="/docs/smolagents/v1.22.0/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.',nt,ue,ns='It works much in the same way like <a href="/docs/smolagents/v1.22.0/en/reference/agents#smolagents.CodeAgent">CodeAgent</a>, of course without <code>additional_authorized_imports</code> since it doesn’t execute code:',st,we,ot,ce,at,me,ss="To initialize a minimal agent, you need at least these two arguments:",it,ge,os='<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/v1.22.0/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/v1.22.0/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/v1.22.0/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/v1.22.0/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/v1.22.0/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/v1.22.0/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>',Tt,he,as='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>.',Mt,be,is=`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.`,Jt,q,Ut,fe,rt,Ie,Ts=`When initializing models, you can pass keyword arguments that will be forwarded as completion parameters to the
underlying model API during inference.`,pt,Ce,Ms=`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:`,dt,je,yt,ke,Js="This is particularly useful when:",ut,ve,Us="<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>",wt,Ae,ct,Re,mt,Be,rs=`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:`,gt,Ve,ht,$e,ps="The <code>final_answer_checks</code> parameter accepts a list of functions that each:",bt,Ze,ds="<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>",ft,Ne,ys=`If any function returns <code>False</code>, the agent will log the error message and continue the run.
This validation mechanism enables:`,It,Fe,us="<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>",Ct,Ee,jt,Qe,ws="Here are a few useful attributes to inspect what happened after a run:",kt,We,cs="<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>",vt,Ge,At,_e,ms="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:",Rt,xe,gs="<li>A name</li> <li>A description</li> <li>Input types and descriptions</li> <li>An output type</li>",Bt,Oe,hs='You can for instance check the <a href="/docs/smolagents/v1.22.0/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.',Vt,Se,bs="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.",$t,He,fs="<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.",Zt,Le,Nt,ze,Is="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>:",Ft,Ye,Cs='<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/v1.22.0/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>',Et,De,js="You can manually use a tool by calling it with its arguments.",Qt,Xe,Wt,qe,Gt,Pe,ks=`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.`,_t,Ke,vs="You’ll start with the code below.",xt,el,Ot,ll,As=`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/v1.22.0/en/reference/tools#smolagents.Tool">Tool</a>, which gives you more flexibility, for instance the possibility to initialize heavy class attributes.`,St,tl,Rs="Let’s see how it works for both options:",Ht,P,Lt,nl,Bs="Then you can directly initialize your agent:",zt,sl,Yt,ol,Vs="You get the following logs:",Dt,al,Xt,K,$s='<p>Read more on tools in the <a href="./tutorials/tools#what-is-a-tool-and-how-to-build-one">dedicated tutorial</a>.</p>',qt,il,Pt,Tl,Zs='Multi-agent systems have been introduced with Microsoft’s framework <a href="https://huggingface.co/papers/2308.08155" rel="nofollow">Autogen</a>.',Kt,Ml,Ns=`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.`,en,Jl,Fs="You can easily build hierarchical multi-agent systems with <code>smolagents</code>.",ln,Ul,Es=`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.`,tn,rl,Qs='Here’s an example of making an agent that managed a specific web search agent using our native <a href="/docs/smolagents/v1.22.0/en/reference/default_tools#smolagents.WebSearchTool">WebSearchTool</a>:',nn,pl,sn,ee,Ws='<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>',on,dl,an,yl,Gs="You can use <code>GradioUI</code> to interactively submit tasks to your agent and observe its thought and execution process, here is an example:",Tn,ul,Mn,wl,_s=`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.`,Jn,cl,xs="You can also use this <code>reset=False</code> argument to keep the conversation going in any other agentic application.",Un,ml,Os=`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.`,rn,gl,pn,hl,Ss="Finally, when you’ve configured your agent to your needs, you can share it to the Hub!",dn,bl,yn,fl,Hs="Similarly, to load an agent that has been pushed to hub, if you trust the code from its tools, use:",un,Il,wn,Cl,Ls="For more in-depth usage, you will then want to check out our tutorials:",cn,jl,zs='<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>',mn,kl,gn,xl,hn;return d=new to({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),f=new G({props:{title:"Agents - Guided tour",local:"agents---guided-tour",headingTag:"h1"}}),r=new so({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"}]}}),B=new G({props:{title:"Choosing an agent type: CodeAgent or ToolCallingAgent",local:"choosing-an-agent-type-codeagent-or-toolcallingagent",headingTag:"h2"}}),le=new $({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}}),ne=new $({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 G({props:{title:"CodeAgent",local:"codeagent",headingTag:"h2"}}),Je=new $({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}}),de=new G({props:{title:"ToolCallingAgent",local:"toolcallingagent",headingTag:"h3"}}),we=new $({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}}),ce=new G({props:{title:"Building your agent",local:"building-your-agent",headingTag:"h2"}}),q=new Xs({props:{id:"Pick a LLM",options:["Inference Providers","Local Transformers Model","OpenAI or Anthropic API","Ollama","Azure OpenAI","Amazon Bedrock","mlx-lm"],$$slots:{default:[ro]},$$scope:{ctx:Z}}}),fe=new G({props:{title:"Model parameter management",local:"model-parameter-management",headingTag:"h3"}}),je=new $({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 G({props:{title:"Advanced agent configuration",local:"advanced-agent-configuration",headingTag:"h2"}}),Re=new G({props:{title:"Customizing agent termination conditions",local:"customizing-agent-termination-conditions",headingTag:"h3"}}),Ve=new $({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}}),Ee=new G({props:{title:"Inspecting an agent run",local:"inspecting-an-agent-run",headingTag:"h2"}}),Ge=new G({props:{title:"Tools",local:"tools",headingTag:"h2"}}),Le=new G({props:{title:"Default toolbox",local:"default-toolbox",headingTag:"h3"}}),Xe=new $({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}}),qe=new G({props:{title:"Create a new tool",local:"create-a-new-tool",headingTag:"h3"}}),el=new $({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}}),P=new Xs({props:{id:"build-a-tool",options:["Decorate a function with @tool","Subclass Tool"],$$slots:{default:[uo]},$$scope:{ctx:Z}}}),sl=new $({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 $({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}}),il=new G({props:{title:"Multi-agents",local:"multi-agents",headingTag:"h2"}}),pl=new $({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}}),dl=new G({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"}}),ul=new $({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}}),gl=new G({props:{title:"Next steps",local:"next-steps",headingTag:"h2"}}),bl=new $({props:{code:"YWdlbnQucHVzaF90b19odWIoJTIybS1yaWMlMkZteV9hZ2VudCUyMik=",highlighted:'agent.push_to_hub(<span class="hljs-string">&quot;m-ric/my_agent&quot;</span>)',wrap:!1}}),Il=new $({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}}),kl=new no({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/en/guided_tour.md"}}),{c(){i=T("meta"),I=s(),J=T("p"),y=s(),w(d.$$.fragment),p=s(),w(f.$$.fragment),k=s(),w(r.$$.fragment),R=s(),A=T("p"),A.textContent=v,N=s(),w(B.$$.fragment),a=s(),u=T("p"),u.innerHTML=j,F=s(),W=T("ul"),Q=T("li"),_=T("p"),_.innerHTML=C,E=s(),x=T("ul"),Bl=T("li"),Bl.textContent=En,fn=s(),Vl=T("li"),Vl.textContent=Qn,In=s(),$l=T("li"),Cn=Ys(`Example of tool call:
	`),w(le.$$.fragment),jn=s(),Zl=T("li"),Zl.innerHTML=Wn,kn=s(),Nl=T("li"),Nl.innerHTML=Gn,vn=s(),te=T("li"),Fl=T("p"),Fl.innerHTML=_n,An=s(),O=T("ul"),El=T("li"),El.textContent=xn,Rn=s(),Ql=T("li"),Ql.textContent=On,Bn=s(),Wl=T("li"),Vn=Ys(`Example of tool call:
	`),w(ne.$$.fragment),$n=s(),Gl=T("li"),Gl.innerHTML=Sn,Zn=s(),_l=T("li"),_l.innerHTML=Hn,Ol=s(),se=T("p"),se.textContent=Ln,Sl=s(),oe=T("ul"),oe.innerHTML=zn,Hl=s(),w(ae.$$.fragment),Ll=s(),ie=T("p"),ie.innerHTML=Yn,zl=s(),Te=T("p"),Te.innerHTML=Dn,Yl=s(),Me=T("p"),Me.innerHTML=Xn,Dl=s(),w(Je.$$.fragment),Xl=s(),Ue=T("p"),Ue.innerHTML=qn,ql=s(),D=T("blockquote"),D.innerHTML=Pn,Pl=s(),re=T("p"),re.textContent=Kn,Kl=s(),pe=T("p"),pe.innerHTML=es,et=s(),X=T("blockquote"),X.innerHTML=ls,lt=s(),w(de.$$.fragment),tt=s(),ye=T("p"),ye.innerHTML=ts,nt=s(),ue=T("p"),ue.innerHTML=ns,st=s(),w(we.$$.fragment),ot=s(),w(ce.$$.fragment),at=s(),me=T("p"),me.textContent=ss,it=s(),ge=T("ul"),ge.innerHTML=os,Tt=s(),he=T("p"),he.innerHTML=as,Mt=s(),be=T("p"),be.innerHTML=is,Jt=s(),w(q.$$.fragment),Ut=s(),w(fe.$$.fragment),rt=s(),Ie=T("p"),Ie.textContent=Ts,pt=s(),Ce=T("p"),Ce.innerHTML=Ms,dt=s(),w(je.$$.fragment),yt=s(),ke=T("p"),ke.textContent=Js,ut=s(),ve=T("ul"),ve.innerHTML=Us,wt=s(),w(Ae.$$.fragment),ct=s(),w(Re.$$.fragment),mt=s(),Be=T("p"),Be.innerHTML=rs,gt=s(),w(Ve.$$.fragment),ht=s(),$e=T("p"),$e.innerHTML=ps,bt=s(),Ze=T("ul"),Ze.innerHTML=ds,ft=s(),Ne=T("p"),Ne.innerHTML=ys,It=s(),Fe=T("ul"),Fe.innerHTML=us,Ct=s(),w(Ee.$$.fragment),jt=s(),Qe=T("p"),Qe.textContent=ws,kt=s(),We=T("ul"),We.innerHTML=cs,vt=s(),w(Ge.$$.fragment),At=s(),_e=T("p"),_e.textContent=ms,Rt=s(),xe=T("ul"),xe.innerHTML=gs,Bt=s(),Oe=T("p"),Oe.innerHTML=hs,Vt=s(),Se=T("p"),Se.textContent=bs,$t=s(),He=T("p"),He.innerHTML=fs,Zt=s(),w(Le.$$.fragment),Nt=s(),ze=T("p"),ze.innerHTML=Is,Ft=s(),Ye=T("ul"),Ye.innerHTML=Cs,Et=s(),De=T("p"),De.textContent=js,Qt=s(),w(Xe.$$.fragment),Wt=s(),w(qe.$$.fragment),Gt=s(),Pe=T("p"),Pe.textContent=ks,_t=s(),Ke=T("p"),Ke.textContent=vs,xt=s(),w(el.$$.fragment),Ot=s(),ll=T("p"),ll.innerHTML=As,St=s(),tl=T("p"),tl.textContent=Rs,Ht=s(),w(P.$$.fragment),Lt=s(),nl=T("p"),nl.textContent=Bs,zt=s(),w(sl.$$.fragment),Yt=s(),ol=T("p"),ol.textContent=Vs,Dt=s(),w(al.$$.fragment),Xt=s(),K=T("blockquote"),K.innerHTML=$s,qt=s(),w(il.$$.fragment),Pt=s(),Tl=T("p"),Tl.innerHTML=Zs,Kt=s(),Ml=T("p"),Ml.textContent=Ns,en=s(),Jl=T("p"),Jl.innerHTML=Fs,ln=s(),Ul=T("p"),Ul.innerHTML=Es,tn=s(),rl=T("p"),rl.innerHTML=Qs,nn=s(),w(pl.$$.fragment),sn=s(),ee=T("blockquote"),ee.innerHTML=Ws,on=s(),w(dl.$$.fragment),an=s(),yl=T("p"),yl.innerHTML=Gs,Tn=s(),w(ul.$$.fragment),Mn=s(),wl=T("p"),wl.innerHTML=_s,Jn=s(),cl=T("p"),cl.innerHTML=xs,Un=s(),ml=T("p"),ml.innerHTML=Os,rn=s(),w(gl.$$.fragment),pn=s(),hl=T("p"),hl.textContent=Ss,dn=s(),w(bl.$$.fragment),yn=s(),fl=T("p"),fl.textContent=Hs,un=s(),w(Il.$$.fragment),wn=s(),Cl=T("p"),Cl.textContent=Ls,cn=s(),jl=T("ul"),jl.innerHTML=zs,mn=s(),w(kl.$$.fragment),gn=s(),xl=T("p"),this.h()},l(e){const n=lo("svelte-u9bgzb",document.head);i=M(n,"META",{name:!0,content:!0}),n.forEach(l),I=o(e),J=M(e,"P",{}),L(J).forEach(l),y=o(e),c(d.$$.fragment,e),p=o(e),c(f.$$.fragment,e),k=o(e),c(r.$$.fragment,e),R=o(e),A=M(e,"P",{"data-svelte-h":!0}),U(A)!=="svelte-c0efqa"&&(A.textContent=v),N=o(e),c(B.$$.fragment,e),a=o(e),u=M(e,"P",{"data-svelte-h":!0}),U(u)!=="svelte-r0nmgq"&&(u.innerHTML=j),F=o(e),W=M(e,"UL",{});var vl=L(W);Q=M(vl,"LI",{});var Al=L(Q);_=M(Al,"P",{"data-svelte-h":!0}),U(_)!=="svelte-1p3hqho"&&(_.innerHTML=C),E=o(Al),x=M(Al,"UL",{});var S=L(x);Bl=M(S,"LI",{"data-svelte-h":!0}),U(Bl)!=="svelte-162n4d9"&&(Bl.textContent=En),fn=o(S),Vl=M(S,"LI",{"data-svelte-h":!0}),U(Vl)!=="svelte-8tmb6j"&&(Vl.textContent=Qn),In=o(S),$l=M(S,"LI",{});var Nn=L($l);Cn=Ds(Nn,`Example of tool call:
	`),c(le.$$.fragment,Nn),Nn.forEach(l),jn=o(S),Zl=M(S,"LI",{"data-svelte-h":!0}),U(Zl)!=="svelte-lcg58m"&&(Zl.innerHTML=Wn),kn=o(S),Nl=M(S,"LI",{"data-svelte-h":!0}),U(Nl)!=="svelte-1aoquu3"&&(Nl.innerHTML=Gn),S.forEach(l),Al.forEach(l),vn=o(vl),te=M(vl,"LI",{});var bn=L(te);Fl=M(bn,"P",{"data-svelte-h":!0}),U(Fl)!=="svelte-h3075s"&&(Fl.innerHTML=_n),An=o(bn),O=M(bn,"UL",{});var H=L(O);El=M(H,"LI",{"data-svelte-h":!0}),U(El)!=="svelte-zh2lf7"&&(El.textContent=xn),Rn=o(H),Ql=M(H,"LI",{"data-svelte-h":!0}),U(Ql)!=="svelte-11jmc23"&&(Ql.textContent=On),Bn=o(H),Wl=M(H,"LI",{});var Fn=L(Wl);Vn=Ds(Fn,`Example of tool call:
	`),c(ne.$$.fragment,Fn),Fn.forEach(l),$n=o(H),Gl=M(H,"LI",{"data-svelte-h":!0}),U(Gl)!=="svelte-1mp0djq"&&(Gl.innerHTML=Sn),Zn=o(H),_l=M(H,"LI",{"data-svelte-h":!0}),U(_l)!=="svelte-xj73p6"&&(_l.innerHTML=Hn),H.forEach(l),bn.forEach(l),vl.forEach(l),Ol=o(e),se=M(e,"P",{"data-svelte-h":!0}),U(se)!=="svelte-hdti8c"&&(se.textContent=Ln),Sl=o(e),oe=M(e,"UL",{"data-svelte-h":!0}),U(oe)!=="svelte-14izq5r"&&(oe.innerHTML=zn),Hl=o(e),c(ae.$$.fragment,e),Ll=o(e),ie=M(e,"P",{"data-svelte-h":!0}),U(ie)!=="svelte-1gb9y06"&&(ie.innerHTML=Yn),zl=o(e),Te=M(e,"P",{"data-svelte-h":!0}),U(Te)!=="svelte-j8myns"&&(Te.innerHTML=Dn),Yl=o(e),Me=M(e,"P",{"data-svelte-h":!0}),U(Me)!=="svelte-qujw5g"&&(Me.innerHTML=Xn),Dl=o(e),c(Je.$$.fragment,e),Xl=o(e),Ue=M(e,"P",{"data-svelte-h":!0}),U(Ue)!=="svelte-1gm9mfe"&&(Ue.innerHTML=qn),ql=o(e),D=M(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(D)!=="svelte-1dnx9c"&&(D.innerHTML=Pn),Pl=o(e),re=M(e,"P",{"data-svelte-h":!0}),U(re)!=="svelte-1iiqbq7"&&(re.textContent=Kn),Kl=o(e),pe=M(e,"P",{"data-svelte-h":!0}),U(pe)!=="svelte-1kjrzws"&&(pe.innerHTML=es),et=o(e),X=M(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(X)!=="svelte-ypn55a"&&(X.innerHTML=ls),lt=o(e),c(de.$$.fragment,e),tt=o(e),ye=M(e,"P",{"data-svelte-h":!0}),U(ye)!=="svelte-1c7f7tx"&&(ye.innerHTML=ts),nt=o(e),ue=M(e,"P",{"data-svelte-h":!0}),U(ue)!=="svelte-13w0d8y"&&(ue.innerHTML=ns),st=o(e),c(we.$$.fragment,e),ot=o(e),c(ce.$$.fragment,e),at=o(e),me=M(e,"P",{"data-svelte-h":!0}),U(me)!=="svelte-fbbc6g"&&(me.textContent=ss),it=o(e),ge=M(e,"UL",{"data-svelte-h":!0}),U(ge)!=="svelte-ho3jio"&&(ge.innerHTML=os),Tt=o(e),he=M(e,"P",{"data-svelte-h":!0}),U(he)!=="svelte-rh57s1"&&(he.innerHTML=as),Mt=o(e),be=M(e,"P",{"data-svelte-h":!0}),U(be)!=="svelte-zqae9j"&&(be.innerHTML=is),Jt=o(e),c(q.$$.fragment,e),Ut=o(e),c(fe.$$.fragment,e),rt=o(e),Ie=M(e,"P",{"data-svelte-h":!0}),U(Ie)!=="svelte-pfkmt8"&&(Ie.textContent=Ts),pt=o(e),Ce=M(e,"P",{"data-svelte-h":!0}),U(Ce)!=="svelte-sessxc"&&(Ce.innerHTML=Ms),dt=o(e),c(je.$$.fragment,e),yt=o(e),ke=M(e,"P",{"data-svelte-h":!0}),U(ke)!=="svelte-1nzhrrw"&&(ke.textContent=Js),ut=o(e),ve=M(e,"UL",{"data-svelte-h":!0}),U(ve)!=="svelte-1waly9s"&&(ve.innerHTML=Us),wt=o(e),c(Ae.$$.fragment,e),ct=o(e),c(Re.$$.fragment,e),mt=o(e),Be=M(e,"P",{"data-svelte-h":!0}),U(Be)!=="svelte-1e83m24"&&(Be.innerHTML=rs),gt=o(e),c(Ve.$$.fragment,e),ht=o(e),$e=M(e,"P",{"data-svelte-h":!0}),U($e)!=="svelte-a39tyc"&&($e.innerHTML=ps),bt=o(e),Ze=M(e,"UL",{"data-svelte-h":!0}),U(Ze)!=="svelte-1f3fqeb"&&(Ze.innerHTML=ds),ft=o(e),Ne=M(e,"P",{"data-svelte-h":!0}),U(Ne)!=="svelte-11i007g"&&(Ne.innerHTML=ys),It=o(e),Fe=M(e,"UL",{"data-svelte-h":!0}),U(Fe)!=="svelte-xlpltp"&&(Fe.innerHTML=us),Ct=o(e),c(Ee.$$.fragment,e),jt=o(e),Qe=M(e,"P",{"data-svelte-h":!0}),U(Qe)!=="svelte-4h2er2"&&(Qe.textContent=ws),kt=o(e),We=M(e,"UL",{"data-svelte-h":!0}),U(We)!=="svelte-1bxk7ay"&&(We.innerHTML=cs),vt=o(e),c(Ge.$$.fragment,e),At=o(e),_e=M(e,"P",{"data-svelte-h":!0}),U(_e)!=="svelte-izglpm"&&(_e.textContent=ms),Rt=o(e),xe=M(e,"UL",{"data-svelte-h":!0}),U(xe)!=="svelte-eja4z2"&&(xe.innerHTML=gs),Bt=o(e),Oe=M(e,"P",{"data-svelte-h":!0}),U(Oe)!=="svelte-z1up48"&&(Oe.innerHTML=hs),Vt=o(e),Se=M(e,"P",{"data-svelte-h":!0}),U(Se)!=="svelte-u83m8z"&&(Se.textContent=bs),$t=o(e),He=M(e,"P",{"data-svelte-h":!0}),U(He)!=="svelte-130hadi"&&(He.innerHTML=fs),Zt=o(e),c(Le.$$.fragment,e),Nt=o(e),ze=M(e,"P",{"data-svelte-h":!0}),U(ze)!=="svelte-t7zb7o"&&(ze.innerHTML=Is),Ft=o(e),Ye=M(e,"UL",{"data-svelte-h":!0}),U(Ye)!=="svelte-qjat0g"&&(Ye.innerHTML=Cs),Et=o(e),De=M(e,"P",{"data-svelte-h":!0}),U(De)!=="svelte-1o4z3y"&&(De.textContent=js),Qt=o(e),c(Xe.$$.fragment,e),Wt=o(e),c(qe.$$.fragment,e),Gt=o(e),Pe=M(e,"P",{"data-svelte-h":!0}),U(Pe)!=="svelte-8dd7rj"&&(Pe.textContent=ks),_t=o(e),Ke=M(e,"P",{"data-svelte-h":!0}),U(Ke)!=="svelte-jio97"&&(Ke.textContent=vs),xt=o(e),c(el.$$.fragment,e),Ot=o(e),ll=M(e,"P",{"data-svelte-h":!0}),U(ll)!=="svelte-1p8pdrk"&&(ll.innerHTML=As),St=o(e),tl=M(e,"P",{"data-svelte-h":!0}),U(tl)!=="svelte-x6h8bb"&&(tl.textContent=Rs),Ht=o(e),c(P.$$.fragment,e),Lt=o(e),nl=M(e,"P",{"data-svelte-h":!0}),U(nl)!=="svelte-1bc8e8e"&&(nl.textContent=Bs),zt=o(e),c(sl.$$.fragment,e),Yt=o(e),ol=M(e,"P",{"data-svelte-h":!0}),U(ol)!=="svelte-1rndc0g"&&(ol.textContent=Vs),Dt=o(e),c(al.$$.fragment,e),Xt=o(e),K=M(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(K)!=="svelte-1asgeq0"&&(K.innerHTML=$s),qt=o(e),c(il.$$.fragment,e),Pt=o(e),Tl=M(e,"P",{"data-svelte-h":!0}),U(Tl)!=="svelte-6s34wk"&&(Tl.innerHTML=Zs),Kt=o(e),Ml=M(e,"P",{"data-svelte-h":!0}),U(Ml)!=="svelte-1x0er27"&&(Ml.textContent=Ns),en=o(e),Jl=M(e,"P",{"data-svelte-h":!0}),U(Jl)!=="svelte-1n3puco"&&(Jl.innerHTML=Fs),ln=o(e),Ul=M(e,"P",{"data-svelte-h":!0}),U(Ul)!=="svelte-1mo0wtw"&&(Ul.innerHTML=Es),tn=o(e),rl=M(e,"P",{"data-svelte-h":!0}),U(rl)!=="svelte-m8o5fv"&&(rl.innerHTML=Qs),nn=o(e),c(pl.$$.fragment,e),sn=o(e),ee=M(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),U(ee)!=="svelte-gxkl5t"&&(ee.innerHTML=Ws),on=o(e),c(dl.$$.fragment,e),an=o(e),yl=M(e,"P",{"data-svelte-h":!0}),U(yl)!=="svelte-8ye7ad"&&(yl.innerHTML=Gs),Tn=o(e),c(ul.$$.fragment,e),Mn=o(e),wl=M(e,"P",{"data-svelte-h":!0}),U(wl)!=="svelte-1k7bqf2"&&(wl.innerHTML=_s),Jn=o(e),cl=M(e,"P",{"data-svelte-h":!0}),U(cl)!=="svelte-130f0gy"&&(cl.innerHTML=xs),Un=o(e),ml=M(e,"P",{"data-svelte-h":!0}),U(ml)!=="svelte-3zhnpr"&&(ml.innerHTML=Os),rn=o(e),c(gl.$$.fragment,e),pn=o(e),hl=M(e,"P",{"data-svelte-h":!0}),U(hl)!=="svelte-1hjlm82"&&(hl.textContent=Ss),dn=o(e),c(bl.$$.fragment,e),yn=o(e),fl=M(e,"P",{"data-svelte-h":!0}),U(fl)!=="svelte-2wlmjx"&&(fl.textContent=Hs),un=o(e),c(Il.$$.fragment,e),wn=o(e),Cl=M(e,"P",{"data-svelte-h":!0}),U(Cl)!=="svelte-1emppws"&&(Cl.textContent=Ls),cn=o(e),jl=M(e,"UL",{"data-svelte-h":!0}),U(jl)!=="svelte-1hcect5"&&(jl.innerHTML=zs),mn=o(e),c(kl.$$.fragment,e),gn=o(e),xl=M(e,"P",{}),L(xl).forEach(l),this.h()},h(){Rl(i,"name","hf:doc:metadata"),Rl(i,"content",co),Rl(D,"class","warning"),Rl(X,"class","tip"),Rl(K,"class","tip"),Rl(ee,"class","tip")},m(e,n){V(document.head,i),t(e,I,n),t(e,J,n),t(e,y,n),m(d,e,n),t(e,p,n),m(f,e,n),t(e,k,n),m(r,e,n),t(e,R,n),t(e,A,n),t(e,N,n),m(B,e,n),t(e,a,n),t(e,u,n),t(e,F,n),t(e,W,n),V(W,Q),V(Q,_),V(Q,E),V(Q,x),V(x,Bl),V(x,fn),V(x,Vl),V(x,In),V(x,$l),V($l,Cn),m(le,$l,null),V(x,jn),V(x,Zl),V(x,kn),V(x,Nl),V(W,vn),V(W,te),V(te,Fl),V(te,An),V(te,O),V(O,El),V(O,Rn),V(O,Ql),V(O,Bn),V(O,Wl),V(Wl,Vn),m(ne,Wl,null),V(O,$n),V(O,Gl),V(O,Zn),V(O,_l),t(e,Ol,n),t(e,se,n),t(e,Sl,n),t(e,oe,n),t(e,Hl,n),m(ae,e,n),t(e,Ll,n),t(e,ie,n),t(e,zl,n),t(e,Te,n),t(e,Yl,n),t(e,Me,n),t(e,Dl,n),m(Je,e,n),t(e,Xl,n),t(e,Ue,n),t(e,ql,n),t(e,D,n),t(e,Pl,n),t(e,re,n),t(e,Kl,n),t(e,pe,n),t(e,et,n),t(e,X,n),t(e,lt,n),m(de,e,n),t(e,tt,n),t(e,ye,n),t(e,nt,n),t(e,ue,n),t(e,st,n),m(we,e,n),t(e,ot,n),m(ce,e,n),t(e,at,n),t(e,me,n),t(e,it,n),t(e,ge,n),t(e,Tt,n),t(e,he,n),t(e,Mt,n),t(e,be,n),t(e,Jt,n),m(q,e,n),t(e,Ut,n),m(fe,e,n),t(e,rt,n),t(e,Ie,n),t(e,pt,n),t(e,Ce,n),t(e,dt,n),m(je,e,n),t(e,yt,n),t(e,ke,n),t(e,ut,n),t(e,ve,n),t(e,wt,n),m(Ae,e,n),t(e,ct,n),m(Re,e,n),t(e,mt,n),t(e,Be,n),t(e,gt,n),m(Ve,e,n),t(e,ht,n),t(e,$e,n),t(e,bt,n),t(e,Ze,n),t(e,ft,n),t(e,Ne,n),t(e,It,n),t(e,Fe,n),t(e,Ct,n),m(Ee,e,n),t(e,jt,n),t(e,Qe,n),t(e,kt,n),t(e,We,n),t(e,vt,n),m(Ge,e,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,$t,n),t(e,He,n),t(e,Zt,n),m(Le,e,n),t(e,Nt,n),t(e,ze,n),t(e,Ft,n),t(e,Ye,n),t(e,Et,n),t(e,De,n),t(e,Qt,n),m(Xe,e,n),t(e,Wt,n),m(qe,e,n),t(e,Gt,n),t(e,Pe,n),t(e,_t,n),t(e,Ke,n),t(e,xt,n),m(el,e,n),t(e,Ot,n),t(e,ll,n),t(e,St,n),t(e,tl,n),t(e,Ht,n),m(P,e,n),t(e,Lt,n),t(e,nl,n),t(e,zt,n),m(sl,e,n),t(e,Yt,n),t(e,ol,n),t(e,Dt,n),m(al,e,n),t(e,Xt,n),t(e,K,n),t(e,qt,n),m(il,e,n),t(e,Pt,n),t(e,Tl,n),t(e,Kt,n),t(e,Ml,n),t(e,en,n),t(e,Jl,n),t(e,ln,n),t(e,Ul,n),t(e,tn,n),t(e,rl,n),t(e,nn,n),m(pl,e,n),t(e,sn,n),t(e,ee,n),t(e,on,n),m(dl,e,n),t(e,an,n),t(e,yl,n),t(e,Tn,n),m(ul,e,n),t(e,Mn,n),t(e,wl,n),t(e,Jn,n),t(e,cl,n),t(e,Un,n),t(e,ml,n),t(e,rn,n),m(gl,e,n),t(e,pn,n),t(e,hl,n),t(e,dn,n),m(bl,e,n),t(e,yn,n),t(e,fl,n),t(e,un,n),m(Il,e,n),t(e,wn,n),t(e,Cl,n),t(e,cn,n),t(e,jl,n),t(e,mn,n),m(kl,e,n),t(e,gn,n),t(e,xl,n),hn=!0},p(e,[n]){const vl={};n&2&&(vl.$$scope={dirty:n,ctx:e}),q.$set(vl);const Al={};n&2&&(Al.$$scope={dirty:n,ctx:e}),P.$set(Al)},i(e){hn||(g(d.$$.fragment,e),g(f.$$.fragment,e),g(r.$$.fragment,e),g(B.$$.fragment,e),g(le.$$.fragment,e),g(ne.$$.fragment,e),g(ae.$$.fragment,e),g(Je.$$.fragment,e),g(de.$$.fragment,e),g(we.$$.fragment,e),g(ce.$$.fragment,e),g(q.$$.fragment,e),g(fe.$$.fragment,e),g(je.$$.fragment,e),g(Ae.$$.fragment,e),g(Re.$$.fragment,e),g(Ve.$$.fragment,e),g(Ee.$$.fragment,e),g(Ge.$$.fragment,e),g(Le.$$.fragment,e),g(Xe.$$.fragment,e),g(qe.$$.fragment,e),g(el.$$.fragment,e),g(P.$$.fragment,e),g(sl.$$.fragment,e),g(al.$$.fragment,e),g(il.$$.fragment,e),g(pl.$$.fragment,e),g(dl.$$.fragment,e),g(ul.$$.fragment,e),g(gl.$$.fragment,e),g(bl.$$.fragment,e),g(Il.$$.fragment,e),g(kl.$$.fragment,e),hn=!0)},o(e){h(d.$$.fragment,e),h(f.$$.fragment,e),h(r.$$.fragment,e),h(B.$$.fragment,e),h(le.$$.fragment,e),h(ne.$$.fragment,e),h(ae.$$.fragment,e),h(Je.$$.fragment,e),h(de.$$.fragment,e),h(we.$$.fragment,e),h(ce.$$.fragment,e),h(q.$$.fragment,e),h(fe.$$.fragment,e),h(je.$$.fragment,e),h(Ae.$$.fragment,e),h(Re.$$.fragment,e),h(Ve.$$.fragment,e),h(Ee.$$.fragment,e),h(Ge.$$.fragment,e),h(Le.$$.fragment,e),h(Xe.$$.fragment,e),h(qe.$$.fragment,e),h(el.$$.fragment,e),h(P.$$.fragment,e),h(sl.$$.fragment,e),h(al.$$.fragment,e),h(il.$$.fragment,e),h(pl.$$.fragment,e),h(dl.$$.fragment,e),h(ul.$$.fragment,e),h(gl.$$.fragment,e),h(bl.$$.fragment,e),h(Il.$$.fragment,e),h(kl.$$.fragment,e),hn=!1},d(e){e&&(l(I),l(J),l(y),l(p),l(k),l(R),l(A),l(N),l(a),l(u),l(F),l(W),l(Ol),l(se),l(Sl),l(oe),l(Hl),l(Ll),l(ie),l(zl),l(Te),l(Yl),l(Me),l(Dl),l(Xl),l(Ue),l(ql),l(D),l(Pl),l(re),l(Kl),l(pe),l(et),l(X),l(lt),l(tt),l(ye),l(nt),l(ue),l(st),l(ot),l(at),l(me),l(it),l(ge),l(Tt),l(he),l(Mt),l(be),l(Jt),l(Ut),l(rt),l(Ie),l(pt),l(Ce),l(dt),l(yt),l(ke),l(ut),l(ve),l(wt),l(ct),l(mt),l(Be),l(gt),l(ht),l($e),l(bt),l(Ze),l(ft),l(Ne),l(It),l(Fe),l(Ct),l(jt),l(Qe),l(kt),l(We),l(vt),l(At),l(_e),l(Rt),l(xe),l(Bt),l(Oe),l(Vt),l(Se),l($t),l(He),l(Zt),l(Nt),l(ze),l(Ft),l(Ye),l(Et),l(De),l(Qt),l(Wt),l(Gt),l(Pe),l(_t),l(Ke),l(xt),l(Ot),l(ll),l(St),l(tl),l(Ht),l(Lt),l(nl),l(zt),l(Yt),l(ol),l(Dt),l(Xt),l(K),l(qt),l(Pt),l(Tl),l(Kt),l(Ml),l(en),l(Jl),l(ln),l(Ul),l(tn),l(rl),l(nn),l(sn),l(ee),l(on),l(an),l(yl),l(Tn),l(Mn),l(wl),l(Jn),l(cl),l(Un),l(ml),l(rn),l(pn),l(hl),l(dn),l(yn),l(fl),l(un),l(wn),l(Cl),l(cn),l(jl),l(mn),l(gn),l(xl)),l(i),b(d,e),b(f,e),b(r,e),b(B,e),b(le),b(ne),b(ae,e),b(Je,e),b(de,e),b(we,e),b(ce,e),b(q,e),b(fe,e),b(je,e),b(Ae,e),b(Re,e),b(Ve,e),b(Ee,e),b(Ge,e),b(Le,e),b(Xe,e),b(qe,e),b(el,e),b(P,e),b(sl,e),b(al,e),b(il,e),b(pl,e),b(dl,e),b(ul,e),b(gl,e),b(bl,e),b(Il,e),b(kl,e)}}}const co='{"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 mo(Z){return Ps(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class jo extends Ks{constructor(i){super(),eo(this,i,mo,wo,qs,{})}}export{jo as component};
