Config

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())(source)

Configuration for ByAi.

Parameters

prompt

Instruction describing how to choose among the pending instances.

The model scores each candidate 1-10 against this, against what each candidate's layout says about itself (content_description), and against any user context an app's context provider supplies. A context provider is optional: a prompt that ranks on the content alone ("Prefer time-sensitive offers over evergreen content") works without one, while a prompt about the person ("Show content matching the user's interests") only differentiates if a provider is registered for com.urbanairship.ai.Usage.Companion.embeddedSelection.

strategy

How scores and candidate priorities combine into the final order.

minScoreThreshold

The score the winner must reach for the model's answer to be used at all; below it, fallback decides. Null accepts any score.

allowDisplayInterruptions

Whether a change in the pending set may re-run the model and swap the instance already on screen. When false — the default — a chosen instance keeps displaying as others come and go, until it is dismissed.

subjectHints

Hints carried on the subject handed to the context provider. Never rendered into the prompt.

Constructors

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

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard