Contents

ModelSampleInput

The data a language model receives for evaluation.

Declaration

struct ModelSampleInput

Overview

@Generable
struct WeatherAnswer {
    let condition: String
}

let input = ModelSampleInput(
    prompt: Prompt("What's the weather like in Cupertino?"),
    instructions: Instructions("Respond with the weather condition only."),
    generationSchema: GenerationSchema(type: WeatherAnswer.self, properties: [])
)

synthesizes text representations for display, logging, and synthetic data.

Topics

Initializers

Instance Properties

See Also

Bundled input and output