import{s as Bo,o as Qo,n as R}from"../chunks/scheduler.3d32dc09.js";import{S as Wo,i as Zo,e as i,s as o,c as g,h as Vo,a as m,d as s,b as a,f as k,g as u,j as p,k as _,l as c,m as l,n as M,t as h,o as f,p as y}from"../chunks/index.f9718211.js";import{T as Ro}from"../chunks/Tip.6cf8c24b.js";import{C as zo,H as N,E as So}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.51ba2db0.js";import{D as A,E as G}from"../chunks/ExampleCodeBlock.e74d3b4f.js";import{C as U}from"../chunks/CodeBlock.4d1ab73b.js";function Xo(C){let r,b=`Smolagents is an experimental API which is subject to change at any time. Results returned by the agents
can vary as the APIs or underlying models are prone to change.`;return{c(){r=i("p"),r.textContent=b},l(T){r=m(T,"P",{"data-svelte-h":!0}),p(r)!=="svelte-19v5hvw"&&(r.textContent=b)},m(T,d){l(T,r,d)},p:R,d(T){T&&s(r)}}}function Fo(C){let r,b="Example:",T,d,w;return d=new U({props:{code:"Y2xhc3MlMjBDdXN0b21Nb2RlbChNb2RlbCklM0ElMEElMjAlMjAlMjAlMjBkZWYlMjBnZW5lcmF0ZShzZWxmJTJDJTIwbWVzc2FnZXMlMkMlMjAqKmt3YXJncyklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBJbXBsZW1lbnRhdGlvbiUyMHNwZWNpZmljJTIwdG8lMjB5b3VyJTIwbW9kZWwlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwYXNz",highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">CustomModel</span>(<span class="hljs-title class_ inherited__">Model</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">generate</span>(<span class="hljs-params">self, messages, **kwargs</span>):
        <span class="hljs-comment"># Implementation specific to your model</span>
        <span class="hljs-keyword">pass</span>`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-11lpom8"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function Go(C){let r,b="Example:",T,d,w;return d=new U({props:{code:"ZW5naW5lJTIwJTNEJTIwVHJhbnNmb3JtZXJzTW9kZWwoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlM0QlMjJRd2VuJTJGUXdlbjMtTmV4dC04MEItQTNCLVRoaW5raW5nJTIyJTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlJTNEJTIyY3VkYSUyMiUyQyUwQSUyMCUyMCUyMCUyMG1heF9uZXdfdG9rZW5zJTNENTAwMCUyQyUwQSklMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMkV4cGxhaW4lMjBxdWFudHVtJTIwbWVjaGFuaWNzJTIwaW4lMjBzaW1wbGUlMjB0ZXJtcy4lMjIlN0QlNUQlMEFyZXNwb25zZSUyMCUzRCUyMGVuZ2luZShtZXNzYWdlcyUyQyUyMHN0b3Bfc2VxdWVuY2VzJTNEJTVCJTIyRU5EJTIyJTVEKSUwQXByaW50KHJlc3BvbnNlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>engine = TransformersModel(
<span class="hljs-meta">... </span>    model_id=<span class="hljs-string">&quot;Qwen/Qwen3-Next-80B-A3B-Thinking&quot;</span>,
<span class="hljs-meta">... </span>    device=<span class="hljs-string">&quot;cuda&quot;</span>,
<span class="hljs-meta">... </span>    max_new_tokens=<span class="hljs-number">5000</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>messages = [{<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Explain quantum mechanics in simple terms.&quot;</span>}]
<span class="hljs-meta">&gt;&gt;&gt; </span>response = engine(messages, stop_sequences=[<span class="hljs-string">&quot;END&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(response)
<span class="hljs-string">&quot;Quantum mechanics is the branch of physics that studies...&quot;</span>`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-11lpom8"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function Ho(C){let r,b="Example:",T,d,w;return d=new U({props:{code:"ZW5naW5lJTIwJTNEJTIwSW5mZXJlbmNlQ2xpZW50TW9kZWwoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlM0QlMjJRd2VuJTJGUXdlbjMtTmV4dC04MEItQTNCLVRoaW5raW5nJTIyJTJDJTBBJTIwJTIwJTIwJTIwcHJvdmlkZXIlM0QlMjJoeXBlcmJvbGljJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9rZW4lM0QlMjJ5b3VyX2hmX3Rva2VuX2hlcmUlMjIlMkMlMEElMjAlMjAlMjAlMjBtYXhfdG9rZW5zJTNENTAwMCUyQyUwQSklMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMkV4cGxhaW4lMjBxdWFudHVtJTIwbWVjaGFuaWNzJTIwaW4lMjBzaW1wbGUlMjB0ZXJtcy4lMjIlN0QlNUQlMEFyZXNwb25zZSUyMCUzRCUyMGVuZ2luZShtZXNzYWdlcyUyQyUyMHN0b3Bfc2VxdWVuY2VzJTNEJTVCJTIyRU5EJTIyJTVEKSUwQXByaW50KHJlc3BvbnNlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>engine = InferenceClientModel(
<span class="hljs-meta">... </span>    model_id=<span class="hljs-string">&quot;Qwen/Qwen3-Next-80B-A3B-Thinking&quot;</span>,
<span class="hljs-meta">... </span>    provider=<span class="hljs-string">&quot;hyperbolic&quot;</span>,
<span class="hljs-meta">... </span>    token=<span class="hljs-string">&quot;your_hf_token_here&quot;</span>,
<span class="hljs-meta">... </span>    max_tokens=<span class="hljs-number">5000</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>messages = [{<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Explain quantum mechanics in simple terms.&quot;</span>}]
<span class="hljs-meta">&gt;&gt;&gt; </span>response = engine(messages, stop_sequences=[<span class="hljs-string">&quot;END&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(response)
<span class="hljs-string">&quot;Quantum mechanics is the branch of physics that studies...&quot;</span>`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-11lpom8"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function Po(C){let r,b="Example:",T,d,w;return d=new U({props:{code:"aW1wb3J0JTIwb3MlMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMENvZGVBZ2VudCUyQyUyMFdlYlNlYXJjaFRvb2wlMkMlMjBMaXRlTExNUm91dGVyTW9kZWwlMEFvcy5lbnZpcm9uJTVCJTIyT1BFTkFJX0FQSV9LRVklMjIlNUQlMjAlM0QlMjAlMjIlMjIlMEFvcy5lbnZpcm9uJTVCJTIyQVdTX0FDQ0VTU19LRVlfSUQlMjIlNUQlMjAlM0QlMjAlMjIlMjIlMEFvcy5lbnZpcm9uJTVCJTIyQVdTX1NFQ1JFVF9BQ0NFU1NfS0VZJTIyJTVEJTIwJTNEJTIwJTIyJTIyJTBBb3MuZW52aXJvbiU1QiUyMkFXU19SRUdJT04lMjIlNUQlMjAlM0QlMjAlMjIlMjIlMEFsbG1fbG9hZGJhbGFuY2VyX21vZGVsX2xpc3QlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJtb2RlbF9uYW1lJTIyJTNBJTIwJTIybW9kZWwtZ3JvdXAtMSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmxpdGVsbG1fcGFyYW1zJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybW9kZWwlMjIlM0ElMjAlMjJncHQtNG8tbWluaSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmFwaV9rZXklMjIlM0ElMjBvcy5nZXRlbnYoJTIyT1BFTkFJX0FQSV9LRVklMjIpJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybW9kZWxfbmFtZSUyMiUzQSUyMCUyMm1vZGVsLWdyb3VwLTElMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJsaXRlbGxtX3BhcmFtcyUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMm1vZGVsJTIyJTNBJTIwJTIyYmVkcm9jayUyRmFudGhyb3BpYy5jbGF1ZGUtMy1zb25uZXQtMjAyNDAyMjktdjElM0EwJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyYXdzX2FjY2Vzc19rZXlfaWQlMjIlM0ElMjBvcy5nZXRlbnYoJTIyQVdTX0FDQ0VTU19LRVlfSUQlMjIpJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyYXdzX3NlY3JldF9hY2Nlc3Nfa2V5JTIyJTNBJTIwb3MuZ2V0ZW52KCUyMkFXU19TRUNSRVRfQUNDRVNTX0tFWSUyMiklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJhd3NfcmVnaW9uX25hbWUlMjIlM0ElMjBvcy5nZXRlbnYoJTIyQVdTX1JFR0lPTiUyMiklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0QlMkMlMEElNUQlMEFtb2RlbCUyMCUzRCUyMExpdGVMTE1Sb3V0ZXJNb2RlbCglMEElMjAlMjAlMjBtb2RlbF9pZCUzRCUyMm1vZGVsLWdyb3VwLTElMjIlMkMlMEElMjAlMjAlMjBtb2RlbF9saXN0JTNEbGxtX2xvYWRiYWxhbmNlcl9tb2RlbF9saXN0JTJDJTBBJTIwJTIwJTIwY2xpZW50X2t3YXJncyUzRCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnJvdXRpbmdfc3RyYXRlZ3klMjIlM0ElMjJzaW1wbGUtc2h1ZmZsZSUyMiUwQSUyMCUyMCUyMCU3RCUwQSklMEFhZ2VudCUyMCUzRCUyMENvZGVBZ2VudCh0b29scyUzRCU1QldlYlNlYXJjaFRvb2woKSU1RCUyQyUyMG1vZGVsJTNEbW9kZWwpJTBBYWdlbnQucnVuKCUyMkhvdyUyMG1hbnklMjBzZWNvbmRzJTIwd291bGQlMjBpdCUyMHRha2UlMjBmb3IlMjBhJTIwbGVvcGFyZCUyMGF0JTIwZnVsbCUyMHNwZWVkJTIwdG8lMjBydW4lMjB0aHJvdWdoJTIwUG9udCUyMGRlcyUyMEFydHMlM0YlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> os
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, WebSearchTool, LiteLLMRouterModel
<span class="hljs-meta">&gt;&gt;&gt; </span>os.environ[<span class="hljs-string">&quot;OPENAI_API_KEY&quot;</span>] = <span class="hljs-string">&quot;&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>os.environ[<span class="hljs-string">&quot;AWS_ACCESS_KEY_ID&quot;</span>] = <span class="hljs-string">&quot;&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>os.environ[<span class="hljs-string">&quot;AWS_SECRET_ACCESS_KEY&quot;</span>] = <span class="hljs-string">&quot;&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>os.environ[<span class="hljs-string">&quot;AWS_REGION&quot;</span>] = <span class="hljs-string">&quot;&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>llm_loadbalancer_model_list = [
<span class="hljs-meta">... </span>    {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;model_name&quot;</span>: <span class="hljs-string">&quot;model-group-1&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;litellm_params&quot;</span>: {
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;model&quot;</span>: <span class="hljs-string">&quot;gpt-4o-mini&quot;</span>,
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;api_key&quot;</span>: os.getenv(<span class="hljs-string">&quot;OPENAI_API_KEY&quot;</span>),
<span class="hljs-meta">... </span>        },
<span class="hljs-meta">... </span>    },
<span class="hljs-meta">... </span>    {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;model_name&quot;</span>: <span class="hljs-string">&quot;model-group-1&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;litellm_params&quot;</span>: {
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;model&quot;</span>: <span class="hljs-string">&quot;bedrock/anthropic.claude-3-sonnet-20240229-v1:0&quot;</span>,
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;aws_access_key_id&quot;</span>: os.getenv(<span class="hljs-string">&quot;AWS_ACCESS_KEY_ID&quot;</span>),
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;aws_secret_access_key&quot;</span>: os.getenv(<span class="hljs-string">&quot;AWS_SECRET_ACCESS_KEY&quot;</span>),
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;aws_region_name&quot;</span>: os.getenv(<span class="hljs-string">&quot;AWS_REGION&quot;</span>),
<span class="hljs-meta">... </span>        },
<span class="hljs-meta">... </span>    },
<span class="hljs-meta">&gt;&gt;&gt; </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LiteLLMRouterModel(
<span class="hljs-meta">... </span>   model_id=<span class="hljs-string">&quot;model-group-1&quot;</span>,
<span class="hljs-meta">... </span>   model_list=llm_loadbalancer_model_list,
<span class="hljs-meta">... </span>   client_kwargs={
<span class="hljs-meta">... </span>       <span class="hljs-string">&quot;routing_strategy&quot;</span>:<span class="hljs-string">&quot;simple-shuffle&quot;</span>
<span class="hljs-meta">... </span>   }
<span class="hljs-meta">&gt;&gt;&gt; </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>agent = CodeAgent(tools=[WebSearchTool()], model=model)
<span class="hljs-meta">&gt;&gt;&gt; </span>agent.run(<span class="hljs-string">&quot;How many seconds would it take for a leopard at full speed to run through Pont des Arts?&quot;</span>)`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-11lpom8"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function Yo(C){let r,b="Creating a model instance with default settings:",T,d,w;return d=new U({props:{code:"YmVkcm9ja19tb2RlbCUyMCUzRCUyMEFtYXpvbkJlZHJvY2tNb2RlbCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCd1cy5hbWF6b24ubm92YS1wcm8tdjElM0EwJyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>bedrock_model = AmazonBedrockModel(
<span class="hljs-meta">... </span>    model_id=<span class="hljs-string">&#x27;us.amazon.nova-pro-v1:0&#x27;</span>
<span class="hljs-meta">... </span>)`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-1368o2k"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function Do(C){let r,b="Creating a model instance with a custom boto3 client:",T,d,w;return d=new U({props:{code:"aW1wb3J0JTIwYm90bzMlMEFjbGllbnQlMjAlM0QlMjBib3RvMy5jbGllbnQoJ2JlZHJvY2stcnVudGltZSclMkMlMjByZWdpb25fbmFtZSUzRCd1cy13ZXN0LTInKSUwQWJlZHJvY2tfbW9kZWwlMjAlM0QlMjBBbWF6b25CZWRyb2NrTW9kZWwoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlM0QndXMuYW1hem9uLm5vdmEtcHJvLXYxJTNBMCclMkMlMEElMjAlMjAlMjAlMjBjbGllbnQlM0RjbGllbnQlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> boto3
<span class="hljs-meta">&gt;&gt;&gt; </span>client = boto3.client(<span class="hljs-string">&#x27;bedrock-runtime&#x27;</span>, region_name=<span class="hljs-string">&#x27;us-west-2&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bedrock_model = AmazonBedrockModel(
<span class="hljs-meta">... </span>    model_id=<span class="hljs-string">&#x27;us.amazon.nova-pro-v1:0&#x27;</span>,
<span class="hljs-meta">... </span>    client=client
<span class="hljs-meta">... </span>)`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-11isg5i"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function Oo(C){let r,b="Creating a model instance with client_kwargs for internal client creation:",T,d,w;return d=new U({props:{code:"YmVkcm9ja19tb2RlbCUyMCUzRCUyMEFtYXpvbkJlZHJvY2tNb2RlbCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCd1cy5hbWF6b24ubm92YS1wcm8tdjElM0EwJyUyQyUwQSUyMCUyMCUyMCUyMGNsaWVudF9rd2FyZ3MlM0QlN0IncmVnaW9uX25hbWUnJTNBJTIwJ3VzLXdlc3QtMiclMkMlMjAnZW5kcG9pbnRfdXJsJyUzQSUyMCdodHRwcyUzQSUyRiUyRmN1c3RvbS1lbmRwb2ludC5jb20nJTdEJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>bedrock_model = AmazonBedrockModel(
<span class="hljs-meta">... </span>    model_id=<span class="hljs-string">&#x27;us.amazon.nova-pro-v1:0&#x27;</span>,
<span class="hljs-meta">... </span>    client_kwargs={<span class="hljs-string">&#x27;region_name&#x27;</span>: <span class="hljs-string">&#x27;us-west-2&#x27;</span>, <span class="hljs-string">&#x27;endpoint_url&#x27;</span>: <span class="hljs-string">&#x27;https://custom-endpoint.com&#x27;</span>}
<span class="hljs-meta">... </span>)`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-1s85quz"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function Ko(C){let r,b="Creating a model instance with inference and guardrail configurations:",T,d,w;return d=new U({props:{code:"YWRkaXRpb25hbF9hcGlfY29uZmlnJTIwJTNEJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIyaW5mZXJlbmNlQ29uZmlnJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybWF4VG9rZW5zJTIyJTNBJTIwMzAwMCUwQSUyMCUyMCUyMCUyMCU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMmd1YXJkcmFpbENvbmZpZyUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmd1YXJkcmFpbElkZW50aWZpZXIlMjIlM0ElMjAlMjJpZGVudGlmeTElMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJndWFyZHJhaWxWZXJzaW9uJTIyJTNBJTIwJ3YxJyUwQSUyMCUyMCUyMCUyMCU3RCUyQyUwQSU3RCUwQWJlZHJvY2tfbW9kZWwlMjAlM0QlMjBBbWF6b25CZWRyb2NrTW9kZWwoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlM0QnYW50aHJvcGljLmNsYXVkZS0zLWhhaWt1LTIwMjQwMzA3LXYxJTNBMCclMkMlMEElMjAlMjAlMjAlMjAqKmFkZGl0aW9uYWxfYXBpX2NvbmZpZyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>additional_api_config = {
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;inferenceConfig&quot;</span>: {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;maxTokens&quot;</span>: <span class="hljs-number">3000</span>
<span class="hljs-meta">... </span>    },
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;guardrailConfig&quot;</span>: {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;guardrailIdentifier&quot;</span>: <span class="hljs-string">&quot;identify1&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;guardrailVersion&quot;</span>: <span class="hljs-string">&#x27;v1&#x27;</span>
<span class="hljs-meta">... </span>    },
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>bedrock_model = AmazonBedrockModel(
<span class="hljs-meta">... </span>    model_id=<span class="hljs-string">&#x27;anthropic.claude-3-haiku-20240307-v1:0&#x27;</span>,
<span class="hljs-meta">... </span>    **additional_api_config
<span class="hljs-meta">... </span>)`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-4kd7m4"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function ea(C){let r,b="Example:",T,d,w;return d=new U({props:{code:"ZW5naW5lJTIwJTNEJTIwTUxYTW9kZWwoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlM0QlMjJtbHgtY29tbXVuaXR5JTJGUXdlbjIuNS1Db2Rlci0zMkItSW5zdHJ1Y3QtNGJpdCUyMiUyQyUwQSUyMCUyMCUyMCUyMG1heF90b2tlbnMlM0QxMDAwMCUyQyUwQSklMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMkV4cGxhaW4lMjBxdWFudHVtJTIwbWVjaGFuaWNzJTIwaW4lMjBzaW1wbGUlMjB0ZXJtcy4lMjIlMEElMjAlMjAlMjAlMjAlN0QlMEElNUQlMEFyZXNwb25zZSUyMCUzRCUyMGVuZ2luZShtZXNzYWdlcyUyQyUyMHN0b3Bfc2VxdWVuY2VzJTNEJTVCJTIyRU5EJTIyJTVEKSUwQXByaW50KHJlc3BvbnNlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>engine = MLXModel(
<span class="hljs-meta">... </span>    model_id=<span class="hljs-string">&quot;mlx-community/Qwen2.5-Coder-32B-Instruct-4bit&quot;</span>,
<span class="hljs-meta">... </span>    max_tokens=<span class="hljs-number">10000</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>messages = [
<span class="hljs-meta">... </span>    {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Explain quantum mechanics in simple terms.&quot;</span>
<span class="hljs-meta">... </span>    }
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>response = engine(messages, stop_sequences=[<span class="hljs-string">&quot;END&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(response)
<span class="hljs-string">&quot;Quantum mechanics is the branch of physics that studies...&quot;</span>`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,T=o(),g(d.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),p(r)!=="svelte-11lpom8"&&(r.textContent=b),T=a(n),u(d.$$.fragment,n)},m(n,J){l(n,r,J),l(n,T,J),M(d,n,J),w=!0},p:R,i(n){w||(h(d.$$.fragment,n),w=!0)},o(n){f(d.$$.fragment,n),w=!1},d(n){n&&(s(r),s(T)),y(d,n)}}}function ta(C){let r,b,T,d,w,n,J,hs,H,fs,Me,xl=`To learn more about agents and tools make sure to read the <a href="../index">introductory guide</a>. This page
contains the API docs for the underlying classes.`,ys,he,Ts,fe,Al=`All model classes in smolagents 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.`,ws,ye,Js,Te,El="The <code>Model</code> class serves as the foundation for all model implementations, providing the core interface that custom models must implement to work with agents.",bs,$,we,Qn,Zt,ql="Base class for all language model implementations.",Wn,Vt,Nl=`This abstract class defines the core interface that all model implementations must follow
to work with agents. It provides common functionality for message handling, tool integration,
and model configuration while allowing subclasses to implement their specific generation logic.`,Zn,Rt,Ll=`Note:
This is an abstract base class. Subclasses must implement the <code>generate()</code> method
to provide actual model inference capabilities.`,Vn,P,Rn,Y,Je,zn,zt,Bl="Process the input messages and return the model’s response.",Sn,D,be,Xn,St,Ql="Sometimes APIs do not return the tool call as a specific object, so we need to parse it.",Fn,O,je,Gn,Xt,Wl="Converts the model into a JSON-compatible dictionary.",js,_e,_s,Ue,Zl="The <code>ApiModel</code> class serves as the foundation for all API-based model implementations, providing common functionality for external API interactions, rate limiting, and client management that API-specific models inherit.",Us,L,Ie,Hn,Ft,Vl="Base class for API-based language models.",Pn,Gt,Rl=`This class serves as a foundation for implementing models that interact with
external APIs. It handles the common functionality for managing model IDs,
custom role mappings, and API client connections.`,Yn,K,Ce,Dn,Ht,zl="Create the API client for the specific service.",Is,$e,Cs,ve,Sl="For convenience, we have added a <code>TransformersModel</code> that implements the points above by building a local <code>transformers</code> pipeline for the model_id given at initialization.",$s,ke,vs,xe,ks,Ae,Xl="You can pass any keyword arguments supported by the underlying model (such as <code>temperature</code>, <code>max_new_tokens</code>, <code>top_p</code>, etc.) directly at instantiation time. These are forwarded to the model completion call:",xs,Ee,As,ee,Fl="<p>You must have <code>transformers</code> and <code>torch</code> installed on your machine. Please run <code>pip install &#39;smolagents[transformers]&#39;</code> if it’s not the case.</p>",Es,E,qe,On,Pt,Gl="A class that uses Hugging Face’s Transformers library for language model interaction.",Kn,Yt,Hl="This model allows you to load and use Hugging Face’s models locally using the Transformers library. It supports features like stop sequences and grammar customization.",el,Ne,Pl="<p>You must have <code>transformers</code> and <code>torch</code> installed on your machine. Please run <code>pip install &#39;smolagents[transformers]&#39;</code> if it’s not the case.</p>",tl,te,qs,Le,Ns,Be,Yl='The <code>InferenceClientModel</code> wraps huggingface_hub’s <a href="https://huggingface.co/docs/huggingface_hub/main/en/guides/inference" rel="nofollow">InferenceClient</a> for the execution of the LLM. It supports all <a href="https://huggingface.co/docs/inference-providers/index" rel="nofollow">Inference Providers</a> available on the Hub: Cerebras, Cohere, Fal, Fireworks, HF-Inference, Hyperbolic, Nebius, Novita, Replicate, SambaNova, Together, and more.',Ls,Qe,Dl="You can also set a rate limit in requests per minute by using the <code>requests_per_minute</code> argument:",Bs,We,Qs,Ze,Ws,Ve,Ol="You can pass any keyword arguments supported by the underlying model (such as <code>temperature</code>, <code>max_tokens</code>, <code>top_p</code>, etc.) directly at instantiation time. These are forwarded to the model completion call:",Zs,Re,Vs,x,ze,sl,Dt,Kl="A class to interact with Hugging Face’s Inference Providers for language model interaction.",nl,Ot,eo="This model allows you to communicate with Hugging Face’s models using Inference Providers. It can be used in both serverless mode, with a dedicated endpoint, or even with a local URL, supporting features like stop sequences and grammar customization.",ll,Kt,to="Providers include Cerebras, Cohere, Fal, Fireworks, HF-Inference, Hyperbolic, Nebius, Novita, Replicate, SambaNova, Together, and more.",ol,se,al,ne,Se,rl,es,so="Create the Hugging Face client.",Rs,Xe,zs,Fe,no=`The <code>LiteLLMModel</code> leverages <a href="https://www.litellm.ai/" rel="nofollow">LiteLLM</a> to support 100+ LLMs from various providers.
You can pass kwargs upon model initialization that will then be used whenever using the model, for instance below we pass <code>temperature</code>. You can also set a rate limit in requests per minute by using the <code>requests_per_minute</code> argument.`,Ss,Ge,Xs,Z,He,il,ts,lo='Model to use <a href="https://docs.litellm.ai/docs/#litellm-python-sdk" rel="nofollow">LiteLLM Python SDK</a> to access hundreds of LLMs.',ml,le,Pe,cl,ss,oo="Create the LiteLLM client.",Fs,Ye,Gs,De,ao=`The <code>LiteLLMRouterModel</code> is a wrapper around the <a href="https://docs.litellm.ai/docs/routing" rel="nofollow">LiteLLM Router</a> that leverages
advanced routing strategies: load-balancing across multiple deployments, prioritizing critical requests via queueing,
and implementing basic reliability measures such as cooldowns, fallbacks, and exponential backoff retries.`,Hs,Oe,Ps,B,Ke,dl,ns,ro='Router‑based client for interacting with the <a href="https://docs.litellm.ai/docs/routing" rel="nofollow">LiteLLM Python SDK Router</a>.',pl,ls,io=`This class provides a high-level interface for distributing requests among multiple language models using
the LiteLLM SDK’s routing capabilities. It is responsible for initializing and configuring the router client,
applying custom role conversions, and managing message formatting to ensure seamless integration with various LLMs.`,gl,oe,Ys,et,Ds,tt,mo=`This class lets you call any OpenAIServer compatible model.
Here’s how you can set it (you can customise the <code>api_base</code> url to point to another server):`,Os,st,Ks,nt,co="You can pass any keyword arguments supported by the underlying model (such as <code>temperature</code>, <code>max_tokens</code>, <code>top_p</code>, etc.) directly at instantiation time. These are forwarded to the model completion call:",en,lt,tn,z,ot,ul,os,po="This model connects to an OpenAI-compatible API server.",sn,at,nn,rt,go="<code>AzureOpenAIModel</code> allows you to connect to any Azure OpenAI deployment.",ln,it,uo="Below you can find an example of how to set it up, note that you can omit the <code>azure_endpoint</code>, <code>api_key</code>, and <code>api_version</code> arguments, provided you’ve set the corresponding environment variables — <code>AZURE_OPENAI_ENDPOINT</code>, <code>AZURE_OPENAI_API_KEY</code>, and <code>OPENAI_API_VERSION</code>.",on,mt,Mo='Pay attention to the lack of an <code>AZURE_</code> prefix for <code>OPENAI_API_VERSION</code>, this is due to the way the underlying <a href="https://github.com/openai/openai-python" rel="nofollow">openai</a> package is designed.',an,ct,rn,S,dt,Ml,as,ho="This model connects to an Azure OpenAI deployment.",mn,pt,cn,gt,fo="<code>AmazonBedrockModel</code> helps you connect to Amazon Bedrock and run your agent with any available models.",dn,ut,yo="Below is an example setup. This class also offers additional options for customization.",pn,Mt,gn,j,ht,hl,rs,To="A model class for interacting with Amazon Bedrock Server models through the Bedrock API.",fl,is,wo=`This class provides an interface to interact with various Bedrock language models,
allowing for customized model inference, guardrail configuration, message handling,
and other parameters allowed by boto3 API.`,yl,ms,Jo="Authentication:",Tl,cs,bo="Amazon Bedrock supports multiple authentication methods:",wl,ds,jo=`<li>Default AWS credentials:
Use the default AWS credential chain (e.g., IAM roles, IAM users).</li> <li>API Key Authentication (requires <code>boto3 &gt;= 1.39.0</code>):
Set the API key using the <code>AWS_BEARER_TOKEN_BEDROCK</code> environment variable.</li>`,Jl,ft,_o=`<p>API key support requires <code>boto3 &gt;= 1.39.0</code>.
For users not relying on API key authentication, the minimum supported version is <code>boto3 &gt;= 1.36.18</code>.</p>`,bl,ps,Uo="Examples:",jl,ae,_l,re,Ul,ie,Il,me,un,yt,Mn,Tt,hn,wt,fn,ce,Io="<p>You must have <code>mlx-lm</code> installed on your machine. Please run <code>pip install &#39;smolagents[mlx-lm]&#39;</code> if it’s not the case.</p>",yn,Q,Jt,Cl,gs,Co="A class to interact with models loaded using MLX on Apple silicon.",$l,bt,$o="<p>You must have <code>mlx-lm</code> installed on your machine. Please run <code>pip install &#39;smolagents[mlx-lm]&#39;</code> if it’s not the case.</p>",vl,de,Tn,jt,wn,_t,vo='Model to use <a href="https://docs.vllm.ai/" rel="nofollow">vLLM</a> for fast LLM inference and serving.',Jn,Ut,bn,pe,ko="<p>You must have <code>vllm</code> installed on your machine. Please run <code>pip install &#39;smolagents[vllm]&#39;</code> if it’s not the case.</p>",jn,X,It,kl,us,xo='Model to use <a href="https://docs.vllm.ai/" rel="nofollow">vLLM</a> for fast LLM inference and serving.',_n,Ct,Un,$t,Ao="You’re free to create and use your own models to power your agent.",In,vt,Eo=`You could subclass the base <code>Model</code> class to create a model for your agent.
The main criteria is to subclass the <code>generate</code> method, with these two criteria:`,Cn,kt,qo='<li>It follows the <a href="./chat_templating">messages format</a> (<code>List[Dict[str, str]]</code>) for its input <code>messages</code>, and it returns an object with a <code>.content</code> attribute.</li> <li>It stops generating outputs at the sequences passed in the argument <code>stop_sequences</code>.</li>',$n,xt,No=`For defining your LLM, you can make a <code>CustomModel</code> class that inherits from the base <code>Model</code> class.
It should have a generate method that takes a list of <a href="./chat_templating">messages</a> and returns an object with a .content attribute containing the text. The <code>generate</code> method also needs to accept a <code>stop_sequences</code> argument that indicates when to stop generating.`,vn,At,kn,Et,Lo='Additionally, <code>generate</code> can also take a <code>grammar</code> argument to allow <a href="https://huggingface.co/docs/text-generation-inference/conceptual/guidance" rel="nofollow">constrained generation</a> in order to force properly-formatted agent outputs.',xn,qt,An,Ms,En;return w=new zo({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),J=new N({props:{title:"Models",local:"models",headingTag:"h1"}}),H=new Ro({props:{warning:!0,$$slots:{default:[Xo]},$$scope:{ctx:C}}}),he=new N({props:{title:"Models",local:"models",headingTag:"h2"}}),ye=new N({props:{title:"Base Model",local:"smolagents.Model",headingTag:"h3"}}),we=new A({props:{name:"class smolagents.Model",anchor:"smolagents.Model",parameters:[{name:"flatten_messages_as_text",val:": bool = False"},{name:"tool_name_key",val:": str = 'name'"},{name:"tool_arguments_key",val:": str = 'arguments'"},{name:"model_id",val:": str | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.Model.flatten_messages_as_text",description:`<strong>flatten_messages_as_text</strong> (<code>bool</code>, default <code>False</code>) &#x2014;
Whether to flatten complex message content into plain text format.`,name:"flatten_messages_as_text"},{anchor:"smolagents.Model.tool_name_key",description:`<strong>tool_name_key</strong> (<code>str</code>, default <code>&quot;name&quot;</code>) &#x2014;
The key used to extract tool names from model responses.`,name:"tool_name_key"},{anchor:"smolagents.Model.tool_arguments_key",description:`<strong>tool_arguments_key</strong> (<code>str</code>, default <code>&quot;arguments&quot;</code>) &#x2014;
The key used to extract tool arguments from model responses.`,name:"tool_arguments_key"},{anchor:"smolagents.Model.model_id",description:`<strong>model_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Identifier for the specific model being used.`,name:"model_id"},{anchor:"smolagents.Model.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying model completion call.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L393"}}),P=new G({props:{anchor:"smolagents.Model.example",$$slots:{default:[Fo]},$$scope:{ctx:C}}}),Je=new A({props:{name:"generate",anchor:"smolagents.Model.generate",parameters:[{name:"messages",val:": list"},{name:"stop_sequences",val:": list[str] | None = None"},{name:"response_format",val:": dict[str, str] | None = None"},{name:"tools_to_call_from",val:": list[smolagents.tools.Tool] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.Model.generate.messages",description:`<strong>messages</strong> (<code>list[dict[str, str | list[dict]]] | list[ChatMessage]</code>) &#x2014;
A list of message dictionaries to be processed. Each dictionary should have the structure <code>{&quot;role&quot;: &quot;user/system&quot;, &quot;content&quot;: &quot;message content&quot;}</code>.`,name:"messages"},{anchor:"smolagents.Model.generate.stop_sequences",description:`<strong>stop_sequences</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
A list of strings that will stop the generation if encountered in the model&#x2019;s output.`,name:"stop_sequences"},{anchor:"smolagents.Model.generate.response_format",description:`<strong>response_format</strong> (<code>dict[str, str]</code>, <em>optional</em>) &#x2014;
The response format to use in the model&#x2019;s response.`,name:"response_format"},{anchor:"smolagents.Model.generate.tools_to_call_from",description:`<strong>tools_to_call_from</strong> (<code>List[Tool]</code>, <em>optional</em>) &#x2014;
A list of tools that the model can use to generate responses.`,name:"tools_to_call_from"},{anchor:"smolagents.Model.generate.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to be passed to the underlying model.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L494",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A chat message object containing the model’s response.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ChatMessage</code></p>
`}}),be=new A({props:{name:"parse_tool_calls",anchor:"smolagents.Model.parse_tool_calls",parameters:[{name:"message",val:": ChatMessage"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L524"}}),je=new A({props:{name:"to_dict",anchor:"smolagents.Model.to_dict",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L537"}}),_e=new N({props:{title:"API Model",local:"smolagents.ApiModel",headingTag:"h3"}}),Ie=new A({props:{name:"class smolagents.ApiModel",anchor:"smolagents.ApiModel",parameters:[{name:"model_id",val:": str"},{name:"custom_role_conversions",val:": dict[str, str] | None = None"},{name:"client",val:": typing.Optional[typing.Any] = None"},{name:"requests_per_minute",val:": float | None = None"},{name:"retry",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.ApiModel.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
The identifier for the model to be used with the API.`,name:"model_id"},{anchor:"smolagents.ApiModel.custom_role_conversions",description:`<strong>custom_role_conversions</strong> (<code>dict[str, str</code>], <strong>optional</strong>) &#x2014;
Mapping to convert  between internal role names and API-specific role names. Defaults to None.`,name:"custom_role_conversions"},{anchor:"smolagents.ApiModel.client",description:`<strong>client</strong> (<code>Any</code>, <strong>optional</strong>) &#x2014;
Pre-configured API client instance. If not provided, a default client will be created. Defaults to None.`,name:"client"},{anchor:"smolagents.ApiModel.requests_per_minute",description:`<strong>requests_per_minute</strong> (<code>float</code>, <strong>optional</strong>) &#x2014;
Rate limit in requests per minute.`,name:"requests_per_minute"},{anchor:"smolagents.ApiModel.retry",description:`<strong>retry</strong> (<code>bool</code>, <strong>optional</strong>) &#x2014;
Wether to retry on rate limit errors, up to RETRY_MAX_ATTEMPTS times. Defaults to True.`,name:"retry"},{anchor:"smolagents.ApiModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying model completion call.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1066"}}),Ce=new A({props:{name:"create_client",anchor:"smolagents.ApiModel.create_client",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1111"}}),$e=new N({props:{title:"TransformersModel",local:"smolagents.TransformersModel",headingTag:"h3"}}),ke=new U({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBUcmFuc2Zvcm1lcnNNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwVHJhbnNmb3JtZXJzTW9kZWwobW9kZWxfaWQlM0QlMjJIdWdnaW5nRmFjZVRCJTJGU21vbExNLTEzNU0tSW5zdHJ1Y3QlMjIpJTBBJTBBcHJpbnQobW9kZWwoJTVCJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTVCJTdCJTIydHlwZSUyMiUzQSUyMCUyMnRleHQlMjIlMkMlMjAlMjJ0ZXh0JTIyJTNBJTIwJTIyT2shJTIyJTdEJTVEJTdEJTVEJTJDJTIwc3RvcF9zZXF1ZW5jZXMlM0QlNUIlMjJncmVhdCUyMiU1RCkp",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> TransformersModel

model = TransformersModel(model_id=<span class="hljs-string">&quot;HuggingFaceTB/SmolLM-135M-Instruct&quot;</span>)

<span class="hljs-built_in">print</span>(model([{<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: [{<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Ok!&quot;</span>}]}], stop_sequences=[<span class="hljs-string">&quot;great&quot;</span>]))`,wrap:!1}}),xe=new U({props:{code:"V2hhdCUyMGE=",highlighted:"&gt;&gt;&gt; What a",wrap:!1}}),Ee=new U({props:{code:"bW9kZWwlMjAlM0QlMjBUcmFuc2Zvcm1lcnNNb2RlbCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCUyMkh1Z2dpbmdGYWNlVEIlMkZTbW9sTE0tMTM1TS1JbnN0cnVjdCUyMiUyQyUwQSUyMCUyMCUyMCUyMHRlbXBlcmF0dXJlJTNEMC43JTJDJTBBJTIwJTIwJTIwJTIwbWF4X25ld190b2tlbnMlM0QxMDAwJTBBKQ==",highlighted:`model = TransformersModel(
    model_id=<span class="hljs-string">&quot;HuggingFaceTB/SmolLM-135M-Instruct&quot;</span>,
    temperature=<span class="hljs-number">0.7</span>,
    max_new_tokens=<span class="hljs-number">1000</span>
)`,wrap:!1}}),qe=new A({props:{name:"class smolagents.TransformersModel",anchor:"smolagents.TransformersModel",parameters:[{name:"model_id",val:": str | None = None"},{name:"device_map",val:": str | None = None"},{name:"torch_dtype",val:": str | None = None"},{name:"trust_remote_code",val:": bool = False"},{name:"model_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"max_new_tokens",val:": int = 4096"},{name:"max_tokens",val:": int | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.TransformersModel.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
The Hugging Face model ID to be used for inference. This can be a path or model identifier from the Hugging Face model hub.
For example, <code>&quot;Qwen/Qwen3-Next-80B-A3B-Thinking&quot;</code>.`,name:"model_id"},{anchor:"smolagents.TransformersModel.device_map",description:`<strong>device_map</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The device_map to initialize your model with.`,name:"device_map"},{anchor:"smolagents.TransformersModel.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The torch_dtype to initialize your model with.`,name:"torch_dtype"},{anchor:"smolagents.TransformersModel.trust_remote_code",description:`<strong>trust_remote_code</strong> (bool, default <code>False</code>) &#x2014;
Some models on the Hub require running remote code: for this model, you would have to set this flag to True.`,name:"trust_remote_code"},{anchor:"smolagents.TransformersModel.model_kwargs",description:`<strong>model_kwargs</strong> (<code>dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to <code>AutoModel.from_pretrained</code> (like revision, model_args, config, etc.).`,name:"model_kwargs"},{anchor:"smolagents.TransformersModel.max_new_tokens",description:`<strong>max_new_tokens</strong> (<code>int</code>, default <code>4096</code>) &#x2014;
Maximum number of new tokens to generate, ignoring the number of tokens in the prompt.`,name:"max_new_tokens"},{anchor:"smolagents.TransformersModel.max_tokens",description:`<strong>max_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Alias for <code>max_new_tokens</code>. If provided, this value takes precedence.`,name:"max_tokens"},{anchor:"smolagents.TransformersModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying Transformers model generate call, such as <code>device</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L793",raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><code>ValueError</code> —
If the model name is not provided.</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code></p>
`}}),te=new G({props:{anchor:"smolagents.TransformersModel.example",$$slots:{default:[Go]},$$scope:{ctx:C}}}),Le=new N({props:{title:"InferenceClientModel",local:"smolagents.InferenceClientModel",headingTag:"h3"}}),We=new U({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUwQSUwQW1lc3NhZ2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTVCJTdCJTIydHlwZSUyMiUzQSUyMCUyMnRleHQlMjIlMkMlMjAlMjJ0ZXh0JTIyJTNBJTIwJTIySGVsbG8lMkMlMjBob3clMjBhcmUlMjB5b3UlM0YlMjIlN0QlNUQlN0QlMEElNUQlMEElMEFtb2RlbCUyMCUzRCUyMEluZmVyZW5jZUNsaWVudE1vZGVsKHByb3ZpZGVyJTNEJTIybm92aXRhJTIyJTJDJTIwcmVxdWVzdHNfcGVyX21pbnV0ZSUzRDYwKSUwQXByaW50KG1vZGVsKG1lc3NhZ2VzKSk=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> InferenceClientModel

messages = [
  {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: [{<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Hello, how are you?&quot;</span>}]}
]

model = InferenceClientModel(provider=<span class="hljs-string">&quot;novita&quot;</span>, requests_per_minute=<span class="hljs-number">60</span>)
<span class="hljs-built_in">print</span>(model(messages))`,wrap:!1}}),Ze=new U({props:{code:"T2YlMjBjb3Vyc2UhJTIwSWYlMjB5b3UlMjBjaGFuZ2UlMjB5b3VyJTIwbWluZCUyQyUyMGZlZWwlMjBmcmVlJTIwdG8lMjByZWFjaCUyMG91dC4lMjBUYWtlJTIwY2FyZSE=",highlighted:"&gt;&gt;&gt; Of course! If you change your mind, feel free to reach out. Take care!",wrap:!1}}),Re=new U({props:{code:"bW9kZWwlMjAlM0QlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCglMEElMjAlMjAlMjAlMjBwcm92aWRlciUzRCUyMm5vdml0YSUyMiUyQyUwQSUyMCUyMCUyMCUyMHJlcXVlc3RzX3Blcl9taW51dGUlM0Q2MCUyQyUwQSUyMCUyMCUyMCUyMHRlbXBlcmF0dXJlJTNEMC44JTJDJTBBJTIwJTIwJTIwJTIwbWF4X3Rva2VucyUzRDUwMCUwQSk=",highlighted:`model = InferenceClientModel(
    provider=<span class="hljs-string">&quot;novita&quot;</span>,
    requests_per_minute=<span class="hljs-number">60</span>,
    temperature=<span class="hljs-number">0.8</span>,
    max_tokens=<span class="hljs-number">500</span>
)`,wrap:!1}}),ze=new A({props:{name:"class smolagents.InferenceClientModel",anchor:"smolagents.InferenceClientModel",parameters:[{name:"model_id",val:": str = 'Qwen/Qwen3-Next-80B-A3B-Thinking'"},{name:"provider",val:": str | None = None"},{name:"token",val:": str | None = None"},{name:"timeout",val:": int = 120"},{name:"client_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"custom_role_conversions",val:": dict[str, str] | None = None"},{name:"api_key",val:": str | None = None"},{name:"bill_to",val:": str | None = None"},{name:"base_url",val:": str | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.InferenceClientModel.model_id",description:`<strong>model_id</strong> (<code>str</code>, <em>optional</em>, default <code>&quot;Qwen/Qwen3-Next-80B-A3B-Thinking&quot;</code>) &#x2014;
The Hugging Face model ID to be used for inference.
This can be a model identifier from the Hugging Face model hub or a URL to a deployed Inference Endpoint.
Currently, it defaults to <code>&quot;Qwen/Qwen3-Next-80B-A3B-Thinking&quot;</code>, but this may change in the future.`,name:"model_id"},{anchor:"smolagents.InferenceClientModel.provider",description:`<strong>provider</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Name of the provider to use for inference. A list of supported providers can be found in the <a href="https://huggingface.co/docs/inference-providers/index#partners" rel="nofollow">Inference Providers documentation</a>.
Defaults to &#x201C;auto&#x201D; i.e. the first of the providers available for the model, sorted by the user&#x2019;s order <a href="https://hf.co/settings/inference-providers" rel="nofollow">here</a>.
If <code>base_url</code> is passed, then <code>provider</code> is not used.`,name:"provider"},{anchor:"smolagents.InferenceClientModel.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Token used by the Hugging Face API for authentication. This token need to be authorized &#x2018;Make calls to the serverless Inference Providers&#x2019;.
If the model is gated (like Llama-3 models), the token also needs &#x2018;Read access to contents of all public gated repos you can access&#x2019;.
If not provided, the class will try to use environment variable &#x2018;HF_TOKEN&#x2019;, else use the token stored in the Hugging Face CLI configuration.`,name:"token"},{anchor:"smolagents.InferenceClientModel.timeout",description:`<strong>timeout</strong> (<code>int</code>, <em>optional</em>, defaults to 120) &#x2014;
Timeout for the API request, in seconds.`,name:"timeout"},{anchor:"smolagents.InferenceClientModel.client_kwargs",description:`<strong>client_kwargs</strong> (<code>dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the Hugging Face InferenceClient.`,name:"client_kwargs"},{anchor:"smolagents.InferenceClientModel.custom_role_conversions",description:`<strong>custom_role_conversions</strong> (<code>dict[str, str]</code>, <em>optional</em>) &#x2014;
Custom role conversion mapping to convert message roles in others.
Useful for specific models that do not support specific message roles like &#x201C;system&#x201D;.`,name:"custom_role_conversions"},{anchor:"smolagents.InferenceClientModel.api_key",description:`<strong>api_key</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Token to use for authentication. This is a duplicated argument from <code>token</code> to make <a href="/docs/smolagents/main/en/reference/models#smolagents.InferenceClientModel">InferenceClientModel</a>
follow the same pattern as <code>openai.OpenAI</code> client. Cannot be used if <code>token</code> is set. Defaults to None.`,name:"api_key"},{anchor:"smolagents.InferenceClientModel.bill_to",description:`<strong>bill_to</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The billing account to use for the requests. By default the requests are billed on the user&#x2019;s account. Requests can only be billed to
an organization the user is a member of, and which has subscribed to Enterprise Hub.`,name:"bill_to"},{anchor:"smolagents.InferenceClientModel.base_url",description:`<strong>base_url</strong> (<code>str</code>, <code>optional</code>) &#x2014;
Base URL to run inference. This is a duplicated argument from <code>model</code> to make <a href="/docs/smolagents/main/en/reference/models#smolagents.InferenceClientModel">InferenceClientModel</a>
follow the same pattern as <code>openai.OpenAI</code> client. Cannot be used if <code>model</code> is set. Defaults to None.`,name:"base_url"},{anchor:"smolagents.InferenceClientModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying Hugging Face InferenceClient completion call.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1382",raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><code>ValueError</code> —
If the model name is not provided.</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code></p>
`}}),se=new G({props:{anchor:"smolagents.InferenceClientModel.example",$$slots:{default:[Ho]},$$scope:{ctx:C}}}),Se=new A({props:{name:"create_client",anchor:"smolagents.InferenceClientModel.create_client",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1473"}}),Xe=new N({props:{title:"LiteLLMModel",local:"smolagents.LiteLLMModel",headingTag:"h3"}}),Ge=new U({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBMaXRlTExNTW9kZWwlMEElMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiUwQSUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCU1QiU3QiUyMnR5cGUlMjIlM0ElMjAlMjJ0ZXh0JTIyJTJDJTIwJTIydGV4dCUyMiUzQSUyMCUyMkhlbGxvJTJDJTIwaG93JTIwYXJlJTIweW91JTNGJTIyJTdEJTVEJTdEJTBBJTVEJTBBJTBBbW9kZWwlMjAlM0QlMjBMaXRlTExNTW9kZWwobW9kZWxfaWQlM0QlMjJhbnRocm9waWMlMkZjbGF1ZGUtMy01LXNvbm5ldC1sYXRlc3QlMjIlMkMlMjB0ZW1wZXJhdHVyZSUzRDAuMiUyQyUyMG1heF90b2tlbnMlM0QxMCUyQyUyMHJlcXVlc3RzX3Blcl9taW51dGUlM0Q2MCklMEFwcmludChtb2RlbChtZXNzYWdlcykp",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> LiteLLMModel

messages = [
  {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: [{<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Hello, how are you?&quot;</span>}]}
]

model = LiteLLMModel(model_id=<span class="hljs-string">&quot;anthropic/claude-3-5-sonnet-latest&quot;</span>, temperature=<span class="hljs-number">0.2</span>, max_tokens=<span class="hljs-number">10</span>, requests_per_minute=<span class="hljs-number">60</span>)
<span class="hljs-built_in">print</span>(model(messages))`,wrap:!1}}),He=new A({props:{name:"class smolagents.LiteLLMModel",anchor:"smolagents.LiteLLMModel",parameters:[{name:"model_id",val:": str | None = None"},{name:"api_base",val:": str | None = None"},{name:"api_key",val:": str | None = None"},{name:"custom_role_conversions",val:": dict[str, str] | None = None"},{name:"flatten_messages_as_text",val:": bool | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.LiteLLMModel.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
The model identifier to use on the server (e.g. &#x201C;gpt-3.5-turbo&#x201D;).`,name:"model_id"},{anchor:"smolagents.LiteLLMModel.api_base",description:`<strong>api_base</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The base URL of the provider API to call the model.`,name:"api_base"},{anchor:"smolagents.LiteLLMModel.api_key",description:`<strong>api_key</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The API key to use for authentication.`,name:"api_key"},{anchor:"smolagents.LiteLLMModel.custom_role_conversions",description:`<strong>custom_role_conversions</strong> (<code>dict[str, str]</code>, <em>optional</em>) &#x2014;
Custom role conversion mapping to convert message roles in others.
Useful for specific models that do not support specific message roles like &#x201C;system&#x201D;.`,name:"custom_role_conversions"},{anchor:"smolagents.LiteLLMModel.flatten_messages_as_text",description:`<strong>flatten_messages_as_text</strong> (<code>bool</code>, <em>optional</em>) &#x2014; Whether to flatten messages as text.
Defaults to <code>True</code> for models that start with &#x201C;ollama&#x201D;, &#x201C;groq&#x201D;, &#x201C;cerebras&#x201D;.`,name:"flatten_messages_as_text"},{anchor:"smolagents.LiteLLMModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying LiteLLM completion call.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1131"}}),Pe=new A({props:{name:"create_client",anchor:"smolagents.LiteLLMModel.create_client",parameters:[],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1181"}}),Ye=new N({props:{title:"LiteLLMRouterModel",local:"smolagents.LiteLLMRouterModel",headingTag:"h3"}}),Oe=new U({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBMaXRlTExNUm91dGVyTW9kZWwlMEElMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiUwQSUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCU1QiU3QiUyMnR5cGUlMjIlM0ElMjAlMjJ0ZXh0JTIyJTJDJTIwJTIydGV4dCUyMiUzQSUyMCUyMkhlbGxvJTJDJTIwaG93JTIwYXJlJTIweW91JTNGJTIyJTdEJTVEJTdEJTBBJTVEJTBBJTBBbW9kZWwlMjAlM0QlMjBMaXRlTExNUm91dGVyTW9kZWwoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlM0QlMjJsbGFtYS0zLjMtNzBiJTIyJTJDJTBBJTIwJTIwJTIwJTIwbW9kZWxfbGlzdCUzRCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMm1vZGVsX25hbWUlMjIlM0ElMjAlMjJsbGFtYS0zLjMtNzBiJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybGl0ZWxsbV9wYXJhbXMlMjIlM0ElMjAlN0IlMjJtb2RlbCUyMiUzQSUyMCUyMmdyb3ElMkZsbGFtYS0zLjMtNzBiJTIyJTJDJTIwJTIyYXBpX2tleSUyMiUzQSUyMG9zLmdldGVudiglMjJHUk9RX0FQSV9LRVklMjIpJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybW9kZWxfbmFtZSUyMiUzQSUyMCUyMmxsYW1hLTMuMy03MGIlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJsaXRlbGxtX3BhcmFtcyUyMiUzQSUyMCU3QiUyMm1vZGVsJTIyJTNBJTIwJTIyY2VyZWJyYXMlMkZsbGFtYS0zLjMtNzBiJTIyJTJDJTIwJTIyYXBpX2tleSUyMiUzQSUyMG9zLmdldGVudiglMjJDRVJFQlJBU19BUElfS0VZJTIyKSU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3RCUyQyUwQSUyMCUyMCUyMCUyMCU1RCUyQyUwQSUyMCUyMCUyMCUyMGNsaWVudF9rd2FyZ3MlM0QlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJyb3V0aW5nX3N0cmF0ZWd5JTIyJTNBJTIwJTIyc2ltcGxlLXNodWZmbGUlMjIlMkMlMEElMjAlMjAlMjAlMjAlN0QlMkMlMEEpJTBBcHJpbnQobW9kZWwobWVzc2FnZXMpKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> LiteLLMRouterModel

messages = [
  {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: [{<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Hello, how are you?&quot;</span>}]}
]

model = LiteLLMRouterModel(
    model_id=<span class="hljs-string">&quot;llama-3.3-70b&quot;</span>,
    model_list=[
        {
            <span class="hljs-string">&quot;model_name&quot;</span>: <span class="hljs-string">&quot;llama-3.3-70b&quot;</span>,
            <span class="hljs-string">&quot;litellm_params&quot;</span>: {<span class="hljs-string">&quot;model&quot;</span>: <span class="hljs-string">&quot;groq/llama-3.3-70b&quot;</span>, <span class="hljs-string">&quot;api_key&quot;</span>: os.getenv(<span class="hljs-string">&quot;GROQ_API_KEY&quot;</span>)},
        },
        {
            <span class="hljs-string">&quot;model_name&quot;</span>: <span class="hljs-string">&quot;llama-3.3-70b&quot;</span>,
            <span class="hljs-string">&quot;litellm_params&quot;</span>: {<span class="hljs-string">&quot;model&quot;</span>: <span class="hljs-string">&quot;cerebras/llama-3.3-70b&quot;</span>, <span class="hljs-string">&quot;api_key&quot;</span>: os.getenv(<span class="hljs-string">&quot;CEREBRAS_API_KEY&quot;</span>)},
        },
    ],
    client_kwargs={
        <span class="hljs-string">&quot;routing_strategy&quot;</span>: <span class="hljs-string">&quot;simple-shuffle&quot;</span>,
    },
)
<span class="hljs-built_in">print</span>(model(messages))`,wrap:!1}}),Ke=new A({props:{name:"class smolagents.LiteLLMRouterModel",anchor:"smolagents.LiteLLMRouterModel",parameters:[{name:"model_id",val:": str"},{name:"model_list",val:": list"},{name:"client_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"custom_role_conversions",val:": dict[str, str] | None = None"},{name:"flatten_messages_as_text",val:": bool | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.LiteLLMRouterModel.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
Identifier for the model group to use from the model list (e.g., &#x201C;model-group-1&#x201D;).`,name:"model_id"},{anchor:"smolagents.LiteLLMRouterModel.model_list",description:`<strong>model_list</strong> (<code>list[dict[str, Any]]</code>) &#x2014;
Model configurations to be used for routing.
Each configuration should include the model group name and any necessary parameters.
For more details, refer to the <a href="https://docs.litellm.ai/docs/routing#quick-start" rel="nofollow">LiteLLM Routing</a> documentation.`,name:"model_list"},{anchor:"smolagents.LiteLLMRouterModel.client_kwargs",description:`<strong>client_kwargs</strong> (<code>dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional configuration parameters for the Router client. For more details, see the
<a href="https://docs.litellm.ai/docs/routing" rel="nofollow">LiteLLM Routing Configurations</a>.`,name:"client_kwargs"},{anchor:"smolagents.LiteLLMRouterModel.custom_role_conversions",description:`<strong>custom_role_conversions</strong> (<code>dict[str, str]</code>, <em>optional</em>) &#x2014;
Custom role conversion mapping to convert message roles in others.
Useful for specific models that do not support specific message roles like &#x201C;system&#x201D;.`,name:"custom_role_conversions"},{anchor:"smolagents.LiteLLMRouterModel.flatten_messages_as_text",description:`<strong>flatten_messages_as_text</strong> (<code>bool</code>, <em>optional</em>) &#x2014; Whether to flatten messages as text.
Defaults to <code>True</code> for models that start with &#x201C;ollama&#x201D;, &#x201C;groq&#x201D;, &#x201C;cerebras&#x201D;.`,name:"flatten_messages_as_text"},{anchor:"smolagents.LiteLLMRouterModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying LiteLLM Router completion call.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1289"}}),oe=new G({props:{anchor:"smolagents.LiteLLMRouterModel.example",$$slots:{default:[Po]},$$scope:{ctx:C}}}),et=new N({props:{title:"OpenAIModel",local:"smolagents.OpenAIModel",headingTag:"h3"}}),st=new U({props:{code:"aW1wb3J0JTIwb3MlMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyME9wZW5BSU1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBPcGVuQUlNb2RlbCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCUyMmdwdC00byUyMiUyQyUwQSUyMCUyMCUyMCUyMGFwaV9iYXNlJTNEJTIyaHR0cHMlM0ElMkYlMkZhcGkub3BlbmFpLmNvbSUyRnYxJTIyJTJDJTBBJTIwJTIwJTIwJTIwYXBpX2tleSUzRG9zLmVudmlyb24lNUIlMjJPUEVOQUlfQVBJX0tFWSUyMiU1RCUyQyUwQSk=",highlighted:`<span class="hljs-keyword">import</span> os
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> OpenAIModel

model = OpenAIModel(
    model_id=<span class="hljs-string">&quot;gpt-4o&quot;</span>,
    api_base=<span class="hljs-string">&quot;https://api.openai.com/v1&quot;</span>,
    api_key=os.environ[<span class="hljs-string">&quot;OPENAI_API_KEY&quot;</span>],
)`,wrap:!1}}),lt=new U({props:{code:"bW9kZWwlMjAlM0QlMjBPcGVuQUlNb2RlbCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCUyMmdwdC00byUyMiUyQyUwQSUyMCUyMCUyMCUyMGFwaV9iYXNlJTNEJTIyaHR0cHMlM0ElMkYlMkZhcGkub3BlbmFpLmNvbSUyRnYxJTIyJTJDJTBBJTIwJTIwJTIwJTIwYXBpX2tleSUzRG9zLmVudmlyb24lNUIlMjJPUEVOQUlfQVBJX0tFWSUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHRlbXBlcmF0dXJlJTNEMC43JTJDJTBBJTIwJTIwJTIwJTIwbWF4X3Rva2VucyUzRDEwMDAlMkMlMEElMjAlMjAlMjAlMjB0b3BfcCUzRDAuOSUyQyUwQSk=",highlighted:`model = OpenAIModel(
    model_id=<span class="hljs-string">&quot;gpt-4o&quot;</span>,
    api_base=<span class="hljs-string">&quot;https://api.openai.com/v1&quot;</span>,
    api_key=os.environ[<span class="hljs-string">&quot;OPENAI_API_KEY&quot;</span>],
    temperature=<span class="hljs-number">0.7</span>,
    max_tokens=<span class="hljs-number">1000</span>,
    top_p=<span class="hljs-number">0.9</span>,
)`,wrap:!1}}),ot=new A({props:{name:"class smolagents.OpenAIModel",anchor:"smolagents.OpenAIModel",parameters:[{name:"model_id",val:": str"},{name:"api_base",val:": str | None = None"},{name:"api_key",val:": str | None = None"},{name:"organization",val:": str | None = None"},{name:"project",val:": str | None = None"},{name:"client_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"custom_role_conversions",val:": dict[str, str] | None = None"},{name:"flatten_messages_as_text",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.OpenAIModel.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
The model identifier to use on the server (e.g. &#x201C;gpt-5&#x201D;).`,name:"model_id"},{anchor:"smolagents.OpenAIModel.api_base",description:`<strong>api_base</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The base URL of the OpenAI-compatible API server.`,name:"api_base"},{anchor:"smolagents.OpenAIModel.api_key",description:`<strong>api_key</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The API key to use for authentication.`,name:"api_key"},{anchor:"smolagents.OpenAIModel.organization",description:`<strong>organization</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The organization to use for the API request.`,name:"organization"},{anchor:"smolagents.OpenAIModel.project",description:`<strong>project</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The project to use for the API request.`,name:"project"},{anchor:"smolagents.OpenAIModel.client_kwargs",description:`<strong>client_kwargs</strong> (<code>dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the OpenAI client (like organization, project, max_retries etc.).`,name:"client_kwargs"},{anchor:"smolagents.OpenAIModel.custom_role_conversions",description:`<strong>custom_role_conversions</strong> (<code>dict[str, str]</code>, <em>optional</em>) &#x2014;
Custom role conversion mapping to convert message roles in others.
Useful for specific models that do not support specific message roles like &#x201C;system&#x201D;.`,name:"custom_role_conversions"},{anchor:"smolagents.OpenAIModel.flatten_messages_as_text",description:`<strong>flatten_messages_as_text</strong> (<code>bool</code>, default <code>False</code>) &#x2014;
Whether to flatten messages as text.`,name:"flatten_messages_as_text"},{anchor:"smolagents.OpenAIModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying OpenAI API completion call, for instance <code>temperature</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1572"}}),at=new N({props:{title:"AzureOpenAIModel",local:"smolagents.AzureOpenAIModel",headingTag:"h3"}}),ct=new U({props:{code:"aW1wb3J0JTIwb3MlMEElMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMEF6dXJlT3BlbkFJTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEF6dXJlT3BlbkFJTW9kZWwoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlMjAlM0QlMjBvcy5lbnZpcm9uLmdldCglMjJBWlVSRV9PUEVOQUlfTU9ERUwlMjIpJTJDJTBBJTIwJTIwJTIwJTIwYXp1cmVfZW5kcG9pbnQlM0Rvcy5lbnZpcm9uLmdldCglMjJBWlVSRV9PUEVOQUlfRU5EUE9JTlQlMjIpJTJDJTBBJTIwJTIwJTIwJTIwYXBpX2tleSUzRG9zLmVudmlyb24uZ2V0KCUyMkFaVVJFX09QRU5BSV9BUElfS0VZJTIyKSUyQyUwQSUyMCUyMCUyMCUyMGFwaV92ZXJzaW9uJTNEb3MuZW52aXJvbi5nZXQoJTIyT1BFTkFJX0FQSV9WRVJTSU9OJTIyKSUyMCUyMCUyMCUyMCUwQSk=",highlighted:`<span class="hljs-keyword">import</span> os

<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> AzureOpenAIModel

model = AzureOpenAIModel(
    model_id = os.environ.get(<span class="hljs-string">&quot;AZURE_OPENAI_MODEL&quot;</span>),
    azure_endpoint=os.environ.get(<span class="hljs-string">&quot;AZURE_OPENAI_ENDPOINT&quot;</span>),
    api_key=os.environ.get(<span class="hljs-string">&quot;AZURE_OPENAI_API_KEY&quot;</span>),
    api_version=os.environ.get(<span class="hljs-string">&quot;OPENAI_API_VERSION&quot;</span>)    
)`,wrap:!1}}),dt=new A({props:{name:"class smolagents.AzureOpenAIModel",anchor:"smolagents.AzureOpenAIModel",parameters:[{name:"model_id",val:": str"},{name:"azure_endpoint",val:": str | None = None"},{name:"api_key",val:": str | None = None"},{name:"api_version",val:": str | None = None"},{name:"client_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"custom_role_conversions",val:": dict[str, str] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.AzureOpenAIModel.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
The model deployment name to use when connecting (e.g. &#x201C;gpt-4o-mini&#x201D;).`,name:"model_id"},{anchor:"smolagents.AzureOpenAIModel.azure_endpoint",description:`<strong>azure_endpoint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The Azure endpoint, including the resource, e.g. <code>https://example-resource.azure.openai.com/</code>. If not provided, it will be inferred from the <code>AZURE_OPENAI_ENDPOINT</code> environment variable.`,name:"azure_endpoint"},{anchor:"smolagents.AzureOpenAIModel.api_key",description:`<strong>api_key</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The API key to use for authentication. If not provided, it will be inferred from the <code>AZURE_OPENAI_API_KEY</code> environment variable.`,name:"api_key"},{anchor:"smolagents.AzureOpenAIModel.api_version",description:`<strong>api_version</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The API version to use. If not provided, it will be inferred from the <code>OPENAI_API_VERSION</code> environment variable.`,name:"api_version"},{anchor:"smolagents.AzureOpenAIModel.client_kwargs",description:`<strong>client_kwargs</strong> (<code>dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the AzureOpenAI client (like organization, project, max_retries etc.).`,name:"client_kwargs"},{anchor:"smolagents.AzureOpenAIModel.custom_role_conversions",description:`<strong>custom_role_conversions</strong> (<code>dict[str, str]</code>, <em>optional</em>) &#x2014;
Custom role conversion mapping to convert message roles in others.
Useful for specific models that do not support specific message roles like &#x201C;system&#x201D;.`,name:"custom_role_conversions"},{anchor:"smolagents.AzureOpenAIModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying Azure OpenAI API completion call.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1725"}}),pt=new N({props:{title:"AmazonBedrockModel",local:"smolagents.AmazonBedrockModel",headingTag:"h3"}}),Mt=new U({props:{code:"aW1wb3J0JTIwb3MlMEElMEFmcm9tJTIwc21vbGFnZW50cyUyMGltcG9ydCUyMEFtYXpvbkJlZHJvY2tNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQW1hem9uQmVkcm9ja01vZGVsKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTIwJTNEJTIwb3MuZW52aXJvbi5nZXQoJTIyQU1BWk9OX0JFRFJPQ0tfTU9ERUxfSUQlMjIpJTJDJTBBKQ==",highlighted:`<span class="hljs-keyword">import</span> os

<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> AmazonBedrockModel

model = AmazonBedrockModel(
    model_id = os.environ.get(<span class="hljs-string">&quot;AMAZON_BEDROCK_MODEL_ID&quot;</span>),
)`,wrap:!1}}),ht=new A({props:{name:"class smolagents.AmazonBedrockModel",anchor:"smolagents.AmazonBedrockModel",parameters:[{name:"model_id",val:": str"},{name:"client",val:" = None"},{name:"client_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"custom_role_conversions",val:": dict[str, str] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.AmazonBedrockModel.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
The model identifier to use on Bedrock (e.g. &#x201C;us.amazon.nova-pro-v1:0&#x201D;).`,name:"model_id"},{anchor:"smolagents.AmazonBedrockModel.client",description:`<strong>client</strong> (<code>boto3.client</code>, <em>optional</em>) &#x2014;
A custom boto3 client for AWS interactions. If not provided, a default client will be created.`,name:"client"},{anchor:"smolagents.AmazonBedrockModel.client_kwargs",description:`<strong>client_kwargs</strong> (dict[str, Any], <em>optional</em>) &#x2014;
Keyword arguments used to configure the boto3 client if it needs to be created internally.
Examples include <code>region_name</code>, <code>config</code>, or <code>endpoint_url</code>.`,name:"client_kwargs"},{anchor:"smolagents.AmazonBedrockModel.custom_role_conversions",description:`<strong>custom_role_conversions</strong> (<code>dict[str, str]</code>, <em>optional</em>) &#x2014;
Custom role conversion mapping to convert message roles in others.
Useful for specific models that do not support specific message roles like &#x201C;system&#x201D;.
Defaults to converting all roles to &#x201C;user&#x201D; role to enable using all the Bedrock models.`,name:"custom_role_conversions"},{anchor:"smolagents.AmazonBedrockModel.flatten_messages_as_text",description:`<strong>flatten_messages_as_text</strong> (<code>bool</code>, default <code>False</code>) &#x2014;
Whether to flatten messages as text.`,name:"flatten_messages_as_text"},{anchor:"smolagents.AmazonBedrockModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying Amazon Bedrock model converse call.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L1785"}}),ae=new G({props:{anchor:"smolagents.AmazonBedrockModel.example",$$slots:{default:[Yo]},$$scope:{ctx:C}}}),re=new G({props:{anchor:"smolagents.AmazonBedrockModel.example-2",$$slots:{default:[Do]},$$scope:{ctx:C}}}),ie=new G({props:{anchor:"smolagents.AmazonBedrockModel.example-3",$$slots:{default:[Oo]},$$scope:{ctx:C}}}),me=new G({props:{anchor:"smolagents.AmazonBedrockModel.example-4",$$slots:{default:[Ko]},$$scope:{ctx:C}}}),yt=new N({props:{title:"MLXModel",local:"smolagents.MLXModel",headingTag:"h3"}}),Tt=new U({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBNTFhNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwTUxYTW9kZWwobW9kZWxfaWQlM0QlMjJIdWdnaW5nRmFjZVRCJTJGU21vbExNLTEzNU0tSW5zdHJ1Y3QlMjIpJTBBJTBBcHJpbnQobW9kZWwoJTVCJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyT2shJTIyJTdEJTVEJTJDJTIwc3RvcF9zZXF1ZW5jZXMlM0QlNUIlMjJncmVhdCUyMiU1RCkp",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> MLXModel

model = MLXModel(model_id=<span class="hljs-string">&quot;HuggingFaceTB/SmolLM-135M-Instruct&quot;</span>)

<span class="hljs-built_in">print</span>(model([{<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Ok!&quot;</span>}], stop_sequences=[<span class="hljs-string">&quot;great&quot;</span>]))`,wrap:!1}}),wt=new U({props:{code:"V2hhdCUyMGE=",highlighted:"&gt;&gt;&gt; What a",wrap:!1}}),Jt=new A({props:{name:"class smolagents.MLXModel",anchor:"smolagents.MLXModel",parameters:[{name:"model_id",val:": str"},{name:"trust_remote_code",val:": bool = False"},{name:"load_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"apply_chat_template_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.MLXModel.model_id",description:`<strong>model_id</strong> (str) &#x2014;
The Hugging Face model ID to be used for inference. This can be a path or model identifier from the Hugging Face model hub.`,name:"model_id"},{anchor:"smolagents.MLXModel.tool_name_key",description:`<strong>tool_name_key</strong> (str) &#x2014;
The key, which can usually be found in the model&#x2019;s chat template, for retrieving a tool name.`,name:"tool_name_key"},{anchor:"smolagents.MLXModel.tool_arguments_key",description:`<strong>tool_arguments_key</strong> (str) &#x2014;
The key, which can usually be found in the model&#x2019;s chat template, for retrieving tool arguments.`,name:"tool_arguments_key"},{anchor:"smolagents.MLXModel.trust_remote_code",description:`<strong>trust_remote_code</strong> (bool, default <code>False</code>) &#x2014;
Some models on the Hub require running remote code: for this model, you would have to set this flag to True.`,name:"trust_remote_code"},{anchor:"smolagents.MLXModel.load_kwargs",description:`<strong>load_kwargs</strong> (dict[str, Any], <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the <code>mlx.lm.load</code> method when loading the model and tokenizer.`,name:"load_kwargs"},{anchor:"smolagents.MLXModel.apply_chat_template_kwargs",description:`<strong>apply_chat_template_kwargs</strong> (dict, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the <code>apply_chat_template</code> method of the tokenizer.`,name:"apply_chat_template_kwargs"},{anchor:"smolagents.MLXModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying MLX model stream_generate call, for instance <code>max_tokens</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L684"}}),de=new G({props:{anchor:"smolagents.MLXModel.example",$$slots:{default:[ea]},$$scope:{ctx:C}}}),jt=new N({props:{title:"VLLMModel",local:"smolagents.VLLMModel",headingTag:"h3"}}),Ut=new U({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBWTExNTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMFZMTE1Nb2RlbChtb2RlbF9pZCUzRCUyMkh1Z2dpbmdGYWNlVEIlMkZTbW9sTE0tMTM1TS1JbnN0cnVjdCUyMiklMEElMEFwcmludChtb2RlbCglNUIlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJPayElMjIlN0QlNUQlMkMlMjBzdG9wX3NlcXVlbmNlcyUzRCU1QiUyMmdyZWF0JTIyJTVEKSk=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> VLLMModel

model = VLLMModel(model_id=<span class="hljs-string">&quot;HuggingFaceTB/SmolLM-135M-Instruct&quot;</span>)

<span class="hljs-built_in">print</span>(model([{<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Ok!&quot;</span>}], stop_sequences=[<span class="hljs-string">&quot;great&quot;</span>]))`,wrap:!1}}),It=new A({props:{name:"class smolagents.VLLMModel",anchor:"smolagents.VLLMModel",parameters:[{name:"model_id",val:""},{name:"model_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"smolagents.VLLMModel.model_id",description:`<strong>model_id</strong> (<code>str</code>) &#x2014;
The Hugging Face model ID to be used for inference.
This can be a path or model identifier from the Hugging Face model hub.`,name:"model_id"},{anchor:"smolagents.VLLMModel.model_kwargs",description:`<strong>model_kwargs</strong> (<code>dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to forward to the vLLM LLM instantiation, such as <code>revision</code>, <code>max_model_len</code>, etc.`,name:"model_kwargs"},{anchor:"smolagents.VLLMModel.*kwargs",description:`*<strong>*kwargs</strong> &#x2014;
Additional keyword arguments to forward to the underlying vLLM model generate call.`,name:"*kwargs"}],source:"https://github.com/huggingface/smolagents/blob/main/src/smolagents/models.py#L574"}}),Ct=new N({props:{title:"Custom Model",local:"custom-model",headingTag:"h3"}}),At=new U({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGxvZ2luJTJDJTIwSW5mZXJlbmNlQ2xpZW50JTBBJTBBZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBNb2RlbCUwQSUwQWxvZ2luKCUyMiUzQ1lPVVJfSFVHR0lOR0ZBQ0VIVUJfQVBJX1RPS0VOJTNFJTIyKSUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIybWV0YS1sbGFtYSUyRkxsYW1hLTMuMy03MEItSW5zdHJ1Y3QlMjIlMEElMEFjbGllbnQlMjAlM0QlMjBJbmZlcmVuY2VDbGllbnQobW9kZWwlM0Rtb2RlbF9pZCklMEElMEFjbGFzcyUyMEN1c3RvbU1vZGVsKE1vZGVsKSUzQSUwQSUyMCUyMCUyMCUyMGRlZiUyMGdlbmVyYXRlKG1lc3NhZ2VzJTJDJTIwc3RvcF9zZXF1ZW5jZXMlM0QlNUIlMjJUYXNrJTIyJTVEKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJlc3BvbnNlJTIwJTNEJTIwY2xpZW50LmNoYXRfY29tcGxldGlvbihtZXNzYWdlcyUyQyUyMHN0b3AlM0RzdG9wX3NlcXVlbmNlcyUyQyUyMG1heF90b2tlbnMlM0QxMDI0KSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGFuc3dlciUyMCUzRCUyMHJlc3BvbnNlLmNob2ljZXMlNUIwJTVELm1lc3NhZ2UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjBhbnN3ZXIlMEElMEFjdXN0b21fbW9kZWwlMjAlM0QlMjBDdXN0b21Nb2RlbCgp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> login, InferenceClient

<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> Model

login(<span class="hljs-string">&quot;&lt;YOUR_HUGGINGFACEHUB_API_TOKEN&gt;&quot;</span>)

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

client = InferenceClient(model=model_id)

<span class="hljs-keyword">class</span> <span class="hljs-title class_">CustomModel</span>(<span class="hljs-title class_ inherited__">Model</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">generate</span>(<span class="hljs-params">messages, stop_sequences=[<span class="hljs-string">&quot;Task&quot;</span>]</span>):
        response = client.chat_completion(messages, stop=stop_sequences, max_tokens=<span class="hljs-number">1024</span>)
        answer = response.choices[<span class="hljs-number">0</span>].message
        <span class="hljs-keyword">return</span> answer

custom_model = CustomModel()`,wrap:!1}}),qt=new So({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/en/reference/models.md"}}),{c(){r=i("meta"),b=o(),T=i("p"),d=o(),g(w.$$.fragment),n=o(),g(J.$$.fragment),hs=o(),g(H.$$.fragment),fs=o(),Me=i("p"),Me.innerHTML=xl,ys=o(),g(he.$$.fragment),Ts=o(),fe=i("p"),fe.innerHTML=Al,ws=o(),g(ye.$$.fragment),Js=o(),Te=i("p"),Te.innerHTML=El,bs=o(),$=i("div"),g(we.$$.fragment),Qn=o(),Zt=i("p"),Zt.textContent=ql,Wn=o(),Vt=i("p"),Vt.textContent=Nl,Zn=o(),Rt=i("p"),Rt.innerHTML=Ll,Vn=o(),g(P.$$.fragment),Rn=o(),Y=i("div"),g(Je.$$.fragment),zn=o(),zt=i("p"),zt.textContent=Bl,Sn=o(),D=i("div"),g(be.$$.fragment),Xn=o(),St=i("p"),St.textContent=Ql,Fn=o(),O=i("div"),g(je.$$.fragment),Gn=o(),Xt=i("p"),Xt.textContent=Wl,js=o(),g(_e.$$.fragment),_s=o(),Ue=i("p"),Ue.innerHTML=Zl,Us=o(),L=i("div"),g(Ie.$$.fragment),Hn=o(),Ft=i("p"),Ft.textContent=Vl,Pn=o(),Gt=i("p"),Gt.textContent=Rl,Yn=o(),K=i("div"),g(Ce.$$.fragment),Dn=o(),Ht=i("p"),Ht.textContent=zl,Is=o(),g($e.$$.fragment),Cs=o(),ve=i("p"),ve.innerHTML=Sl,$s=o(),g(ke.$$.fragment),vs=o(),g(xe.$$.fragment),ks=o(),Ae=i("p"),Ae.innerHTML=Xl,xs=o(),g(Ee.$$.fragment),As=o(),ee=i("blockquote"),ee.innerHTML=Fl,Es=o(),E=i("div"),g(qe.$$.fragment),On=o(),Pt=i("p"),Pt.textContent=Gl,Kn=o(),Yt=i("p"),Yt.textContent=Hl,el=o(),Ne=i("blockquote"),Ne.innerHTML=Pl,tl=o(),g(te.$$.fragment),qs=o(),g(Le.$$.fragment),Ns=o(),Be=i("p"),Be.innerHTML=Yl,Ls=o(),Qe=i("p"),Qe.innerHTML=Dl,Bs=o(),g(We.$$.fragment),Qs=o(),g(Ze.$$.fragment),Ws=o(),Ve=i("p"),Ve.innerHTML=Ol,Zs=o(),g(Re.$$.fragment),Vs=o(),x=i("div"),g(ze.$$.fragment),sl=o(),Dt=i("p"),Dt.textContent=Kl,nl=o(),Ot=i("p"),Ot.textContent=eo,ll=o(),Kt=i("p"),Kt.textContent=to,ol=o(),g(se.$$.fragment),al=o(),ne=i("div"),g(Se.$$.fragment),rl=o(),es=i("p"),es.textContent=so,Rs=o(),g(Xe.$$.fragment),zs=o(),Fe=i("p"),Fe.innerHTML=no,Ss=o(),g(Ge.$$.fragment),Xs=o(),Z=i("div"),g(He.$$.fragment),il=o(),ts=i("p"),ts.innerHTML=lo,ml=o(),le=i("div"),g(Pe.$$.fragment),cl=o(),ss=i("p"),ss.textContent=oo,Fs=o(),g(Ye.$$.fragment),Gs=o(),De=i("p"),De.innerHTML=ao,Hs=o(),g(Oe.$$.fragment),Ps=o(),B=i("div"),g(Ke.$$.fragment),dl=o(),ns=i("p"),ns.innerHTML=ro,pl=o(),ls=i("p"),ls.textContent=io,gl=o(),g(oe.$$.fragment),Ys=o(),g(et.$$.fragment),Ds=o(),tt=i("p"),tt.innerHTML=mo,Os=o(),g(st.$$.fragment),Ks=o(),nt=i("p"),nt.innerHTML=co,en=o(),g(lt.$$.fragment),tn=o(),z=i("div"),g(ot.$$.fragment),ul=o(),os=i("p"),os.textContent=po,sn=o(),g(at.$$.fragment),nn=o(),rt=i("p"),rt.innerHTML=go,ln=o(),it=i("p"),it.innerHTML=uo,on=o(),mt=i("p"),mt.innerHTML=Mo,an=o(),g(ct.$$.fragment),rn=o(),S=i("div"),g(dt.$$.fragment),Ml=o(),as=i("p"),as.textContent=ho,mn=o(),g(pt.$$.fragment),cn=o(),gt=i("p"),gt.innerHTML=fo,dn=o(),ut=i("p"),ut.textContent=yo,pn=o(),g(Mt.$$.fragment),gn=o(),j=i("div"),g(ht.$$.fragment),hl=o(),rs=i("p"),rs.textContent=To,fl=o(),is=i("p"),is.textContent=wo,yl=o(),ms=i("p"),ms.textContent=Jo,Tl=o(),cs=i("p"),cs.textContent=bo,wl=o(),ds=i("ul"),ds.innerHTML=jo,Jl=o(),ft=i("blockquote"),ft.innerHTML=_o,bl=o(),ps=i("p"),ps.textContent=Uo,jl=o(),g(ae.$$.fragment),_l=o(),g(re.$$.fragment),Ul=o(),g(ie.$$.fragment),Il=o(),g(me.$$.fragment),un=o(),g(yt.$$.fragment),Mn=o(),g(Tt.$$.fragment),hn=o(),g(wt.$$.fragment),fn=o(),ce=i("blockquote"),ce.innerHTML=Io,yn=o(),Q=i("div"),g(Jt.$$.fragment),Cl=o(),gs=i("p"),gs.textContent=Co,$l=o(),bt=i("blockquote"),bt.innerHTML=$o,vl=o(),g(de.$$.fragment),Tn=o(),g(jt.$$.fragment),wn=o(),_t=i("p"),_t.innerHTML=vo,Jn=o(),g(Ut.$$.fragment),bn=o(),pe=i("blockquote"),pe.innerHTML=ko,jn=o(),X=i("div"),g(It.$$.fragment),kl=o(),us=i("p"),us.innerHTML=xo,_n=o(),g(Ct.$$.fragment),Un=o(),$t=i("p"),$t.textContent=Ao,In=o(),vt=i("p"),vt.innerHTML=Eo,Cn=o(),kt=i("ol"),kt.innerHTML=qo,$n=o(),xt=i("p"),xt.innerHTML=No,vn=o(),g(At.$$.fragment),kn=o(),Et=i("p"),Et.innerHTML=Lo,xn=o(),g(qt.$$.fragment),An=o(),Ms=i("p"),this.h()},l(e){const t=Vo("svelte-u9bgzb",document.head);r=m(t,"META",{name:!0,content:!0}),t.forEach(s),b=a(e),T=m(e,"P",{}),k(T).forEach(s),d=a(e),u(w.$$.fragment,e),n=a(e),u(J.$$.fragment,e),hs=a(e),u(H.$$.fragment,e),fs=a(e),Me=m(e,"P",{"data-svelte-h":!0}),p(Me)!=="svelte-17nnzxz"&&(Me.innerHTML=xl),ys=a(e),u(he.$$.fragment,e),Ts=a(e),fe=m(e,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-19xyef7"&&(fe.innerHTML=Al),ws=a(e),u(ye.$$.fragment,e),Js=a(e),Te=m(e,"P",{"data-svelte-h":!0}),p(Te)!=="svelte-oebo46"&&(Te.innerHTML=El),bs=a(e),$=m(e,"DIV",{class:!0});var v=k($);u(we.$$.fragment,v),Qn=a(v),Zt=m(v,"P",{"data-svelte-h":!0}),p(Zt)!=="svelte-akdo2d"&&(Zt.textContent=ql),Wn=a(v),Vt=m(v,"P",{"data-svelte-h":!0}),p(Vt)!=="svelte-fzlv7p"&&(Vt.textContent=Nl),Zn=a(v),Rt=m(v,"P",{"data-svelte-h":!0}),p(Rt)!=="svelte-1nh53b7"&&(Rt.innerHTML=Ll),Vn=a(v),u(P.$$.fragment,v),Rn=a(v),Y=m(v,"DIV",{class:!0});var Nt=k(Y);u(Je.$$.fragment,Nt),zn=a(Nt),zt=m(Nt,"P",{"data-svelte-h":!0}),p(zt)!=="svelte-w01v3a"&&(zt.textContent=Bl),Nt.forEach(s),Sn=a(v),D=m(v,"DIV",{class:!0});var Lt=k(D);u(be.$$.fragment,Lt),Xn=a(Lt),St=m(Lt,"P",{"data-svelte-h":!0}),p(St)!=="svelte-xj9yar"&&(St.textContent=Ql),Lt.forEach(s),Fn=a(v),O=m(v,"DIV",{class:!0});var Bt=k(O);u(je.$$.fragment,Bt),Gn=a(Bt),Xt=m(Bt,"P",{"data-svelte-h":!0}),p(Xt)!=="svelte-138117q"&&(Xt.textContent=Wl),Bt.forEach(s),v.forEach(s),js=a(e),u(_e.$$.fragment,e),_s=a(e),Ue=m(e,"P",{"data-svelte-h":!0}),p(Ue)!=="svelte-pbx5jd"&&(Ue.innerHTML=Zl),Us=a(e),L=m(e,"DIV",{class:!0});var V=k(L);u(Ie.$$.fragment,V),Hn=a(V),Ft=m(V,"P",{"data-svelte-h":!0}),p(Ft)!=="svelte-mqlsp2"&&(Ft.textContent=Vl),Pn=a(V),Gt=m(V,"P",{"data-svelte-h":!0}),p(Gt)!=="svelte-1pa0fc1"&&(Gt.textContent=Rl),Yn=a(V),K=m(V,"DIV",{class:!0});var Qt=k(K);u(Ce.$$.fragment,Qt),Dn=a(Qt),Ht=m(Qt,"P",{"data-svelte-h":!0}),p(Ht)!=="svelte-8ki1kt"&&(Ht.textContent=zl),Qt.forEach(s),V.forEach(s),Is=a(e),u($e.$$.fragment,e),Cs=a(e),ve=m(e,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-ulv590"&&(ve.innerHTML=Sl),$s=a(e),u(ke.$$.fragment,e),vs=a(e),u(xe.$$.fragment,e),ks=a(e),Ae=m(e,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-g5vlul"&&(Ae.innerHTML=Xl),xs=a(e),u(Ee.$$.fragment,e),As=a(e),ee=m(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(ee)!=="svelte-103z9yw"&&(ee.innerHTML=Fl),Es=a(e),E=m(e,"DIV",{class:!0});var W=k(E);u(qe.$$.fragment,W),On=a(W),Pt=m(W,"P",{"data-svelte-h":!0}),p(Pt)!=="svelte-1ex1ahr"&&(Pt.textContent=Gl),Kn=a(W),Yt=m(W,"P",{"data-svelte-h":!0}),p(Yt)!=="svelte-1140acn"&&(Yt.textContent=Hl),el=a(W),Ne=m(W,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(Ne)!=="svelte-103z9yw"&&(Ne.innerHTML=Pl),tl=a(W),u(te.$$.fragment,W),W.forEach(s),qs=a(e),u(Le.$$.fragment,e),Ns=a(e),Be=m(e,"P",{"data-svelte-h":!0}),p(Be)!=="svelte-iu01g0"&&(Be.innerHTML=Yl),Ls=a(e),Qe=m(e,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-kvj8ld"&&(Qe.innerHTML=Dl),Bs=a(e),u(We.$$.fragment,e),Qs=a(e),u(Ze.$$.fragment,e),Ws=a(e),Ve=m(e,"P",{"data-svelte-h":!0}),p(Ve)!=="svelte-1hlk7ls"&&(Ve.innerHTML=Ol),Zs=a(e),u(Re.$$.fragment,e),Vs=a(e),x=m(e,"DIV",{class:!0});var q=k(x);u(ze.$$.fragment,q),sl=a(q),Dt=m(q,"P",{"data-svelte-h":!0}),p(Dt)!=="svelte-axkcn3"&&(Dt.textContent=Kl),nl=a(q),Ot=m(q,"P",{"data-svelte-h":!0}),p(Ot)!=="svelte-bducrc"&&(Ot.textContent=eo),ll=a(q),Kt=m(q,"P",{"data-svelte-h":!0}),p(Kt)!=="svelte-12eu297"&&(Kt.textContent=to),ol=a(q),u(se.$$.fragment,q),al=a(q),ne=m(q,"DIV",{class:!0});var Wt=k(ne);u(Se.$$.fragment,Wt),rl=a(Wt),es=m(Wt,"P",{"data-svelte-h":!0}),p(es)!=="svelte-ym2f5u"&&(es.textContent=so),Wt.forEach(s),q.forEach(s),Rs=a(e),u(Xe.$$.fragment,e),zs=a(e),Fe=m(e,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-1m09ddd"&&(Fe.innerHTML=no),Ss=a(e),u(Ge.$$.fragment,e),Xs=a(e),Z=m(e,"DIV",{class:!0});var F=k(Z);u(He.$$.fragment,F),il=a(F),ts=m(F,"P",{"data-svelte-h":!0}),p(ts)!=="svelte-5g97zk"&&(ts.innerHTML=lo),ml=a(F),le=m(F,"DIV",{class:!0});var qn=k(le);u(Pe.$$.fragment,qn),cl=a(qn),ss=m(qn,"P",{"data-svelte-h":!0}),p(ss)!=="svelte-12r14rd"&&(ss.textContent=oo),qn.forEach(s),F.forEach(s),Fs=a(e),u(Ye.$$.fragment,e),Gs=a(e),De=m(e,"P",{"data-svelte-h":!0}),p(De)!=="svelte-cark4"&&(De.innerHTML=ao),Hs=a(e),u(Oe.$$.fragment,e),Ps=a(e),B=m(e,"DIV",{class:!0});var ge=k(B);u(Ke.$$.fragment,ge),dl=a(ge),ns=m(ge,"P",{"data-svelte-h":!0}),p(ns)!=="svelte-2o2pf3"&&(ns.innerHTML=ro),pl=a(ge),ls=m(ge,"P",{"data-svelte-h":!0}),p(ls)!=="svelte-1cq7nyu"&&(ls.textContent=io),gl=a(ge),u(oe.$$.fragment,ge),ge.forEach(s),Ys=a(e),u(et.$$.fragment,e),Ds=a(e),tt=m(e,"P",{"data-svelte-h":!0}),p(tt)!=="svelte-juyrd0"&&(tt.innerHTML=mo),Os=a(e),u(st.$$.fragment,e),Ks=a(e),nt=m(e,"P",{"data-svelte-h":!0}),p(nt)!=="svelte-1hlk7ls"&&(nt.innerHTML=co),en=a(e),u(lt.$$.fragment,e),tn=a(e),z=m(e,"DIV",{class:!0});var Nn=k(z);u(ot.$$.fragment,Nn),ul=a(Nn),os=m(Nn,"P",{"data-svelte-h":!0}),p(os)!=="svelte-1bc1pfc"&&(os.textContent=po),Nn.forEach(s),sn=a(e),u(at.$$.fragment,e),nn=a(e),rt=m(e,"P",{"data-svelte-h":!0}),p(rt)!=="svelte-14crz6e"&&(rt.innerHTML=go),ln=a(e),it=m(e,"P",{"data-svelte-h":!0}),p(it)!=="svelte-1tbo5q5"&&(it.innerHTML=uo),on=a(e),mt=m(e,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-16r94fh"&&(mt.innerHTML=Mo),an=a(e),u(ct.$$.fragment,e),rn=a(e),S=m(e,"DIV",{class:!0});var Ln=k(S);u(dt.$$.fragment,Ln),Ml=a(Ln),as=m(Ln,"P",{"data-svelte-h":!0}),p(as)!=="svelte-1fspdqk"&&(as.textContent=ho),Ln.forEach(s),mn=a(e),u(pt.$$.fragment,e),cn=a(e),gt=m(e,"P",{"data-svelte-h":!0}),p(gt)!=="svelte-17z83lj"&&(gt.innerHTML=fo),dn=a(e),ut=m(e,"P",{"data-svelte-h":!0}),p(ut)!=="svelte-l4p418"&&(ut.textContent=yo),pn=a(e),u(Mt.$$.fragment,e),gn=a(e),j=m(e,"DIV",{class:!0});var I=k(j);u(ht.$$.fragment,I),hl=a(I),rs=m(I,"P",{"data-svelte-h":!0}),p(rs)!=="svelte-nngfd4"&&(rs.textContent=To),fl=a(I),is=m(I,"P",{"data-svelte-h":!0}),p(is)!=="svelte-1milklp"&&(is.textContent=wo),yl=a(I),ms=m(I,"P",{"data-svelte-h":!0}),p(ms)!=="svelte-xgynbu"&&(ms.textContent=Jo),Tl=a(I),cs=m(I,"P",{"data-svelte-h":!0}),p(cs)!=="svelte-r4fpk6"&&(cs.textContent=bo),wl=a(I),ds=m(I,"UL",{"data-svelte-h":!0}),p(ds)!=="svelte-bxyop7"&&(ds.innerHTML=jo),Jl=a(I),ft=m(I,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(ft)!=="svelte-ens2rm"&&(ft.innerHTML=_o),bl=a(I),ps=m(I,"P",{"data-svelte-h":!0}),p(ps)!=="svelte-kvfsh7"&&(ps.textContent=Uo),jl=a(I),u(ae.$$.fragment,I),_l=a(I),u(re.$$.fragment,I),Ul=a(I),u(ie.$$.fragment,I),Il=a(I),u(me.$$.fragment,I),I.forEach(s),un=a(e),u(yt.$$.fragment,e),Mn=a(e),u(Tt.$$.fragment,e),hn=a(e),u(wt.$$.fragment,e),fn=a(e),ce=m(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(ce)!=="svelte-covr82"&&(ce.innerHTML=Io),yn=a(e),Q=m(e,"DIV",{class:!0});var ue=k(Q);u(Jt.$$.fragment,ue),Cl=a(ue),gs=m(ue,"P",{"data-svelte-h":!0}),p(gs)!=="svelte-t9ku5w"&&(gs.textContent=Co),$l=a(ue),bt=m(ue,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(bt)!=="svelte-covr82"&&(bt.innerHTML=$o),vl=a(ue),u(de.$$.fragment,ue),ue.forEach(s),Tn=a(e),u(jt.$$.fragment,e),wn=a(e),_t=m(e,"P",{"data-svelte-h":!0}),p(_t)!=="svelte-1vi10v1"&&(_t.innerHTML=vo),Jn=a(e),u(Ut.$$.fragment,e),bn=a(e),pe=m(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(pe)!=="svelte-9qh0h6"&&(pe.innerHTML=ko),jn=a(e),X=m(e,"DIV",{class:!0});var Bn=k(X);u(It.$$.fragment,Bn),kl=a(Bn),us=m(Bn,"P",{"data-svelte-h":!0}),p(us)!=="svelte-1vi10v1"&&(us.innerHTML=xo),Bn.forEach(s),_n=a(e),u(Ct.$$.fragment,e),Un=a(e),$t=m(e,"P",{"data-svelte-h":!0}),p($t)!=="svelte-nwgagp"&&($t.textContent=Ao),In=a(e),vt=m(e,"P",{"data-svelte-h":!0}),p(vt)!=="svelte-1982g4m"&&(vt.innerHTML=Eo),Cn=a(e),kt=m(e,"OL",{"data-svelte-h":!0}),p(kt)!=="svelte-otqs16"&&(kt.innerHTML=qo),$n=a(e),xt=m(e,"P",{"data-svelte-h":!0}),p(xt)!=="svelte-ww7ptk"&&(xt.innerHTML=No),vn=a(e),u(At.$$.fragment,e),kn=a(e),Et=m(e,"P",{"data-svelte-h":!0}),p(Et)!=="svelte-1kcdlrn"&&(Et.innerHTML=Lo),xn=a(e),u(qt.$$.fragment,e),An=a(e),Ms=m(e,"P",{}),k(Ms).forEach(s),this.h()},h(){_(r,"name","hf:doc:metadata"),_(r,"content",sa),_(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ee,"class","tip"),_(Ne,"class","tip"),_(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ft,"class","tip"),_(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ce,"class","tip"),_(bt,"class","tip"),_(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(pe,"class","tip"),_(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){c(document.head,r),l(e,b,t),l(e,T,t),l(e,d,t),M(w,e,t),l(e,n,t),M(J,e,t),l(e,hs,t),M(H,e,t),l(e,fs,t),l(e,Me,t),l(e,ys,t),M(he,e,t),l(e,Ts,t),l(e,fe,t),l(e,ws,t),M(ye,e,t),l(e,Js,t),l(e,Te,t),l(e,bs,t),l(e,$,t),M(we,$,null),c($,Qn),c($,Zt),c($,Wn),c($,Vt),c($,Zn),c($,Rt),c($,Vn),M(P,$,null),c($,Rn),c($,Y),M(Je,Y,null),c(Y,zn),c(Y,zt),c($,Sn),c($,D),M(be,D,null),c(D,Xn),c(D,St),c($,Fn),c($,O),M(je,O,null),c(O,Gn),c(O,Xt),l(e,js,t),M(_e,e,t),l(e,_s,t),l(e,Ue,t),l(e,Us,t),l(e,L,t),M(Ie,L,null),c(L,Hn),c(L,Ft),c(L,Pn),c(L,Gt),c(L,Yn),c(L,K),M(Ce,K,null),c(K,Dn),c(K,Ht),l(e,Is,t),M($e,e,t),l(e,Cs,t),l(e,ve,t),l(e,$s,t),M(ke,e,t),l(e,vs,t),M(xe,e,t),l(e,ks,t),l(e,Ae,t),l(e,xs,t),M(Ee,e,t),l(e,As,t),l(e,ee,t),l(e,Es,t),l(e,E,t),M(qe,E,null),c(E,On),c(E,Pt),c(E,Kn),c(E,Yt),c(E,el),c(E,Ne),c(E,tl),M(te,E,null),l(e,qs,t),M(Le,e,t),l(e,Ns,t),l(e,Be,t),l(e,Ls,t),l(e,Qe,t),l(e,Bs,t),M(We,e,t),l(e,Qs,t),M(Ze,e,t),l(e,Ws,t),l(e,Ve,t),l(e,Zs,t),M(Re,e,t),l(e,Vs,t),l(e,x,t),M(ze,x,null),c(x,sl),c(x,Dt),c(x,nl),c(x,Ot),c(x,ll),c(x,Kt),c(x,ol),M(se,x,null),c(x,al),c(x,ne),M(Se,ne,null),c(ne,rl),c(ne,es),l(e,Rs,t),M(Xe,e,t),l(e,zs,t),l(e,Fe,t),l(e,Ss,t),M(Ge,e,t),l(e,Xs,t),l(e,Z,t),M(He,Z,null),c(Z,il),c(Z,ts),c(Z,ml),c(Z,le),M(Pe,le,null),c(le,cl),c(le,ss),l(e,Fs,t),M(Ye,e,t),l(e,Gs,t),l(e,De,t),l(e,Hs,t),M(Oe,e,t),l(e,Ps,t),l(e,B,t),M(Ke,B,null),c(B,dl),c(B,ns),c(B,pl),c(B,ls),c(B,gl),M(oe,B,null),l(e,Ys,t),M(et,e,t),l(e,Ds,t),l(e,tt,t),l(e,Os,t),M(st,e,t),l(e,Ks,t),l(e,nt,t),l(e,en,t),M(lt,e,t),l(e,tn,t),l(e,z,t),M(ot,z,null),c(z,ul),c(z,os),l(e,sn,t),M(at,e,t),l(e,nn,t),l(e,rt,t),l(e,ln,t),l(e,it,t),l(e,on,t),l(e,mt,t),l(e,an,t),M(ct,e,t),l(e,rn,t),l(e,S,t),M(dt,S,null),c(S,Ml),c(S,as),l(e,mn,t),M(pt,e,t),l(e,cn,t),l(e,gt,t),l(e,dn,t),l(e,ut,t),l(e,pn,t),M(Mt,e,t),l(e,gn,t),l(e,j,t),M(ht,j,null),c(j,hl),c(j,rs),c(j,fl),c(j,is),c(j,yl),c(j,ms),c(j,Tl),c(j,cs),c(j,wl),c(j,ds),c(j,Jl),c(j,ft),c(j,bl),c(j,ps),c(j,jl),M(ae,j,null),c(j,_l),M(re,j,null),c(j,Ul),M(ie,j,null),c(j,Il),M(me,j,null),l(e,un,t),M(yt,e,t),l(e,Mn,t),M(Tt,e,t),l(e,hn,t),M(wt,e,t),l(e,fn,t),l(e,ce,t),l(e,yn,t),l(e,Q,t),M(Jt,Q,null),c(Q,Cl),c(Q,gs),c(Q,$l),c(Q,bt),c(Q,vl),M(de,Q,null),l(e,Tn,t),M(jt,e,t),l(e,wn,t),l(e,_t,t),l(e,Jn,t),M(Ut,e,t),l(e,bn,t),l(e,pe,t),l(e,jn,t),l(e,X,t),M(It,X,null),c(X,kl),c(X,us),l(e,_n,t),M(Ct,e,t),l(e,Un,t),l(e,$t,t),l(e,In,t),l(e,vt,t),l(e,Cn,t),l(e,kt,t),l(e,$n,t),l(e,xt,t),l(e,vn,t),M(At,e,t),l(e,kn,t),l(e,Et,t),l(e,xn,t),M(qt,e,t),l(e,An,t),l(e,Ms,t),En=!0},p(e,[t]){const v={};t&2&&(v.$$scope={dirty:t,ctx:e}),H.$set(v);const Nt={};t&2&&(Nt.$$scope={dirty:t,ctx:e}),P.$set(Nt);const Lt={};t&2&&(Lt.$$scope={dirty:t,ctx:e}),te.$set(Lt);const Bt={};t&2&&(Bt.$$scope={dirty:t,ctx:e}),se.$set(Bt);const V={};t&2&&(V.$$scope={dirty:t,ctx:e}),oe.$set(V);const Qt={};t&2&&(Qt.$$scope={dirty:t,ctx:e}),ae.$set(Qt);const W={};t&2&&(W.$$scope={dirty:t,ctx:e}),re.$set(W);const q={};t&2&&(q.$$scope={dirty:t,ctx:e}),ie.$set(q);const Wt={};t&2&&(Wt.$$scope={dirty:t,ctx:e}),me.$set(Wt);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),de.$set(F)},i(e){En||(h(w.$$.fragment,e),h(J.$$.fragment,e),h(H.$$.fragment,e),h(he.$$.fragment,e),h(ye.$$.fragment,e),h(we.$$.fragment,e),h(P.$$.fragment,e),h(Je.$$.fragment,e),h(be.$$.fragment,e),h(je.$$.fragment,e),h(_e.$$.fragment,e),h(Ie.$$.fragment,e),h(Ce.$$.fragment,e),h($e.$$.fragment,e),h(ke.$$.fragment,e),h(xe.$$.fragment,e),h(Ee.$$.fragment,e),h(qe.$$.fragment,e),h(te.$$.fragment,e),h(Le.$$.fragment,e),h(We.$$.fragment,e),h(Ze.$$.fragment,e),h(Re.$$.fragment,e),h(ze.$$.fragment,e),h(se.$$.fragment,e),h(Se.$$.fragment,e),h(Xe.$$.fragment,e),h(Ge.$$.fragment,e),h(He.$$.fragment,e),h(Pe.$$.fragment,e),h(Ye.$$.fragment,e),h(Oe.$$.fragment,e),h(Ke.$$.fragment,e),h(oe.$$.fragment,e),h(et.$$.fragment,e),h(st.$$.fragment,e),h(lt.$$.fragment,e),h(ot.$$.fragment,e),h(at.$$.fragment,e),h(ct.$$.fragment,e),h(dt.$$.fragment,e),h(pt.$$.fragment,e),h(Mt.$$.fragment,e),h(ht.$$.fragment,e),h(ae.$$.fragment,e),h(re.$$.fragment,e),h(ie.$$.fragment,e),h(me.$$.fragment,e),h(yt.$$.fragment,e),h(Tt.$$.fragment,e),h(wt.$$.fragment,e),h(Jt.$$.fragment,e),h(de.$$.fragment,e),h(jt.$$.fragment,e),h(Ut.$$.fragment,e),h(It.$$.fragment,e),h(Ct.$$.fragment,e),h(At.$$.fragment,e),h(qt.$$.fragment,e),En=!0)},o(e){f(w.$$.fragment,e),f(J.$$.fragment,e),f(H.$$.fragment,e),f(he.$$.fragment,e),f(ye.$$.fragment,e),f(we.$$.fragment,e),f(P.$$.fragment,e),f(Je.$$.fragment,e),f(be.$$.fragment,e),f(je.$$.fragment,e),f(_e.$$.fragment,e),f(Ie.$$.fragment,e),f(Ce.$$.fragment,e),f($e.$$.fragment,e),f(ke.$$.fragment,e),f(xe.$$.fragment,e),f(Ee.$$.fragment,e),f(qe.$$.fragment,e),f(te.$$.fragment,e),f(Le.$$.fragment,e),f(We.$$.fragment,e),f(Ze.$$.fragment,e),f(Re.$$.fragment,e),f(ze.$$.fragment,e),f(se.$$.fragment,e),f(Se.$$.fragment,e),f(Xe.$$.fragment,e),f(Ge.$$.fragment,e),f(He.$$.fragment,e),f(Pe.$$.fragment,e),f(Ye.$$.fragment,e),f(Oe.$$.fragment,e),f(Ke.$$.fragment,e),f(oe.$$.fragment,e),f(et.$$.fragment,e),f(st.$$.fragment,e),f(lt.$$.fragment,e),f(ot.$$.fragment,e),f(at.$$.fragment,e),f(ct.$$.fragment,e),f(dt.$$.fragment,e),f(pt.$$.fragment,e),f(Mt.$$.fragment,e),f(ht.$$.fragment,e),f(ae.$$.fragment,e),f(re.$$.fragment,e),f(ie.$$.fragment,e),f(me.$$.fragment,e),f(yt.$$.fragment,e),f(Tt.$$.fragment,e),f(wt.$$.fragment,e),f(Jt.$$.fragment,e),f(de.$$.fragment,e),f(jt.$$.fragment,e),f(Ut.$$.fragment,e),f(It.$$.fragment,e),f(Ct.$$.fragment,e),f(At.$$.fragment,e),f(qt.$$.fragment,e),En=!1},d(e){e&&(s(b),s(T),s(d),s(n),s(hs),s(fs),s(Me),s(ys),s(Ts),s(fe),s(ws),s(Js),s(Te),s(bs),s($),s(js),s(_s),s(Ue),s(Us),s(L),s(Is),s(Cs),s(ve),s($s),s(vs),s(ks),s(Ae),s(xs),s(As),s(ee),s(Es),s(E),s(qs),s(Ns),s(Be),s(Ls),s(Qe),s(Bs),s(Qs),s(Ws),s(Ve),s(Zs),s(Vs),s(x),s(Rs),s(zs),s(Fe),s(Ss),s(Xs),s(Z),s(Fs),s(Gs),s(De),s(Hs),s(Ps),s(B),s(Ys),s(Ds),s(tt),s(Os),s(Ks),s(nt),s(en),s(tn),s(z),s(sn),s(nn),s(rt),s(ln),s(it),s(on),s(mt),s(an),s(rn),s(S),s(mn),s(cn),s(gt),s(dn),s(ut),s(pn),s(gn),s(j),s(un),s(Mn),s(hn),s(fn),s(ce),s(yn),s(Q),s(Tn),s(wn),s(_t),s(Jn),s(bn),s(pe),s(jn),s(X),s(_n),s(Un),s($t),s(In),s(vt),s(Cn),s(kt),s($n),s(xt),s(vn),s(kn),s(Et),s(xn),s(An),s(Ms)),s(r),y(w,e),y(J,e),y(H,e),y(he,e),y(ye,e),y(we),y(P),y(Je),y(be),y(je),y(_e,e),y(Ie),y(Ce),y($e,e),y(ke,e),y(xe,e),y(Ee,e),y(qe),y(te),y(Le,e),y(We,e),y(Ze,e),y(Re,e),y(ze),y(se),y(Se),y(Xe,e),y(Ge,e),y(He),y(Pe),y(Ye,e),y(Oe,e),y(Ke),y(oe),y(et,e),y(st,e),y(lt,e),y(ot),y(at,e),y(ct,e),y(dt),y(pt,e),y(Mt,e),y(ht),y(ae),y(re),y(ie),y(me),y(yt,e),y(Tt,e),y(wt,e),y(Jt),y(de),y(jt,e),y(Ut,e),y(It),y(Ct,e),y(At,e),y(qt,e)}}}const sa='{"title":"Models","local":"models","sections":[{"title":"Models","local":"models","sections":[{"title":"Base Model","local":"smolagents.Model","sections":[],"depth":3},{"title":"API Model","local":"smolagents.ApiModel","sections":[],"depth":3},{"title":"TransformersModel","local":"smolagents.TransformersModel","sections":[],"depth":3},{"title":"InferenceClientModel","local":"smolagents.InferenceClientModel","sections":[],"depth":3},{"title":"LiteLLMModel","local":"smolagents.LiteLLMModel","sections":[],"depth":3},{"title":"LiteLLMRouterModel","local":"smolagents.LiteLLMRouterModel","sections":[],"depth":3},{"title":"OpenAIModel","local":"smolagents.OpenAIModel","sections":[],"depth":3},{"title":"AzureOpenAIModel","local":"smolagents.AzureOpenAIModel","sections":[],"depth":3},{"title":"AmazonBedrockModel","local":"smolagents.AmazonBedrockModel","sections":[],"depth":3},{"title":"MLXModel","local":"smolagents.MLXModel","sections":[],"depth":3},{"title":"VLLMModel","local":"smolagents.VLLMModel","sections":[],"depth":3},{"title":"Custom Model","local":"custom-model","sections":[],"depth":3}],"depth":2}],"depth":1}';function na(C){return Qo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ca extends Wo{constructor(r){super(),Zo(this,r,na,ta,Bo,{})}}export{ca as component};
