MCPcopy Create free account
hub / github.com/ChatGPTBox-dev/chatGPTBox / getModelNameGroup

Function getModelNameGroup

src/utils/model-name-convert.mjs:346–352  ·  view source on GitHub ↗
(modelName)

Source from the content-addressed store, hash-verified

344}
345
346export function getModelNameGroup(modelName) {
347 const presetPart = modelNameToPresetPart(modelName)
348 return (
349 Object.entries(ModelGroups).find(([k]) => presetPart === k) ||
350 Object.entries(ModelGroups).find(([, g]) => g.value.includes(presetPart))
351 )
352}
353
354export function getApiModeGroup(apiMode) {
355 return getModelNameGroup(apiModeToModelName(apiMode))

Callers 3

modelNameToApiModeFunction · 0.85
getApiModeGroupFunction · 0.85
isInApiModeGroupFunction · 0.85

Calls 1

modelNameToPresetPartFunction · 0.85

Tested by

no test coverage detected