Prompt part of the AI function options for model generation. It contains a system message, a simple text prompt, or a list of model messages. Uses ModelMessage format compatible with AI SDK v5 generateObject function.

interface ClassifyArgs {
    labels: [string, ...string[]];
    messages?: ModelMessage[];
    model: LanguageModel;
    prompt?: string;
    schemaDescription?: string;
    schemaName?: string;
    system?: string;
    telemetry?: { isEnabled?: boolean; tracer?: Tracer };
}

Hierarchy (View Summary)

Properties

labels: [string, ...string[]]

The labels to classify the example into. E.x. ["correct", "incorrect"]

messages?: ModelMessage[]

A list of model messages. You can either use prompt or messages but not both. Uses ModelMessage format for compatibility with AI SDK v5.

model: LanguageModel
prompt?: string

A simple text prompt. You can either use prompt or messages but not both.

schemaDescription?: string

The description of the schema for generating the label and explanation.

schemaName?: string

The name of the schema for generating the label and explanation.

system?: string

System message to include in the prompt. Can be used with prompt or messages.

telemetry?: { isEnabled?: boolean; tracer?: Tracer }

Type declaration

  • OptionalisEnabled?: boolean

    Whether OpenTelemetry is enabled on the call. Defaults to true for visibility into the evals calls.

    true
    
  • Optionaltracer?: Tracer

    The tracer to use for the call. If not provided, the traces will get picked up by the global tracer.