PageSourceSearch

https://www.opengpt.com/assets/recommendation-engine-0M0f6aGK.js

js opengpt.com collected 2026-09-24 13:27:52 UTC 15,199 bytes, 1 lines download raw bytes

1import{D as e}from"./site-shell-5nIloOJz.js";import{i as t,n,r,t as i}from"./ai-database-BD_ouDPh.js";import{n as a,t as o}from"./public-beta-review-v2-hylh2z1T.js";var s=`cost-ranges-v1`,c=Object.freeze([`subscription`,`api-usage`,`infrastructure`,`hardware`,`implementation`,`maintenance`,`total-operating`]),l=Object.freeze([`single-user`,`catalog-entry-pricing`,`subscription-bundling-unknown`,`usd-before-tax`,`operating-total-excludes-one-time`]);Object.freeze([`taxes-and-regional-pricing`,`discounts-and-contracts`,`api-usage-volume`,`infrastructure-configuration`,`hardware-purchase`,`implementation-labor`,`maintenance-labor`,`electricity-and-network`]);var u=Object.freeze({free:0,under20:20,standard:100,enterprise:1/0}),d=/usage[- ]based|usage tiers?|api (?:usage|billed)|billed separately|pay[- ]as[- ]you[- ]go|paid credits?/i,f=/self[- ]host|hosting|hardware|local (?:app|use)|local server/i,p=/hardware|accelerator|gpu|local (?:app|use)|local server/i,m=Object.freeze([`subscription`,`api-usage`,`infrastructure`,`maintenance`]);function h(e){return[...new Set(e)]}function g(e,t,n,r,i,a=[]){return Object.freeze({id:e,range:Object.freeze({currency:`USD`,cadence:t,minimum:r,maximum:i}),status:n,includedInOperatingTotal:m.includes(e),sourceItemIds:Object.freeze(h(a))})}function _(e){let t=e.filter(e=>e.includedInOperatingTotal),n=t.reduce((e,t)=>e+t.range.minimum,0),r=t.some(e=>e.range.maximum===null)?null:t.reduce((e,t)=>e+t.range.maximum,0);return g(`total-operating`,`monthly`,r===null?`variable`:`known`,n,r,t.flatMap(e=>e.sourceItemIds))}function v(e,t){let n=t.map(t=>t.categories.find(t=>t.id===e)).filter(Boolean);if(!n.length||n.every(e=>e.status===`not-applicable`))return g(e,e===`hardware`||e===`implementation`?`one-time`:`monthly`,`not-applicable`,0,0);let r=e===`subscription`?Math.max(...n.map(e=>e.range.minimum)):n.reduce((e,t)=>e+t.range.minimum,0),i=n.some(e=>e.range.maximum===null)?null:n.reduce((e,t)=>e+t.range.maximum,0),a=n.some(e=>e.status===`not-estimated`)?`not-estimated`:i===null||n.some(e=>e.status===`variable`)?`variable`:`known`;return g(e,n[0].range.cadence,a,r,i,n.flatMap(e=>e.sourceItemIds))}function y(e,t){return t===`free`?e.free_available?e.entry_monthly:1/0:t===`under20`?e.paid_plan_monthly!==null&&e.paid_plan_monthly<u.under20?e.paid_plan_monthly:e.entry_monthly<u.under20?e.entry_monthly:1/0:e.paid_plan_monthly??e.entry_monthly}function b(e,t,n,r=y(t.pricing,n)){if(!Number.isFinite(r)||r<0)throw TypeError(`A cost estimate requires a finite, non-negative selected monthly catalog cost.`);let i=t.pricing.label??``,a=e===`model`&&t.deployment===`local`,o=a||t.pricing.tier===`open`||f.test(i),c=t.pricing.usage_variable===!0||d.test(i),u=![`free`,`under20`].includes(n)&&!o&&t.pricing.paid_plan_monthly===null&&t.pricing.tier!==`free`,m=a||p.test(i),v=[t.id],b=[g(`subscription`,`monthly`,u?`not-estimated`:`known`,r,u?null:r,v),c?g(`api-usage`,`monthly`,`variable`,0,null,v):g(`api-usage`,`monthly`,`not-applicable`,0,0),o?g(`infrastructure`,`monthly`,`variable`,0,null,v):g(`infrastructure`,`monthly`,`not-applicable`,0,0),m?g(`hardware`,`one-time`,`not-estimated`,0,null,v):g(`hardware`,`one-time`,`not-applicable`,0,0),g(`implementation`,`one-time`,`not-estimated`,0,null,v),g(`maintenance`,`monthly`,`not-estimated`,0,null,v)];b.push(_(b));let x=[`taxes-and-regional-pricing`,`discounts-and-contracts`,`implementation-labor`,`maintenance-labor`];return c&&x.push(`api-usage-volume`),o&&x.push(`infrastructure-configuration`),m&&x.push(`hardware-purchase`,`electricity-and-network`),Object.freeze({version:s,currency:`USD`,categories:Object.freeze(b),assumptionCodes:l,exclusionCodes:Object.freeze(h(x))})}function x(e){let t=e.map(e=>e.costEstimate??e).filter(Boolean),n=c.filter(e=>e!==`total-operating`).map(e=>v(e,t));return n.push(_(n)),Object.freeze({version:s,currency:`USD`,categories:Object.freeze(n),assumptionCodes:Object.freeze(h(t.flatMap(e=>e.assumptionCodes))),exclusionCodes:Object.freeze(h(t.flatMap(e=>e.exclusionCodes)))})}var S=`rules-v2`,C=`workflow-rules-v1`,w=Object.freeze({general:[`writing`,`analysis`,`research`],website:[`coding`,`documentation`],programming:[`coding`,`learning`],video:[`video`,`content`],business:[`business`,`research`,`automation`],automation:[`automation`,`coding`,`business`]}),T=new Set(Object.keys(w)),E=new Set([`Developer`,`Student`,`Creator`,`Business Owner`,`Researcher`]),D=new Set([`beginner`,`intermediate`,`advanced`]),O
1=new Set([`free`,`under20`,`standard`,`enterprise`]),k=new Set([`low`,`medium`,`high`]),A=new Set([`general`,`coding`,`documentation`,`learning`,`video`,`content`,`business`,`research`,`automation`,`writing`,`analysis`,`privacy`,`local`,`multilingual`]),j=Object.freeze([{pattern:/software|technology|developer|engineering|it\b/i,tasks:[`coding`,`automation`,`documentation`]},{pattern:/education|school|student|training|learning/i,tasks:[`learning`,`research`,`documentation`]},{pattern:/media|creative|design|video|marketing|content/i,tasks:[`video`,`content`,`writing`]},{pattern:/business|finance|sales|operations|professional services/i,tasks:[`business`,`analysis`,`automation`]},{pattern:/research|science|academic|health/i,tasks:[`research`,`analysis`,`documentation`]}]);function M(e,t,n){return typeof e==`string`&&t.has(e)?e:n}function N(e,t,n){return typeof e==`string`&&e.trim().replace(/\s+/g,` `).slice(0,n)||t}function P(e,{allowed:t,fallback:n=[],maxItems:r=8,maxLength:i=40}={}){if(!Array.isArray(e))return[...n];let a=e.filter(e=>typeof e==`string`).map(e=>e.trim().replace(/\s+/g,` `).slice(0,i)).filter(e=>
1e&&(!t||t.has(e))),o=[...new Set(a)].slice(0,r);return o.length?o:[...n]}function F(e){return[...w[e]??[e||`general`]]}function I(e={}){let t=M(e.goal,T,`general`),n=P(e.tasks,{allowed:A,maxItems:12}),r=n.length?n:F(t);return{goal:t,profession:M(e.profession,E,`Developer`),industry:N(e.industry,``,80),skill_level:M(e.skill_level,D,`intermediate`),tasks:r,budget:M(e.budget,O,`standard`),privacy_requirement:M(e.privacy_requirement,k,`medium`),preferred_languages:P(e.preferred_languages,{fallback:[`English`],maxItems:8}),preferred_platforms:P(e.preferred_platforms,{fallback:[`Web`],maxItems:8})}}function L(e){return e?[...new Set(j.filter(({pattern:t})=>t.test(e)).flatMap(({tasks:e})=>e))]:[]}function R(e,t){let n=t.preferred_languages.some(e=>e!==`English`),r=e.category.includes(`multilingual`)||e.best_for.includes(`multilingual`)||e.strengths.some(e=>e.includes(`multilingual`));return n?r?14:-3:e.best_for.includes(`writing`)||e.best_for.includes(`documentation`)?3:0}function z(e,t){let n=0;for(let r of t.preferred_platforms)r===`Web`&&e.deployment!==`local`&&(n+=3),r===`Desktop`&&e.deployment===`local`&&(n+=10),r===`Terminal`&&(e.best_for.includes(`coding`)||e.category.includes(`open-ecosystem`))&&(n+=8),r===`API`&&e.best_for.includes(`automation`)&&(n+=7),r===`Mobile`&&(e.category.includes(`multimodal`)||e.category.includes(`fast`))&&(n+=9);return n}function B(e,t){return t.skill_level===`beginner`?e.best_for.includes(`learning`)||e.best_for.includes(`documentation`)?10:e.deployment===`local`?-4:0:t.skill_level===`advanced`?e.best_for.includes(`coding`)||e.best_for.includes(`reasoning`)||e.category.includes(`open-ecosystem`)||e.deployment===`local`?7:0:e.category.includes(`frontier`)||e.deployment===`hybrid`?2:0}function V(e,t){let n=0,r=t.tasks.filter(t=>e.best_for.includes(t)||e.strengths.includes(t));n+=r.length*12,e.best_for.includes(t.goal)&&(n+=10);let i=y(e.pricing,t.budget);return n+=Number.isFinite(i)?12:-12,t.budget===`free`&&(n+=e.pricing.free_available?16:-8),t.profession===`Developer`&&e.best_for.includes(`coding`)&&(n+=8),t.profession===`Student`&&e.best_for.some(e=>[`learning`,`research`,`documentation`].includes(e))&&(n+=10),t.profession===`Researcher`&&e.best_for.includes(`research`)&&(n+=8),t.profession===`Creator`&&e.best_for.includes(`video`)&&(n+=8),t.profession===`Business Owner`&&e.best_for.includes(`business`)&&(n+=8),n+=L(t.industry).filter(t=>e.best_for.includes(t)||e.strengths.includes(t)).length*5,n+=R(e,t),n+=z(e,t),n+=B(e,t),{item:e,score:n,matches:r,selectedMonthlyCost:i}}function H(e,t){return t.privacy_requirement!==`high`&&Number.isFinite(y(e.pricing,t.budget))}function U(e,t,n){return t.privacy_requirement===`high`&&e.deployment===`local`?`private-local`:n.includes(`coding`)?`coding`:n.includes(`research`)?`research`:n.includes(`video`)||n.includes(`content`)?`creative`:n.includes(`automation`)||n.includes(`business`)?`business`:`balanced`}function W(e,t,n){let r=U(e,t,n);return r===`private-local`?`Keeps model execution under your control for privacy-sensitive work.`:r===`coding`?`Strong fit for software work, with ${e.strengths.slice(0,2).join(` and `)}.`:r===`research`?`Supports research with ${e.strengths.slice(0,2).join(` and `)}.`:r===`creative`?`Matches creative workflows through ${e.strengths.slice(0,2).join(` and `)}.`:r===`business`?`Balances business execution with ${e.strengths.slice(0,2).join(` and `)}.`:`A balanced primary model with ${e.strengths.slice(0,2).join(` and `)}.`}function G(e,t,n=new Set){return e.find(({item:e})=>!n.has(e.id)&&(e.best_for.includes(t)||e.strengths.includes(t)))}function K(e){return F(e.goal).find(t=>e.tasks.includes(t))??[`coding`,`research`,`video`,`content`,`business`,`automation`,`writing`,`analysis`,`general`].find(t=>e.tasks.includes(t))??`general`}function q(e,t){let n=t.tasks.filter(t=>e.use_cases.includes(t)).length*10;n+=Number.isFinite(y(e.pricing,t.budget))?8:-10,t.privacy_requirement===`high`&&(n+=e.privacy===`high`?12:e.privacy===`medium`?-4:-12),t.profession===`Student`&&e.use_cases.some(e=>[`learning`,`research`,`documentation`].includes(e))&&(n+=8),t.profession===`Developer`&&e.use_cases.includes(`coding`)&&(n+=6),t.profession===`Creator`&&e.use_cases.some(e=>[`video`,`content`].includes(e))&&(n+=6),t.profession===`Business Owner`&&e.use_cases.some(e=>[`business`,`automation`].includes(e))&&(n+=6),t.profession===`Researcher`&&e.use_cases.includes(`research`)&&(n+=6),t.skill_level===`beginner`&&e.use_cases.includes(`learning`)&&(n+=6),t.skill_level===`advanced`&&e.use_cases.some(e=>[`coding`,`automation`].includes(e))&&(n+=5),n+=L(t.industry).filter(t=>e.use_cases.includes(t)).length*4;let r=t.preferred_platforms.filter(t=>e.platforms.includes(t)).length;return n+=r?r*7:-3,n}function J(e,t){return t.privacy_requirement===`high`&&e.privacy!==`high`?!1:Number.isFinite(y(e.pricing,t.budget))}function Y(e){let t=new Set;return e.filter(e=>e&&!t.has(e.id)&&t.add(e.id))}function X(){return o(a)?new Set(a.approvedModelIds.filter(e)):new Set}function Z(e,t){return Array.isArray(e)?e.filter(e=>e&&typeof e==`object`&&(e.kind===`model`&&i.has(e.id)&&t.has(e.id)||e.kind===`tool`&&r.has(e.id))):[]}function Q(e,t,n){let r=I(e),i=Z(t,n),a=i.find(e=>e.kind===`model`)??null,o=i.find(e=>e.kind===`tool`)??i.find(e=>e.kind===`model`&&e.id!==a?.id)??null,s=[{id:`prepare`,order:1,actor:`human`,actionCode:`prepare-task`,itemId:null}];return a?(s.push({id:`core-model`,order:s.length+1,actor:`model`,actionCode:`run-core-model`,itemId:a.id}),o&&s.push({id:`specialist`,order:s.length+1,actor:o.kind,actionCode:o.kind===`tool`?`run-specialist-tool`:`run-specialist-model`,itemId:o.id})):s.push({id:`constraints`,order:s.length+1,actor:`human`,actionCode:`review-constraints`,itemId:null}),s.push({id:`validate`,order:s.length+1,actor:`human`,actionCode:`human-validation`,itemId:null}),Object.freeze({version:C,goal:r.goal,steps:Object.freeze(s.map(e=>Object.freeze(e)))})}function $(r,i){let a=I(r),o=n.filter(t=>e(t.id)&&i.has(t.id)).filter(e=>H(e,a)).map(e=>V(e,a)).sort((e,t)=>
1t.score-e.score||e.item.name.localeCompare(t.item.name)),s=new Set,c=[],l=[],u=(e,t)=>{let n=G(o,t,s);return n?(s.add(n.item.id),c.push({role:e,kind:`model`,id:n.item.id,name:n.item.name,provider:n.item.provider,reason:W(n.item,a,n.matches),reasonCode:U(n.item,a,n.matches),reasonContext:n.item.strengths.slice(0,2),pricingLabel:n.item.pricing.label,costEstimate:b(`model`,n.item,a.budget,n.selectedMonthlyCost)}),!0):!1};u(`Brain`,K(a))||l.push(`no-primary-fit`),a.tasks.includes(`coding`)&&!u(`Coding`,`coding`)&&l.push(`no-coding-model`),a.tasks.some(e=>[`research`,`learning`,`documentation`].includes(e))&&!u(`Research`,`research`)&&l.push(`no-research-model`);let d=[{role:`Coding Assistant`,category:`coding`,gapCode:`no-coding-tool`,when:a.tasks.includes(`coding`)},{role:`Automation`,category:`automation`,when:a.tasks.some(e=>[`automation`,`business`].includes(e))},{role:`Creation`,category:`creation`,gapCode:`no-creation-tool`,when:a.tasks.some(e=>[`video`,`content`].includes(e))},{role:`Knowledge`,category:`knowledge`,when:a.tasks.some(e=>[`research`,`documentation`,`learning`].includes(e))}];for(let e of d){if(!e.when)continue;let n=t.filter(t=>t.category===e.category).filter(e=>J(e,a)).map(e=>({item:e,score:q(e,a)})).sort((e,t)=>t.score-e.score||e.item.name.localeCompare(t.item.name))[0]?.item;if(!n){e.gapCode&&l.push(e.gapCode);continue}c.push({role:e.role,kind:`tool`,id:n.id,name:n.name,provider:n.provider,reason:`${n.use_cases.filter(e=>a.tasks.includes(e)).join(`, `)||n.category} workflow with ${n.integrations.slice(0,2).join(` and `)}.`,reasonCode:`workflow`,reasonContext:n.integrations.slice(0,2),pricingLabel:n.pricing.label,costEstimate:b(`tool`,n,a.budget)})}let f=Y(c),p=x(f),m=o.filter(({item:e})=>!s.has(e.id)).filter(({item:e,matches:t})=>t.length>0||e.best_for.includes(a.goal)).slice(0,3).map(({item:e,matches:t,selectedMonthlyCost:n})=>({id:e.id,name:e.name,provider:e.provider,reason:W(e,a,t),reasonCode:U(e,a,t),reasonContext:e.strengths.slice(0,2),pricingLabel:e.pricing.label,costEstimate:b(`model`,e,a.budget,n)})),h=[],g=[];a.privacy_requirement===`high`&&(h.push(`Local deployment improves control but requires hardware and maintenance.`),g.push(`local-maintenance`)),a.budget===`free`&&(h.push(`Free choices may have usage limits or require self-hosting.`),g.push(`free-limits`)),f.some(e=>{let t=e.costEstimate.categories.find(e=>e.id===`subscription`),n=e.costEstimate.categories.find(e=>e.id===`api-usage`),r=e.costEstimate.categories.find(e=>e.id===`infrastructure`);return(t?.range.minimum??0)>0||n?.status!==`not-applicable`||r?.status!==`not-applicable`})&&(h.push(`Pricing is a structured range; verify current regional, usage, infrastructure, and labor costs before purchase.`),g.push(`pricing-estimate`));let _=Q(a,f,i);return{profile:a,summary:`A ${a.privacy_requirement}-privacy stack for ${a.profession.toLowerCase()} work, optimized around ${a.tasks.slice(0,3).join(`, `)}.`,items:f,costEstimate:p,alternatives:m,tradeoffs:h,tradeoffCodes:g,gapCodes:[...new Set(l)],workflow:_,evidenceKind:`Assumption`,recommendationConfidence:`Insufficient evidence`,factsUsed:[],assumptions:[`Rule-based fit uses the selected task, budget, privacy, language, and platform constraints.`,`Catalog labels and listed prices do not prove performance on the user's real workload.`],unknowns:[`Quality, latency, reliability, and total cost on the user's real workload have not been measured yet.`],requiresRealWorkTest:!0,generatedBy:S}}function ee(e){return $(e,X())}export{F as a,C as i,ee as n,x as o,S as r,s,I as t};

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.