ModelRequest

class ModelRequest(val instructions: String, val schema: AirshipJsonSchema, val context: EvaluationContext, render: (EvaluationContext) -> String)(source)

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

The originating evaluation owns how context is labeled and laid out — a model only renders it via prompt and, if its input window is tight, trims. The framework builds one per evaluation and hands it to ModelAdapter.respond; the constructor is public only so an app can build one to unit-test its own EvaluationObserver.

Constructors

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

Properties

Link copied to clipboard

The prioritized context for this request.

Link copied to clipboard

The system instructions: the model's role and rules.

Link copied to clipboard

The contract the response must conform to.

Functions

Link copied to clipboard

Returns a copy without its least-important context item, plus the item dropped.

Link copied to clipboard
fun prompt(): String

Renders the full prompt for the current context.