Errors
Errors are surfaced asLeapError values. The most common cases are:
LeapError.modelLoadingFailure: Problems reading or validating the model bundle.LeapError.generationFailure: Unexpected native inference errors.LeapError.promptExceedContextLengthFailure: Prompt length exceeded the configured context size.LeapError.serializationFailure: JSON encoding/decoding problems when working with chat history or function calls.
do / catch when using async streams, or use the onErrorCallback in the lower-level API.