(values: string[])
| 217 | } |
| 218 | |
| 219 | function normalizeModalities(values: string[]): SupportedModality[] { |
| 220 | const normalized = values |
| 221 | .map((value) => modalityMap[value.toLowerCase()]) |
| 222 | .filter((value): value is SupportedModality => value !== undefined); |
| 223 | |
| 224 | return [...new Set(normalized)]; |
| 225 | } |
| 226 | |
| 227 | async function loadExistingModel(filePath: string): Promise<ExistingModel | null> { |
| 228 | try { |