BamlValidationError
The BamlValidationError
class represents an error that occurs when BAML fails to parse or validate LLM output.
Type Definition
Type Definition
Properties
type
Literal type identifier for the error class.
message
Error message describing the specific validation failure.
prompt
The original prompt sent to the LLM.
raw_output
The raw output from the LLM that failed validation.
Type Guards
The error can be identified using TypeScript’s instanceof
operator:
Type Check