AiFailure

enum class AiFailure : Enum<AiFailure> (source)

Why an AI call (com.siddharth.kmp.llmchat.AiProvider.complete or on-device OnDeviceLlm.generate) didn't produce text. Lives in :result — a zero-dependency module both the cloud (:llm-chat) and on-device (:ai) seams already sit downstream of conceptually — so neither invents its own error type and callers handling both seams share one when.

Entries

Link copied to clipboard

No API key configured for this provider.

Link copied to clipboard

The key was rejected (401/403).

Link copied to clipboard

The provider is throttling (429).

Link copied to clipboard

The call didn't complete before its deadline.

Link copied to clipboard

Any other transport failure: connectivity, a non-2xx status, or an unparseable response.

Link copied to clipboard

On-device only: the model isn't downloaded/resident yet.

Link copied to clipboard

On-device only: this platform/backend can't run inference at all.

Link copied to clipboard

The call completed but the model returned no usable text.

Companion properties

Link copied to clipboard

Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.

Companion functions

Link copied to clipboard
fun valueOf(value: String): AiFailure

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int