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 WithPrompt {
    messages?: ModelMessage[];
    prompt?: string;
    system?: string;
}

Hierarchy (View Summary)

Properties

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.

prompt?: string

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

system?: string

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