VariableModality
Astr enum defining the modality types for prompt variables.
Overview
VariableModality specifies what kind of content a PromptVariable represents. Each modality determines how the variable value is interpreted and rendered when injected into a prompt.
Import
Type Definition
VariableModality is a str enum with the following values:
Usage
Creating variables with different modalities
String comparison
BecauseVariableModality is a str enum, you can compare it directly with plain strings:
Branching on modality
JSON Representation
In JSON payloads, modality values are plain strings:Related
- PromptVariable — uses
VariableModalityto define variable types