Variable: ModalityType
@providerprotocol/ai / @providerprotocol/ai / ModalityType
Variable: ModalityType
Section titled “Variable: ModalityType”
constModalityType:object
Defined in: src/types/errors.ts:83
Modality type constants.
Use these constants for type-safe modality handling:
Type Declaration
Section titled “Type Declaration”
readonlyAudio:"audio"='audio'
Audio processing/generation model
Embedding
Section titled “Embedding”
readonlyEmbedding:"embedding"='embedding'
Text/image embedding model
readonlyImage:"image"='image'
Image generation model
readonlyLLM:"llm"='llm'
Large language model for text generation
readonlyVideo:"video"='video'
Video processing/generation model
Example
Section titled “Example”import { ModalityType } from 'upp';
if (provider.modality === ModalityType.LLM) { // Handle LLM provider}