Makelore 2.0 initial clean snapshot
This commit is contained in:
15
shared/model-capabilities.ts
Normal file
15
shared/model-capabilities.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { getImportedModelProfile } from './imported-model-profile';
|
||||
|
||||
export type ModelCapabilityKind = 'text' | 'multimodal';
|
||||
|
||||
export function isKnownImageInputModelId(modelId: string): boolean {
|
||||
return getImportedModelProfile(modelId)?.modalities.input.includes('image') ?? false;
|
||||
}
|
||||
|
||||
export function getKnownModelCapabilityKind(modelId: string): ModelCapabilityKind {
|
||||
return isKnownImageInputModelId(modelId) ? 'multimodal' : 'text';
|
||||
}
|
||||
|
||||
export function getModelCapabilityLabel(capability: ModelCapabilityKind): string {
|
||||
return capability === 'multimodal' ? '多模态' : '文本';
|
||||
}
|
||||
Reference in New Issue
Block a user