ByAi

data class ByAi @JvmOverloads constructor(val config: AirshipEmbeddedSelection.ByAi.Config, val fallback: AirshipEmbeddedSelection.ByAi.Fallback = Fallback.Priority) : AirshipEmbeddedSelection(source)

Let the on-device model choose which pending instance to display.

The placeholder shows while the model decides. If the model is unavailable, has nothing to tell the candidates apart, or returns no usable answer, fallback decides instead — so an absent model never means an empty view.

Parameters

config

How the model should choose.

fallback

The selection to use when the model has no opinion.

Constructors

Link copied to clipboard

Types

Link copied to clipboard
data class Config @JvmOverloads constructor(val prompt: String, val strategy: AirshipEmbeddedSelection.ByAi.Strategy = Strategy.SCORE_THEN_PRIORITY, val minScoreThreshold: Int? = null, val allowDisplayInterruptions: Boolean = false, val subjectHints: Map<String, String> = emptyMap())

Configuration for ByAi.

Link copied to clipboard
sealed class Fallback

A non-AI selection used when ByAi has no answer.

Link copied to clipboard

How model scores and candidate priorities combine into a final ordering.

Properties