1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5767],{1038:(e,t,n)=>{n.d(t,{B:()=>i});let r=e=>e.toLowerCase().replace(/[._]/g,"-"),i=(e,t)=>{let n=t.find(t=>t===e);if(n)return n;let i=r(e),o=t.find(e=>r(e)===i);if(o)return o;let l=t.find(e=>r(e.split("/").pop())===i);return l||null}},9580:(e,t,n)=>{n.d(t,{Rr:()=>i,UL:()=>o,xj:()=>r}),n(37876);let r=["","api","settings","voice"],i=e=>{for(let t of r)if(t&&e.at(-1)===t)return[e.slice(0,-1).join("/"),t];return[e.join("/"),""]},o=(e,t,n)=>{let i="number"==typeof t?r[t]:t;return["/",e,i?"/".concat(i):"",n?"?version=".concat(n):""].join("")}},49948:(e,t,n)=>{n.d(t,{$g:()=>p,I8:()=>x,N8:()=>o,aI:()=>d,b2:()=>u,d5:()=>h,tH:()=>_,u5:()=>m});var r=n(37876);let i=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:4,maximumFractionDigits:5}),o=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}),l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:3}),c=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:3,maximumFractionDigits:3}),a=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:4}),s=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:5,maximumFractionDigits:5});function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return null==e||isNaN(e)?t:e<1024?e:Math.floor(e/1024)+"k"}function p(e){let{maximumFractionDigits:t=4,minimumFractionDigits:n=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:n,maximumFractionDigits:t}).format(1e4*e)}function u(e){if("time"===e.type)return"".concat(i.format(e.cents_per_sec/100));if("uptime"===e.type)return"".concat(o.format(e.cents_per_sec/100*3600));if("input_tokens"==e.type)return"".concat(c.format(1e4*e.cents_per_input_token));if("input_length"===e.type)return"".concat(s.format(.01*e.cents_per_input_sec*60));if("input_character_length"===e.type)return"".concat(l.format(1e4*e.cents_per_input_chars));else if("image_units"===e.type){if(null!=e.default_price_cents)return a.format(e.default_price_cents/100);let t=e.default_iterations>1?" x (iters / ".concat(e.default_iterations,")"):1==e.default_iterations?" x iters":"",n=e.default_width&&e.default_height?" x (w / ".concat(e.default_width,") x (h / ").concat(e.default_height,")"):"";return"".concat(a.format(e.cents_per_image_unit/100)).concat(n).concat(t)}else if("output_length"===e.type)return"".concat(i.format(e.cents_per_output_sec/100));else if("frame_units"===e.type)return"".concat(a.format(e.cents_per_frame_unit/100));else if(e.rate_per_input_token_cached)return"".concat(l.format(1e4*e.cents_per_input_token*e.rate_per_input_token_cached),"/").concat(l.format(1e4*e.cents_per_input_token),"/").concat(l.format(1e4*e.cents_per_output_token));else if(e.cents_per_output_token==e.cents_per_input_token)return"".concat(l.format(1e4*e.cents_per_output_token));else return"".concat(l.format(1e4*e.cents_per_input_token),"/").concat(l.format(1e4*e.cents_per_output_token))}function x(e,t){if(e.short)return e.short;if("time"===e.type)return"".concat(i.format(e.cents_per_sec/100)," / second");if("uptime"===e.type)return"".concat(o.format(e.cents_per_sec/100*3600)," / instance-hour");if("input_tokens"==e.type)return"".concat(c.format(1e4*e.cents_per_input_token)," / 1M tokens");if("input_length"===e.type)return"".concat(s.format(.01*e.cents_per_input_sec*60)," / minute");else if("input_character_length"===e.type)return"".concat(l.format(1e4*e.cents_per_input_chars)," per 1M characters");else if("image_units"===e.type){let n;if(null!=e.default_price_cents){let n=t.includes("video")?" / video":" / image";return"".concat(a.format(e.default_price_cents/100)).concat(n)}let r=e.default_iterations>1?" x (iters / ".concat(e.default_iterations,")"):1==e.default_iterations?" x iters":"",i=e.default_width&&e.default_height?" x (width / ".concat(e.default_width,") x (height / ").concat(e.default_height,")"):"";return n=t.includes("video")?r||i?"":" / video":r||i?"":" / image","".concat(a.format(e.cents_per_image_unit/100)).concat(i).c
1oncat(r).concat(n)}else if("output_length"===e.type)return"".concat(i.format(e.cents_per_output_sec/100)," / second");else if("frame_units"===e.type)return"".concat(a.format(e.cents_per_frame_unit/100)," / frame unit");else if(e.rate_per_input_token_cached)return"".concat(l.format(1e4*e.cents_per_input_token*e.rate_per_input_token_cached)," cached, ").concat(l.format(1e4*e.cents_per_input_token)," in, ").concat(l.format(1e4*e.cents_per_output_token)," out / 1M");else if(e.cents_per_output_token==e.cents_per_input_token)return"".concat(l.format(1e4*e.cents_per_output_token)," / 1M tokens");else return"".concat(l.format(1e4*e.cents_per_input_token)," in, ").concat(l.format(1e4*e.cents_per_output_token)," out / 1M")}function m(e,t,n){if((null==e?void 0:e.type)==="uptime"&&null!=n&&!Number.isNaN(n))return"".concat(o.format(n)," / instance-hour");return x(e,t)}let h=e=>{let{pricing:t,type:n,primary:d="span",secondary:p="span"}=e;if(t.short)return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(d,{children:t.short})});if("time"===t.type)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:i.format(t.cents_per_sec/100)}),(0,r.jsx)(p,{children:" / second"})]});if("uptime"===t.type)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:o.format(t.cents_per_sec/100*3600)})," ",(0,r.jsx)(p,{children:" / instance-hour"})]});if("input_tokens"==t.type)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:c.format(1e4*t.cents_per_input_token)}),(0,r.jsx)(p,{children:" / 1M tokens"})]});if("input_length"===t.type)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:s.format(.01*t.cents_per_input_sec*60)}),(0,r.jsx)(p,{children:" / minute"})]});else if("input_character_length"===t.type)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:l.format(1e4*t.cents_per_input_chars)}),(0,r.jsx)(p,{children:" / 1M characters"})]});else if("image_units"===t.type){let e;if(null!=t.default_price_cents){let e=n.includes("video")?" / video":" / image";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:a.format(t.default_price_cents/100)}),(0,r.jsx)(p,{children:e})]})}let i=t.default_iterations>1?" x (iters / ".concat(t.default_iterations,")"):1==t.default_iterations?" x iters":"",o=t.default_width&&t.default_height?" x (width / ".concat(t.default_width,") x (height / ").concat(t.default_height,")"):"";return e=n.includes("video")?i||o?"":" / video":i||o?"":" / image",(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(d,{children:a.format(t.cents_per_image_unit/100)}),(0,r.jsx)(p,{children:"".concat(o).concat(i).concat(e)})]})}else if("output_length"===t.type)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:i.format(t.cents_per_output_sec/100)}),(0,r.jsx)(p,{children:" / second"})]});else if("frame_units"===t.type)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:a.format(t.cents_per_frame_unit/100)}),(0,r.jsx)(p,{children:" / frame unit"})]});else if(t.rate_per_input_token_cached)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:l.format(1e4*t.cents_per_input_token)}),(0,r.jsx)(p,{sx:{mr:1},children:" in"}),(0,r.jsx)(d,{children:l.format(1e4*t.cents_per_output_token)}),(0,r.jsx)(p,{sx:{mr:1},children:" out"}),(0,r.jsx)(d,{children:l.format(1e4*t.cents_per_input_token*t.rate_per_input_token_cached)}),(0,r.jsx)(p,{children:" cached"}),(0,r.jsx)(p,{children:" / 1M tokens"})]});else if(t.cents_per_output_token==t.cents_per_input_token)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:l.format(1e4*t.cents_per_output_token)}),(0,r.jsx)(p,{children:" / 1M tokens"})]});else return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:l.format(1e4*t.cents_per_input_token)}),(0,r.jsx)(p,{sx:{mr:1},children:" in"}),(0,r.jsx)(d,{children:l.format(1e4*t.cents_per_output_token)}),(0,r.jsx)(p,{children:" out"}),(0,r.jsx)(p,{children:" / 1M tokens"})]})};function _(e,t){return"tokens"===e.type?"".concat(l.format(1e4*e.cents_per_input_token),"/M in ⢠").concat(l.format(1e4*e.cents_per_output_token),"/M out"):x(e,t)}},56027:(e,t,n)=>{n.d(t,{b1:()=>x,dD:()=>_,nd:()=>m});var r=n(37876),i=n(30566),o=n(22430),l=n(22474),c=n(99674),a=n(65596),s=n(77321),d=n(66480);let p={light:"#0E9F6E",dark:"#3DDC97"},u={small:{height:20,fontSize:10.5,iconSize:11,gap:.375,px:.75},medium:{height:26,fontSize:12,iconSize:14,gap:.5,px:1},large:{height:32,fontSize:14,iconSize:16,gap:.625,px:1.25}};function x(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(0,i.A)();return e||"dark"===t.palette.mode?p.dark:p.light}let m=e=>{var t;let{pricing:n,size:i="small",showDeadline:p=!0,onDark:m=!1}=e,{t:h}=(0,s.Bd)(),_=x(m),g=function(e){let{t,i18n:n}=(0,s.Bd)(),r=(0,d.ls)(e);if(null==r)return{text:null,date:null};let i=new Intl.DateTimeFormat(n.language,{month:"short",day:"numeric"}).format(new Date(r)),o=(0,d.CY)(e);return{text:0===o?t("pricing.discount.ends_today"):o<=14?t("pricing.discount.days_left",{c
1ount:o}):t("pricing.discount.until",{date:i}),date:i}}(n),f=(0,d.N9)(n);if(null==f)return null;let j=null!=(t=u[i])?t:u.small,y=g.date?h("pricing.discount.tooltip_until",{percent:f,date:g.date}):h("pricing.discount.tooltip",{percent:f});return(0,r.jsx)(o.A,{title:y,children:(0,r.jsxs)(l.A,{component:"span",direction:"row",alignItems:"center",gap:j.gap,sx:{flex:"none",height:j.height,px:j.px,borderRadius:"".concat(j.height/2,"px"),border:"1px solid ".concat(_),color:_,backgroundColor:"rgba(61, 220, 151, 0.12)",fontFamily:"Manrope, sans-serif",fontWeight:700,fontSize:j.fontSize,lineHeight:1,letterSpacing:"0.02em",whiteSpace:"nowrap",cursor:"default"},children:[(0,r.jsx)(a.A,{sx:{fontSize:j.iconSize}}),h("pricing.discount.badge",{percent:f}),p&&g.text&&(0,r.jsx)(c.A,{component:"span",sx:{fontWeight:500,opacity:.85},children:" \xb7 ".concat(g.text)})]})})},h=e=>{let{pricing:t,format:n}=e,{t:i}=(0,s.Bd)();return(0,d.wv)(t)?(0,r.jsx)(o.A,{title:i("pricing.discount.list_price"),children:(0,r.jsx)(c.A,{component:"span",sx:{textDecoration:"line-through",textDecorationThickness:"1px",opacity:.5,fontWeight:400,whiteSpace:"nowrap"},children:n(t)})}):null},_=e=>{let{pricing:t,format:n,size:i="small",badge:o=!0,showDeadline:a=!1,onDark:s=!1}=e,p=x(s);return null==(0,d.cT)(t)?(0,r.jsx)(r.Fragment,{children:n(t)}):(0,r.jsxs)(l.A,{component:"span",direction:"row",alignItems:"center",gap:.75,flexWrap:"wrap",sx:{minWidth:0},children:[(0,r.jsx)(h,{pricing:t,format:n}),(0,r.jsx)(c.A,{component:"span",sx:{color:p,fontWeight:700,whiteSpace:"nowrap"},children:n((0,d._K)(t))}),o&&(0,r.jsx)(m,{pricing:t,size:i,showDeadline:a,onDark:s})]})}},66480:(e,t,n)=>{n.d(t,{CY:()=>c,N9:()=>o,_K:()=>s,cT:()=>i,ls:()=>l,wv:()=>a});let r=["cents_per_sec","cents_per_input_token","cents_per_output_token","cents_per_input_sec","cents_per_input_chars","cents_per_image_unit","cents_per_output_sec","cents_per_frame_unit","default_price_cents"];function i(e){let t=null==e?void 0:e.discount;return"number"==typeof t&&t>0&&t<1?t:null}function o(e){let t=i(e);return null==t?null:Math.round(100*t)}function l(e){let t=null==e?void 0:e.discount_ends_at;return null!=i(e)&&t?1e3*t:null}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),n=l(e);return null==n?null:Math.max(0,Math.floor((n-t)/864e5))}function a(e){return null!=i(e)&&!e.short}function s(e){return a(e)?function(e){let t=i(e);if(null==t)return e;let n={...e,discount:null};for(let e of r)"number"==typeof n[e]&&(n[e]=n[e]*(1-t));return n}(e):e}},85767:(e,t,n)=>{n.d(t,{A:()=>ta});var r,i,o=n(37876),l=n(78397),c=n(74739),a=n(49794),s=n(74441),d=n(22430),p=n(59017),u=n(22474),x=n(46061),m=n(47737),h=n(99674),_=n(7339),g=n(2639),f=n(18107),j=n(60755),y=n(46347),A=n(86650),b=n(77321),w=n(55803),v=n(48078);let k={src:"/_next/static/media/header.971d2f7f.jpg"};var S=n(40762),F=n(89099),z=n(14232);function D(){return(D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let I=e=>z.createElement("svg",D({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=z.createElement("g",{clipPath:"url(#deployments_icon_svg_svgr__a)"},z.createElement("path",{d:"M7.162 11.174a2.925 2.925 0 0 1 0-1.352l-.826-.478.833-1.443.827.477a2.913 2.913 0 0 1 1.17-.676v-.955h1.667v.955a2.91 2.91 0 0 1 1.171.676l.827-.477.833 1.443-.826.478c.105.444.105.907 0 1.351l.826.478-.833 1.443-.827-.477a2.914 2.914 0 0 1-1.17.676v.954H9.166v-.954a2.914 2.914 0 0 1-1.171-.676l-.827.477-.833-1.443.826-.477Zm2.838.573a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm2.5-7.916H4.167v13.333h11.666v-10H12.5V3.831Zm-10-.84a.83.83 0 0 1 .833-.827h10L17.5 6.331v11.66a.832.832 0 0 1-.828.84H3.327a.833.833 0 0 1-.827-.827V2.991Z",fill:"#344054"}))),i||(i=z.createElement("defs",null,z.createElement("clipPath",{id:"deployments_icon_svg_svgr__a"},z.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))));var M=n(68469),W=n(22598),C=n(23299),E=n(75950),L=n(2953),B=n(69119),O=n(18575),R=n(51701),N=n(90863),U=n(22437),T=n(28093),q=n(73462),H=n(8214),V=n(25991),K=n(71867),P=n(20683),X=n(62362),$=n(36309),Z=n(1882),Q=n(30088),Y=n(1442),G=n(8616),J=n(98904),ee=n(82974),et=n(49948),en=n(66480),er=n(56027),ei=n(42252),eo=n(11235),el=n(79052),ec=n.n(el);let ea=e=>{let{info:t}=e,{t:n}=(0,b.Bd)();return(0,o.jsxs)(c.A,{separator:(0,o.jsx)(Y.A,{fontSize:"small",sx:{color:"white"}}),sx:{color:"white","& a":{color:"white",textDecoration:"none"},"& a:hover":{textDecoration:"underline",textDecorationColor:"white"}},children:[(0,o.jsx)(S.A,{href:"/",children:(0,o.jsx)(Q.A,{sx:{fontSize:18,marginBottom:"-3px"}})}),(0,o.jsx)(S.A,{href:"/models",children:(0,o.jsx)(a.A,{fontSize:14,children:n("header.models")})}),(0,o.jsx)(S.A,{href:"/models?type=".concat(t.reported_type),children:(0,o.jsx)(a.A,{fontSize:14,children:n("model.core.types.".concat(t.reported_type))})})]})},es=e=>{let{info:t,explicitVersion:n}=e,{t:r}=(0,b.Bd)(),{asPath:i}=(0,F.useRouter)(),l=i.split("#")[1],c=["/",t.model_name,...l?["#",l]:[]].join(""),s=n&&(0,o.jsxs)(a.A,{component:"span",fontSize:14,children:[" ",(0,o.jsx)(b.x6,{i18nKey:"model.core.selected_ver
1sion",values:{version:n.slice(0,6)}})," ",(0,o.jsx)(S.A,{href:c,sx:{color:"white",opacity:"50%"},children:r("model.core.use_latest")})]});return(0,o.jsxs)(a.A,{fontSize:14,fontWeight:300,lineHeight:1.5,color:"white",children:[t.description,s]})},ed=e=>({color:"white",bgcolor:"rgba(255, 255, 255, 0.16)",fontWeight:400,fontSize:12,px:1,py:.5,"&.MuiButtonBase-root:hover":{bgcolor:(0,s.X4)(e.palette.secondary.blue,.1)}}),ep=e=>({color:"white",bgcolor:"rgba(255, 255, 255, 0.16)",fontWeight:700,fontSize:14,px:1,py:.5,"&.MuiButtonBase-root:hover":{bgcolor:(0,s.X4)(e.palette.secondary.blue,.1)}}),eu=e=>{let{tooltip:t,children:n}=e;return t?(0,o.jsx)(d.A,{title:t,children:n}):(0,o.jsx)(o.Fragment,{children:n})},ex=e=>{let{icon:t,label:n,to:r,tooltip:i=null,strong:l=null}=e;return(0,o.jsx)(eu,{tooltip:i,children:r?(0,o.jsx)(p.A,{icon:t,label:n,component:"a",href:r,clickable:!0,sx:l?ep:ed}):(0,o.jsx)(p.A,{icon:t,label:n,sx:l?ep:ed})})},em=e=>{let{info:t}=e,{t:n}=(0,b.Bd)(),{query:r}=(0,F.useRouter)(),{data:i}=(0,ei.I)({queryKey:["deployments","running"],queryFn:()=>eo.Ay.get("/deploy/list/?status=running"),enabled:!t.public,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:e=>e.data.find(e=>e.model_name==t.model_name&&e.version==t.version)});return(0,o.jsxs)(u.A,{direction:"row",flexWrap:"wrap",gap:1,children:[t.is_custom_deployable&&(0,o.jsx)(ex,{icon:(0,o.jsx)(w.A,{color:"white",fontSize:"small"}),label:n("models.deploy_private"),tooltip:n("model.core.deploy_private_tooltip"),to:"/dash/deployments?new=custom-llm&base_model=".concat(encodeURIComponent(t.model_name))}),t.tags&&-1!=t.tags.indexOf("priority")&&(0,o.jsx)(ex,{icon:(0,o.jsx)(K.A,{color:"white",fontSize:"small"}),label:n("model.core.priority"),tooltip:n("model.core.priority_tooltip")}),t.tags&&-1!=t.tags.indexOf("flex")&&(0,o.jsx)(ex,{icon:(0,o.jsx)(P.A,{color:"white",fontSize:"small"}),label:n("model.core.flex"),tooltip:n("model.core.flex_tooltip")}),(0,o.jsx)(ex,{icon:t.public?(0,o.jsx)(E.A,{color:"white",fontSize:"small"}):(0,o.jsx)(C.A,{color:"white",fontSize:"small"}),label:n("model.core.".concat(t.public?"public":"private"))}),!t.is_partner&&(0,o.jsx)(ex,{icon:(0,o.jsx)(L.A,{color:"white",fontSize:"small"}),label:n("model.core.zero_retention"),tooltip:n("model.core.zero_retention_tooltip")}),(null==i?void 0:i.deploy_id)&&(0,o.jsx)(ex,{icon:(0,o.jsx)(I,{color:"white",fontSize:"small"}),label:n("model.core.deployment"),tooltip:n("model.core.deployment_tooltip"),to:"/dash/deployments/details?id=".concat(i.deploy_id)}),t.tags&&-1!=t.tags.indexOf("prompt-cache")&&(0,o.jsx)(ex,{icon:(0,o.jsx)(B.A,{color:"white",fontSize:"small"}),label:n("model.core.prompt_cache"),tooltip:n("model.core.prompt_cache_tooltip"),strong:!0}),t.quantization&&(0,o.jsx)(ex,{icon:(0,o.jsx)(q.A,{color:"white",fontSize:"small"}),label:t.quantization,tooltip:n("model.core.quantization")}),(null==t?void 0:t.mmlu)&&(0,o.jsx)(ex,{icon:(0,o.jsx)(H.A,{color:"white",fontSize:"small"}),label:"".concat(t.mmlu,"%"),tooltip:n("model.core.mmlu")}),t.max_tokens&&(0,o.jsx)(ex,{icon:(0,o.jsx)(R.A,{color:"white",fontSize:"small"}),label:t.max_tokens.toLocaleString(),tooltip:n("model.core.max_tokens")}),t.tags&&-1!=t.tags.indexOf("json")&&(0,o.jsx)(ex,{icon:(0,o.jsx)(N.A,{color:"white",fontSize:"small"}),label:n("model.core.json")}),t.tags&&-1!=t.tags.indexOf("tools")&&(0,o.jsx)(ex,{icon:(0,o.jsx)(U.A,{color:"white",fontSize:"small"}),label:n("model.core.function"),tooltip:n("model.core.function_tooltip")}),t.tags&&-1!=t.tags.indexOf("multimodal")&&(0,o.jsx)(ex,{icon:(0,o.jsx)(T.A,{color:"white",fontSize:"small"}),label:n("model.core.types.multimodal"),tooltip:n("model.core.multimodal_tooltip")}),t.meta&&t.meta.github_url&&(0,o.jsx)(ex,{icon:(0,o.jsx)(M.A,{color:"white",fontSize:"small"}),to:t.meta.github_url,label:n("model.core.project")}),t.meta&&t.meta.paper_url&&(0,o.jsx)(ex,{icon:(0,o.jsx)(W.A,{color:"white",fontSize:"small"}),to:t.meta.paper_url,label:n("model.core.paper")}),t.meta&&t.meta.license_url&&(0,o.jsx)(ex,{icon:(0,o.jsx)(ee.A,{color:"white",fontSize:"small"}),to:t.meta.license_url,label:n("model.core.license")}),t.mf_name&&t.mf_title&&(0,o.jsx)(ex,{icon:(0,o.jsx)(V.A,{color:"white",fontSize:"small"}),to:ec().join("/",t.mf_name),label:t.mf_title,component:S.w})]})},eh=e=>{let{info:t}=e;return!t.replaced_by||t.deprecated>=Date.now()/1e3?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(x.A,{sx:{mt:2},severity:"error",children:(0,o.jsx)(b.x6,{i18nKey:"model.core.replaced_warning",values:{replaced_by:t.replaced_by},components:{Link:(0,o.jsx)(S.w,{to:{pathname:ec().join("/",t.replaced_by)}})}})})},e_=e=>{let{info:t}=e,{i18n:n}=(0,b.Bd)();if(!t.deprecated||t.deprecated<=Date.now()/1e3&&t.replaced_by)return(0,o.jsx)(o.Fragment,{});let r=new Intl.DateTimeFormat(n.language,{year:"numeric",month:"2-digit",day:"numeric"});return(0,o.jsx)(x.A,{sx:{mt:2},severity:"warning",children:(0,o.jsx)(b.x6,{i18nKey:"model.core.deprecated_warning",values:{date:r.format(new Date(1e3*t.deprecated))}})})},eg=e=>{let{info:t}=e,{t:n,i18n:r}=(0,b.Bd)();if(!t.expected)return(0,o.jsx)(o.Fragment,{});let i=new Intl.DateTimeFormat(r.language,{year:"numeric",month:"2-digit",day:"numeric"}),l=new Date(1e3*t.expected);return(0,o.jsx)(x.A,{sx:{mt:2},severity:"info",children:n("model.core.expected_message",{expected:l>Date.now()?i.format(l):n("model.core.soon")})})},ef=e=>{let{info:t}=e;return(0,o.jsx)(v.A,{text:t.model_name,children:(0,o.jsx)(m.A,{variant:"contained",sx:{boxShadow:"0px 0.968292px 1.93658px rgba(16, 24, 40, 0.05), inset 0px 6px 4px rgba(255, 255, 255, 0.1), inset 0px -6px 4px rgba(0, 0, 0, 0.1)"},children:(0,o.jsx)(G.A,{fontSize:"small",sx:{color:"white"}})})})},ej=()=>{let{t:e}=(0,b.Bd)();return(0,o.jsx)(d.A,{title:e("model.core.partner_tooltip"),children:(0,o.jsx)(h.A,{component:"span",sx:{dis
1play:"inline-flex",alignItems:"center",mt:1,px:1,py:.25,borderRadius:999,color:"#FFA726",border:"1px solid #FFA726",bgcolor:(0,s.X4)("#FFA726",.1),fontSize:12,fontWeight:500,lineHeight:1.5,cursor:"default"},children:e("model.core.partner")})})},ey=e=>{let{info:t}=e,n=t.model_name.split("/"),r=n.length>1?n[0]:null,i=n.length>1?n[1]:n[0];return(0,o.jsxs)(h.A,{sx:{color:"white"},children:[r&&(0,o.jsxs)(u.A,{direction:"row",alignItems:"center",gap:1,mb:1,children:[(0,o.jsx)(J.A,{owner:r}),(0,o.jsxs)(a.A,{fontWeight:"600",fontSize:20,lineHeight:1.5,children:[r,"/"]})]}),(0,o.jsx)(a.A,{variant:"h1",fontWeight:600,fontSize:32,lineHeight:1.2,children:i}),t.is_partner&&(0,o.jsx)(ej,{})]})},eA=e=>{let{info:t}=e,{t:n}=(0,b.Bd)(),r=(0,en._K)(t.pricing),i=(0,en.wv)(t.pricing)?(0,en.N9)(t.pricing):null,l=null!=r.rate_per_input_token_cached,c=[null!=r.rate_per_service_tier_priority&&{key:"priority",label:n("model.core.pricing.tier_priority"),rate:r.rate_per_service_tier_priority,icon:(0,o.jsx)(K.A,{sx:{fontSize:16}}),docs:"https://docs.deepinfra.com/chat/overview#priority"},null!=r.rate_per_service_tier_flex&&{key:"flex",label:n("model.core.pricing.tier_flex"),rate:r.rate_per_service_tier_flex,icon:(0,o.jsx)(P.A,{sx:{fontSize:16}}),docs:"https://docs.deepinfra.com/chat/overview#flex"}].filter(Boolean);if(0===c.length)return null;let s={color:"white",borderColor:"rgba(255, 255, 255, 0.16)"},d={...s,fontWeight:700,color:"rgba(255, 255, 255, 0.7)",fontSize:12};return(0,o.jsxs)(h.A,{sx:{width:"100%",maxWidth:560,minWidth:0,border:"1px solid rgba(255, 255, 255, 0.16)",borderRadius:2,overflowX:"auto",bgcolor:"rgba(255, 255, 255, 0.04)"},children:[(0,o.jsxs)(_.A,{size:"small",sx:{minWidth:360,"& td, & th":{py:.75,px:1.5}},children:[(0,o.jsx)(g.A,{children:(0,o.jsxs)(f.A,{children:[(0,o.jsx)(j.A,{sx:d,children:n("model.core.pricing.tier")}),(0,o.jsx)(j.A,{align:"right",sx:d,children:n("model.core.pricing.col_input")}),(0,o.jsx)(j.A,{align:"right",sx:d,children:n("model.core.pricing.col_output")}),l&&(0,o.jsx)(j.A,{align:"right",sx:d,children:n("model.core.pricing.col_cached")})]})}),(0,o.jsx)(y.A,{children:c.map(e=>(0,o.jsxs)(f.A,{sx:{"&:last-child td":{border:0}},children:[(0,o.jsx)(j.A,{sx:{...s,fontWeight:600},children:(0,o.jsxs)(u.A,{direction:"row",alignItems:"center",gap:.5,children:[e.icon,e.label,(0,o.jsx)(h.A,{component:"span",sx:{fontWeight:400,opacity:.7},children:" (".concat(e.rate,"\xd7)")}),e.docs&&(0,o.jsxs)(h.A,{component:"a",href:e.docs,target:"_blank",rel:"noopener noreferrer",sx:{ml:.5,fontWeight:400,fontSize:12,color:"inherit",opacity:.7,textDecoration:"underline",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",gap:"2px"},children:[n("model.core.pricing.learn_more"),(0,o.jsx)($.A,{sx:{fontSize:12}})]})]})}),(0,o.jsx)(j.A,{align:"right",sx:s,children:(0,et.$g)(r.cents_per_input_token*e.rate)}),(0,o.jsx)(j.A,{align:"right",sx:s,children:(0,et.$g)(r.cents_per_output_token*e.rate)}),l&&(0,o.jsx)(j.A,{align:"right",sx:s,children:(0,et.$g)(r.cents_per_input_token*r.rate_per_input_token_cached*e.rate)})]},e.key))})]}),(0,o.jsxs)(a.A,{sx:{color:"rgba(255, 255, 255, 0.6)",fontSize:11,px:1.5,py:.5},children:[n("model.core.pricing.per_million"),null!=i&&" â ".concat(n("pricing.discount.table_note",{percent:i}))]})]})},eb=e=>{let{info:t}=e,{t:n}=(0,b.Bd)(),r=(0,en._K)(t.pricing);(0,en.wv)(t.pricing)&&(0,en.N9)(t.pricing);let i=r.rate_per_explicit_cache_write_token,l=r.explicit_cache_granularity_tokens,c=null!=r.rate_per_service_tier_priority||null!=r.rate_per_service_tier_flex;if(!i||0===Object.keys(i).length)return null;let s={color:"white",borderColor:"rgba(255, 255, 255, 0.16)"},d={...s,fontWeight:700,color:"rgba(255, 255, 255, 0.7)",fontSize:12},p={color:"rgba(255, 255, 255, 0.6)",fontSize:11,px:1.5,py:.5};return(0,o.jsxs)(h.A,{sx:{width:"100%",maxWidth:560,minWidth:0,border:"1px solid rgba(255, 255, 255, 0.16)",borderRadius:2,overflowX:"auto",bgcolor:"rgba(255, 255, 255, 0.04)"},children:[(0,o.jsxs)(_.A,{size:"small",sx:{minWidth:360,"& td, & th":{py:.75,px:1.5}},children:[(0,o.jsx)(g.A,{children:(0,o.jsxs)(f.A,{children:[(0,o.jsx)(j.A,{sx:d,children:(0,o.jsxs)(u.A,{direction:"row",alignItems:"center",gap:.5,children:[(0,o.jsx)(X.A,{sx:{fontSize:16}}),n("model.core.pricing.cache_retention"),(0,o.jsxs)(h.A,{component:"a",href:"https://docs.deepinfra.com/chat/prompt-cache-retention",target:"_blank",rel:"noopener noreferrer",sx:{ml:.5,fontWeight:400,color:"inherit",opacity:.7,textDecoration:"underline",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",gap:"2px","&:hover":{opacity:1}},children:[n("model.core.pricing.learn_more"),(0,o.jsx)($.A,{sx:{fontSize:12}})]})]})}),(0,o.jsx)(j.A,{align:"right",sx:d,children:n("model.core.pricing.col_cache_write")})]})}),(0,o.jsx)(y.A,{children:Object.entries(i).map(e=>{let[t,i]=e;return(0,o.jsxs)(f.A,{sx:{"&:last-child td":{border:0}},children:[(0,o.jsx)(j.A,{sx:{...s,fontWeight:600},children:(0,o.jsxs)(u.A,{direction:"row",alignItems:"center",gap:.5,children:[n("model.core.pricing.retain_for",{ttl:t}),(0,o.jsx)(h.A,{component:"span",sx:{fontWeight:400,opacity:.7},children:" (".concat(i,"\xd7)")})]})}),(0,o.jsx)(j.A,{align:"right",sx:s,children:(0,et.$g)(r.cents_per_input_token*i)})]},t)})})]}),(0,o.jsx)(a.A,{sx:p,children:n("model.core.pricing.per_million")}),null!=l&&(0,o.jsx)(a.A,{sx:p,children:n("model.core.pricing.cache_granularity_note",{tokens:l.toLocaleStr
1ing("en-US")})}),c&&(0,o.jsx)(a.A,{sx:p,children:n("model.core.pricing.cache_tier_note")})]})},ew=e=>{var t,n;let{info:r}=e,{t:i}=(0,b.Bd)();if(r.replaced_by&&r.deprecated<Date.now()/1e3)return(0,o.jsx)(o.Fragment,{});let l=null;r.pricing.usage_from_cost?l=i("model.core.pricing.price_size_details"):r.pricing.full&&(l=r.pricing.full);let c=(0,en.wv)(r.pricing),s=(0,o.jsxs)(u.A,{direction:"row",alignItems:"center",gap:1,flexWrap:"wrap",children:[(0,o.jsx)(O.A,{fontSize:"small",sx:{background:"#4C59D3",color:"white",borderRadius:"5px",p:"2px"}}),(0,o.jsx)(d.A,{title:l,children:(0,o.jsxs)(u.A,{direction:"row",alignItems:"baseline",gap:.5,flexWrap:"wrap",children:[(0,o.jsx)(et.d5,{pricing:(0,en._K)(r.pricing),type:r.type,primary:e=>(0,o.jsx)(a.A,{fontSize:{xs:16,md:24},fontWeight:600,color:"white",...e}),secondary:e=>(0,o.jsx)(a.A,{fontSize:{xs:12,md:16},fontWeight:600,color:"white",...e})}),l?"*":null]})}),c&&(0,o.jsx)(u.A,{direction:"row",alignItems:"baseline",gap:.5,flexWrap:"wrap",sx:{textDecoration:"line-through",textDecorationThickness:"1px",opacity:.55},children:(0,o.jsx)(et.d5,{pricing:r.pricing,type:r.type,primary:e=>(0,o.jsx)(a.A,{fontSize:{xs:13,md:18},fontWeight:500,color:"white",...e}),secondary:e=>(0,o.jsx)(a.A,{fontSize:{xs:11,md:14},fontWeight:500,color:"white",...e})})}),(0,o.jsx)(er.nd,{pricing:r.pricing,size:"large",onDark:!0})]}),p="tokens"===r.pricing.type&&!r.pricing.short&&((null==(t=r.tags)?void 0:t.includes("priority"))&&null!=r.pricing.rate_per_service_tier_priority||(null==(n=r.tags)?void 0:n.includes("flex"))&&null!=r.pricing.rate_per_service_tier_flex),x="tokens"===r.pricing.type&&!r.pricing.short&&null!=r.pricing.rate_per_explicit_cache_write_token;return p||x?(0,o.jsxs)(u.A,{direction:"column",gap:2,sx:{minWidth:0,width:"100%"},children:[s,p&&(0,o.jsx)(eA,{info:r}),x&&(0,o.jsx)(eb,{info:r})]}):s},ev=e=>{let{info:t,explicitVersion:n}=e;return t.deprecated&&(t.featured=!1),(0,o.jsx)(h.A,{sx:{mb:3,mt:{xs:12,md:16}},children:(0,o.jsx)(A.A,{sx:{maxWidth:{lg:"1420px"},px:0},children:(0,o.jsx)(h.A,{sx:{px:{xs:2,lg:8},pt:{xs:2,md:4.5},pb:{xs:1.5,md:4.5},borderRadius:3,bgcolor:"#05051a",background:"url(".concat(k.src,")"),backgroundSize:"cover",boxShadow:{xs:"0px 10px 54px -24px #5699DB99 inset",md:"0px 10px 54px -4px #5699DB99 inset"}},children:(0,o.jsxs)(u.A,{direction:{xs:"column",md:"row"},alignItems:"center",gap:{xs:4,md:8},children:[(0,o.jsxs)(u.A,{direction:"column",gap:4,sx:{minWidth:0,width:{xs:"100%",md:"auto"}},children:[(0,o.jsx)(ea,{info:t}),(0,o.jsx)(eh,{info:t}),(0,o.jsx)(e_,{info:t}),(0,o.jsx)(eg,{info:t}),(0,o.jsxs)(u.A,{direction:{xs:"column",md:"row"},justifyContent:"space-between",gap:1,alignItems:{xs:"flex-start",md:"flex-end"},children:[(0,o.jsx)(ey,{info:t}),(0,o.jsx)(ef,{info:t})]}),(0,o.jsx)(ew,{info:t}),(0,o.jsx)(es,{info:t,explicitVersion:n}),(0,o.jsx)(em,{info:t})]}),(0,o.jsx)(h.A,{sx:{position:"relative",flexShrink:0},children:(0,o.jsx)(Z.A,{base_url:t.meta.cover_img_url,name:t.model_name,sizes:"(min-width: 900px) 336px,(min-width: 600px) calc(100vw - 2 * 24px),calc(100vw - 2 * 16px)",rounded:!0,style:{border:"1px solid rgba(255, 255, 255, 0.16)"}})})]})})})})};var ek=n(15384),eS=n(92302),eF=n(14263),ez=n(64410),eD=n(54538),eI=n(7957),eM=n(37224),eW=n(88287),eC=n(85461);let eE=e=>{let{voice:t}=e;return(0,o.jsxs)(u.A,{children:[(0,o.jsxs)(a.A,{overflow:"hidden",textOverflow:"ellipsis",children:["Name: ",t.name]}),(0,o.jsxs)(a.A,{variant:"body2",color:"rgba(255, 255, 255, 0.7)",children:["Voice ID: ",t.voice_id]}),(0,o.jsxs)(a.A,{variant:"body2",color:"rgba(255, 255, 255, 0.7)",children:["Description: ",t.description]})]})},eL=e=>{let t=(0,eC.jE)(),n=["voices"],{isFetching:r,isError:i,data:o}=(0,ei.I)({queryKey:n,queryFn:async()=>(await eo.Ay.get("/v1/voices")).data,select:e=>e.voices?e.voices.map(e=>({voice_id:e.voice_id,name:e.name,description:e.description})):[],initialData:e||[],staleTime:e&&36e5});return[o,r,i,()=>t.invalidateQueries({queryKey:n})]},eB=()=>{let{t:e}=(0,b.Bd)(),[t,n]=(0,z.useState)(!1),[r,i,l,c]=eL();return!r&&i?(0,o.jsx)(eI.A,{}):l?(0,o.jsx)(x.A,{severity:"error",children:"Something went wrong while fetching voices"}
1):(0,o.jsxs)(eD.A,{sx:{background:"rgba(255, 255, 255, 0.1)",border:"1px solid #EBEEF24D",color:"white",borderRadius:"16px"},children:[(0,o.jsxs)(u.A,{direction:"row",spacing:2,sx:{p:3,cursor:"pointer",borderBottom:t?"1px solid #EBEEF24D":"none"},onClick:()=>n(!t),children:[(0,o.jsx)(a.A,{sx:{flexGrow:1},children:e("model.inference.voices")}),(0,o.jsx)(eW.A,{sx:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})]}),(0,o.jsx)(eM.A,{in:t,children:(0,o.jsxs)(u.A,{spacing:3,sx:{p:3,maxHeight:"480px",overflowY:"auto",scrollbarColor:"#23262d transparent"},children:[r.map(e=>(0,o.jsx)(u.A,{direction:"row",justifyContent:"space-between",gap:2,children:(0,o.jsx)(eE,{voice:e})},e.voice_id)),(0,o.jsxs)(u.A,{direction:"row",alignItems:"center",children:[(0,o.jsx)(m.A,{onClick:c,variant:"outlined",sx:{alignSelf:"flex-start",color:"white",borderColor:"white"},children:"Reload"}),i&&(0,o.jsx)(eI.A,{size:"1.5em",sx:{ml:2}})]})]})})]})};var eO=n(68284),eR=n(15526);let eN=()=>{let[e,t]=(0,z.useState)(""),[n,r]=(0,z.useState)(""),[i,l]=(0,z.useState)(null),[c,s]=(0,z.useState)(null),d=(0,eC.jE)(),p=(0,eR.n)({mutationFn:async e=>(await eo.Ay.post("/v1/voices/add",e,{headers:{"Content-Type":"multipart/form-data"}})).data,onSuccess:()=>{d.invalidateQueries({queryKey:["voices"]}),h()},onError:e=>{s("Something went wrong while adding the voice")}}),h=()=>{t(""),r(""),l(null),s(null)};return(0,o.jsxs)(u.A,{spacing:3,component:"form",onSubmit:t=>{if(t.preventDefault(),!e||!n||!i)return void s("All fields are required");s(null);let r=new FormData;r.append("name",e),r.append("description",n),r.append("files",i),p.mutate(r)},children:[(0,o.jsx)(a.A,{variant:"h6",children:"Add New Voice"}),(0,o.jsx)(eO.A,{label:"Name",value:e,onChange:e=>t(e.target.value),required:!0}),(0,o.jsx)(eO.A,{label:"Description",value:n,onChange:e=>r(e.target.value),required:!0}),(0,o.jsxs)(m.A,{variant:"contained",component:"label",children:["Upload Audio File",(0,o.jsx)("input",{type:"file",accept:"audio/*",hidden:!0,onChange:e=>{l(e.target.files[0])},required:!0})]}),i&&(0,o.jsx)(a.A,{children:i.name}),p.isLoading&&(0,o.jsx)(eI.A,{}),c&&(0,o.jsx)(x.A,{severity:"error",children:c}),(0,o.jsx)(m.A,{type:"submit",variant:"contained",disabled:p.isLoading,children:"Add Voice"})]})};var eU=n(5058);let eT=()=>(0,o.jsx)(eU.A,{children:(0,o.jsxs)(ez.Ay,{container:!0,spacing:2,children:[(0,o.jsx)(ez.Ay,{item:!0,xs:12,md:6,children:(0,o.jsx)(eD.A,{sx:{p:3,background:"rgba(255, 255, 255, 0.1)",border:"1px solid #EBEEF24D",color:"white",borderRadius:"16px","& .MuiOutlinedInput-root":{background:"#040320",color:"white",fontWeight:300},"& .MuiInputLabel-outlined":{color:"#EBEEF24D","&.Mui-focused":{color:"white"}},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"& .MuiFormHelperText-root":{color:"white",mt:1,mx:0}},children:(0,o.jsx)(eN,{})})}),(0,o.jsx)(ez.Ay,{item:!0,xs:12,md:6,children:(0,o.jsx)(eB,{})})]})});var eq=n(15529),eH=n(91858),eV=n(36253),eK=n(21459),eP=n(34353),eX=n(41037),e$=n(9580);let eZ=(0,eK.A)(eP.A)(e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-block",textDecoration:"none",fontFamily:t.typography.manrope.fontFamily,fontSize:"14px",fontWeight:"600",lineHeight:1.5,textTransform:"uppercase",padding:"".concat(t.spacing(1)," ").concat(t.spacing(3)),borderRadius:"16px 16px 0 0",margin:"0 ".concat(t.spacing(1)),border:"0px solid transparent",borderWidth:"1px 1px 0 1px",borderColor:"rgba(255, 255, 255, 0.4)",backgroundColor:"transparent",color:"white","&.first":{marginLeft:0},"&.last":{marginRight:0},["&.".concat(eX.A.disabled)]:{cursor:"default",color:"".concat(t.palette.grey[400])},["&.".concat(eX.A.selected)]:{color:"#fff",background:"#4C59D3",borderColor:"transparent",backdropFilter:"blur(24px)",boxShadow:"0px -6px 4px 0px #0000001A inset, 0px 6px 4px 0px #FFFFFF1A inset"},["&:not(.".concat(eX.A.selected,"):hover")]:{backgroundColor:"rgba(255, 255, 255, 0.2)",transition:"background-color 0.3s"},["&:not(.".concat(eX.A.selected,"):active")]:{boxShadow:"0 0 0 4px rgba(255, 255, 255, 0.4)"}}}),eQ=e=>{let{children:t,...n}=e;return(0,o.jsx)(eV.A,{...n,children:(0,o.jsx)(A.A,{sx:{mb:3,px:0,maxWidth:{lg:"1420px"}},children:t})})},eY=(0,eK.A)(eH.A)(e=>{let{theme:t}=e;return{display:"flex",overflowX:"auto",paddingTop:t.spacing(1),marginLeft:t.spacing(1),marginRight:t.spacing(1),[t.breakpoints.up("sm")]:{marginLeft:t.spacing(3),marginRight:t.spacing(3)},[t.breakpoints.up("md")]:{marginLeft:t.spacing(8),marginRight:t.spacing(8)}}}),eG=e=>{let{path:t,value:n,activeValue:r,name:i,disabled:l=!1,ntabs:c=0}=e,a=[...0===n?["first"]:[],...n+1===c?["last"]:[]].join(" ");return l||r==n?(0,o.jsx)(eZ,{disabled:!0,value:n,className:a,children:i}):(0,o.jsx)(eZ,{to:t,component:S.w,value:n,className:a,onClick:e=>{e.preventDefault()},children:i})},eJ=e=>{let{modelName:t,modelTags:n,activeValue:r,isOwner:i,explicitVersion:l}=e,c=e=>{let{nameKey:t}=e;return(0,o.jsxs)(b.x6,{children:["model.",t,".tab_name"]})},a=[{value:0,nameKey:"inference"},{value:1,nameKey:"docs"}];return i&&a.push({value:2,nameKey:"settings"}),n.includes("voice")&&a.push({value:3,nameKey:"voice"}
1),a.forEach(e=>{e.path=(0,e$.UL)(t,e.value,l)}),(0,o.jsx)(A.A,{sx:{maxWidth:{lg:"1420px"}},children:(0,o.jsx)(eY,{children:a.map(e=>(0,o.jsx)(eG,{...e,activeValue:r,name:c(e),ntabs:a.length},e.value))})})},e0=e=>{let{version:t}=e;return(0,o.jsx)(A.A,{sx:{mb:2,maxWidth:{lg:"1420px"}},children:(0,o.jsx)(x.A,{severity:"error",children:(0,o.jsx)(b.x6,{values:{version:t},children:"model.versions.wrong_version"})})})},e1=e=>{let{info:t,tabId:n,setTabId:r,explicitVersion:i,wrongVersion:l,refresh:c}=e,[a,s]=(0,z.useState)(n);(0,F.useRouter)(),(0,z.useEffect)(()=>{s(n)},[n]);let d=t.owner;return(0,o.jsxs)(eq.A,{value:a,onChange:(e,n)=>{history.pushState(null,"",(0,e$.UL)(t.model_name,n,i)),r(n)},children:[(0,o.jsx)(ev,{info:t,explicitVersion:i}),l&&(0,o.jsx)(e0,{version:l}),(0,o.jsx)(eJ,{modelName:t.model_name,modelTags:t.tags,activeValue:a,info:t,isOwner:d,explicitVersion:i}),(0,o.jsx)(eQ,{value:0,children:(0,o.jsx)(ek.A,{info:t})}),(0,o.jsx)(eQ,{value:1,children:(0,o.jsx)(eS.A,{info:t})}),d&&(0,o.jsx)(eQ,{value:2,children:(0,o.jsx)(eF.A,{info:t,explicitVersion:i,refresh:c})}),t.tags&&t.tags.includes("voice")&&(0,o.jsx)(eQ,{value:3,children:(0,o.jsx)(eT,{})})]})};var e5=n(92159),e2=n(46425),e4=n(87156),e6=n.n(e4),e3=n(63456),e7=n(72599),e8=n(69466),e9=n(1038);let te=new e7.E,tt=new Set(["dash","dashboard","docs","models","blog","auth","oauth","login","signup","api"]);async function tn(e,t){try{let n=(await eo.Ay.cancellable({url:"/models/".concat(e),params:t?{version:t}:{}},!0)).data;return await (0,e5.d)(n,{failSilently:!0}),te.setQueryData(t?["model",e,t]:["model",e],n),n}catch{return!1}}let tr=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.p,{noindex:!0,title:"Hold on"}),(0,o.jsx)(h.A,{height:"100vh",display:"flex",alignItems:"center",justifyContent:"center",children:(0,o.jsx)(eI.A,{})})]}),ti=e=>{let{loggedIn:t,model_name:n}=e,{t:r}=(0,e3.Bd)(),[i,c]=(0,z.useState)(!1);return n&&n.includes("/")&&!tt.has(n.split("/")[0])?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.p,{noindex:!0}),(0,o.jsxs)(h.A,{height:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,children:[(0,o.jsxs)(a.A,{variant:"h4",component:"h1",textAlign:"center",children:['Model "',n,'" not found']}),(0,o.jsx)(a.A,{variant:"body1",textAlign:"center",color:"text.secondary",children:"This model doesn't exist yet, but you can request it to be added."}),(0,o.jsx)(m.A,{variant:"contained",color:"primary",size:"large",onClick:()=>c(!0),children:"Request this model"})]}),(0,o.jsx)(e8.A,{isOpen:i,close:()=>c(!1),initialMessage:"I would like to request the model: ".concat(n)})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.p,{noindex:!0}),(0,o.jsx)(e6(),{statusCode:404,title:(0,o.jsxs)(e3.x6,{children:["pages.404.title_",t?"logged_in":"logged_out"]})})]})},to=e=>{let{info:t,tab:n,setTab:r,explicitVersion:i=null,wrongVersion:c=null,refresh:a}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.p,{noindex:"settings"===n,title:tl(t.model_name,n),description:tc(t.model_name,t.description,n),canonical:(0,e$.UL)(t.model_name,n),image_url:t.meta&&t.meta.cover_img_url||"/category_placeholder.svg"}),(0,o.jsx)(e1,{info:t,tabId:e$.xj.indexOf(n),setTabId:e=>{r(e$.xj[e])},refresh:a,explicitVersion:i,wrongVersion:c})]})},tl=(e,t)=>{if("meta-llama/Llama-2-70b-chat-hf"===e){let e={"":"Demo | LLaMa 2 70b | Text Generation Model | DeepInfra",api:"API | LLaMa 2 70b | Machine Learning Model | DeepInfra"};if(null!=e[t])return e[t]}let n=e.split("/"),r=1==n.length?n[0]:n[1];return r=r.replace(/-/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),"".concat(r," API - ").concat({"":"Demo",api:"Documentation",versions:"Versions",settings:"Settings",voice:"Voice"}[t]," - DeepInfra")},tc=(e,t,n)=>{if("meta-llama/Llama-2-70b-chat-hf"===e){let e={"":"LLaMa 2 is a collections of Large Language Models trained by Meta. This is the 70B chat optimized version. This endpoint has per token pricing. Learn more!",api:"LLaMa 2 is a collections of Large Language Models trained by Meta. Find full API reference for http, openai-http, and openai-python."};if(null!=e[n])return e[n]}return"".concat(t,". ").concat({"":"Try out API on the Web",api:"Full API Reference",versions:"Available model versions",settings:"Configure model metadata"}[n])};function ta(e){let{model_name:t,tab:n,static_info:r=null}=e,[i,l]=(0,z.useState)(n),{state:{profile:c,lastChecked:a}}=(0,e2.A)(),[s,d]=(0,z.useState)(null),[p,u]=(0,z.useState)(r),[x,m]=(0,z.useState)(null),_=(0,F.useRouter)(),g=(0,z.useRef)(null);(0,z.useEffect)(()=>
1{l(n)},[n,l]),(0,z.useEffect)(()=>{_.isReady&&d(_.query.version||!1)},[_.isReady,_.query.version,d]);let f=(0,z.useCallback)(async e=>{try{let n=(await eo.Ay.get("/models/list")).data.filter(e=>!e.private).map(e=>e.model_name),r=(0,e9.B)(t,n);if(r)return void _.replace((0,e$.UL)(r,e))}catch{}u(!1)},[t,_]),j=(0,z.useCallback)(async()=>{if(null==a)return;let e=await tn(t);if(!1===e)return void await f(i);u(e),s&&m(await tn(t,s))},[a,t,s,i,f]),y=null!=c;(0,z.useEffect)(()=>{if(!a)return;let e="".concat(t," ").concat(s||""," ").concat(y);g.current!==e&&(g.current=e,(null==p||s||y)&&j())},[a,y,p,s,t,j]);let A={tab:i,setTab:l,refresh:j},b=null;return b=x?(0,o.jsx)(to,{info:x,...A,explicitVersion:s}):p&&!1===x?(0,o.jsx)(to,{info:p,...A,wrongVersion:s}):p?(0,o.jsx)(to,{info:p,...A}):null==p&&null==x?(0,o.jsx)(tr,{}):(0,o.jsx)(ti,{loggedIn:null!=c,model_name:t}),(0,o.jsx)(h.A,{sx:{bgcolor:"#040320"},children:b})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.