MCPcopy Create free account
hub / github.com/simstudioai/sim / buildModelFaqs

Function buildModelFaqs

apps/sim/app/(landing)/models/utils.ts:718–751  ·  view source on GitHub ↗
(provider: CatalogProvider, model: CatalogModel)

Source from the content-addressed store, hash-verified

716}
717
718export function buildModelFaqs(provider: CatalogProvider, model: CatalogModel): CatalogFaq[] {
719 const faqs: CatalogFaq[] = [
720 {
721 question: `What is ${model.displayName}?`,
722 answer: `${model.displayName} is a ${provider.name} model available in Sim. ${model.summary}`,
723 },
724 {
725 question: `How much does ${model.displayName} cost?`,
726 answer: `${model.displayName} is listed at ${formatPrice(model.pricing.input)}/1M input tokens${model.pricing.cachedInput !== undefined ? `, ${formatPrice(model.pricing.cachedInput)}/1M cached input tokens` : ''}, and ${formatPrice(model.pricing.output)}/1M output tokens.`,
727 },
728 {
729 question: `What is the context window for ${model.displayName}?`,
730 answer: model.contextWindow
731 ? `${model.displayName} supports a context window of ${formatTokenCount(model.contextWindow)} tokens in Sim. In an agent, this determines how much conversation history, tool outputs, and retrieved documents the model can hold in a single call.`
732 : `A public context window value is not currently tracked for ${model.displayName}.`,
733 },
734 {
735 question: `What capabilities does ${model.displayName} support?`,
736 answer:
737 model.capabilityTags.length > 0
738 ? `${model.displayName} supports the following capabilities in Sim: ${model.capabilityTags.join(', ')}.`
739 : `${model.displayName} supports standard text generation in Sim. No additional capability flags such as tool use or structured outputs are currently tracked for this model.`,
740 },
741 ]
742
743 if (model.bestFor) {
744 faqs.push({
745 question: `What is ${model.displayName} best used for?`,
746 answer: `${model.bestFor} When used in a Sim workflow, it can be selected in any Agent block from the model picker.`,
747 })
748 }
749
750 return faqs
751}
752
753export function buildModelCapabilityFacts(model: CatalogModel): CapabilityFact[] {
754 const { capabilities } = model

Callers 1

ModelPageFunction · 0.90

Calls 4

formatPriceFunction · 0.85
joinMethod · 0.80
formatTokenCountFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected