🌳
pt0/gamesapp/serverF/libF/getShortModelNameF.mts
4export const telePromptModelsH = module1ToObj(telePromptModelsMod) as Record<string, string>
6const deriveShortName = (model: string): string => {
7 const afterSlash = model.split('/').pop() || model
8 return afterSlash
9 .replace(/-preview$/, '')
10 .replace(/^mn-/, '')
11 .replace(/-chat-/, '-')
12 .replace(/[-:]/g, ' ')
13 .replace(/(\d+)\.(\d+)/g, '$1$2')
14 .split(' ')
15 .map((w, i) => i === 0 ? w : w[0]!.toUpperCase() + w.slice(1))
16 .join('')
19export const getShortModelName = (model: string): string => {
20 if (model === 'test-placeholder') return 'test-ai'
21 return deriveShortName(model)