Variable
Every input and output to all Steps, including Flows, must be defined as a variable.
Each variable must have a unique id. This is used to reference it from across your application. If conflicting, you'll recieve a validation error.
The variable type
can be either a primitive or a type defined for specific domains.
Variable
Schema for a variable that can serve as input, output, or parameter within the DSL.
- id (
str
): Unique ID of the variable. Referenced in prompts or steps. - type (
VariableType | str
): Type of data expected or produced. Either a TypeDefinition or domain specific type.
PrimitiveTypeEnum
Represents the type of data a user or system input can accept within the DSL.
- audio: Represents the type of data a user or system input can accept within the DSL.
- boolean: Represents the type of data a user or system input can accept within the DSL.
- bytes: Represents the type of data a user or system input can accept within the DSL.
- date: Represents the type of data a user or system input can accept within the DSL.
- datetime: Represents the type of data a user or system input can accept within the DSL.
- file: Represents the type of data a user or system input can accept within the DSL.
- float: Represents the type of data a user or system input can accept within the DSL.
- image: Represents the type of data a user or system input can accept within the DSL.
- int: Represents the type of data a user or system input can accept within the DSL.
- name: The name of the Enum member.
- number: Represents the type of data a user or system input can accept within the DSL.
- text: Represents the type of data a user or system input can accept within the DSL.
- time: Represents the type of data a user or system input can accept within the DSL.
- value: The value of the Enum member.
- video: Represents the type of data a user or system input can accept within the DSL.
Domain Specific Types
Domain specific types are included for common use cases (chat bots, RAG, etc)
ChatMessage
A standard, built-in representation of a chat message.
- role (
MessageRole
): The role of the message sender (e.g., 'user', 'assistant'). - blocks (
list[ChatContent]
): The content blocks of the chat message, which can include text, images, or other media.
ChatContent
No documentation available.
- type (
PrimitiveTypeEnum
): The type of content, such as 'text', 'image', etc. - content (
Any
): The actual content, which can be a string, image data, etc.
Embedding
A standard, built-in representation of a vector embedding.
- vector (
list[float]
): The vector representation of the embedding. - source_text (
str | None
): The original text that was embedded. - metadata (
dict[str, str] | None
): Optional metadata associated with the embedding.