Package-level declarations

Types

Link copied to clipboard
interface AirshipAi

Entry point for Airship's on-device AI features, reached via com.urbanairship.Airship.ai.

Link copied to clipboard

Supplies context for usages with no provider of their own, e.g. general profile data.

Link copied to clipboard
data class EvaluationContext @JvmOverloads constructor(val items: List<EvaluationContext.Item> = emptyList())

App-supplied context for a model evaluation, as an ordered list of prioritized items.

Link copied to clipboard

Supplies the context for an evaluation.

Link copied to clipboard
fun interface EvaluationObserver

Observes finished evaluations.

Link copied to clipboard
class EvaluationRecord(val usage: Usage<*>, val request: ModelRequest, val outcome: EvaluationRecord.Outcome, val duration: Duration, val attempts: Int)

A finished evaluation, handed to the observer set with AirshipAi.setEvaluationObserver.

Link copied to clipboard
interface ModelAdapter

The framework's interface to a model backend.

Link copied to clipboard
sealed class ModelAvailability

Whether a resolved model can be used right now.

Link copied to clipboard
class ModelRequest(val instructions: String, val schema: AirshipJsonSchema, val context: EvaluationContext, render: (EvaluationContext) -> String)

A single request handed to an ModelAdapter: instructions, output schema, and prioritized context.

Link copied to clipboard
fun interface ModelResolver

Routes a usage to a model backend.

Link copied to clipboard
sealed class ModelSelector

Selects which model backs an evaluation. Returned from an ModelResolver.

Link copied to clipboard
sealed class RetryDecision

What the evaluator does after a failed attempt.

Link copied to clipboard

Thrown when a model's response doesn't conform to the evaluation's schema.

Link copied to clipboard
class Usage<Subject> @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) constructor(val rawValue: String)

Identifies an AI use case — one key per evaluable feature.