Skip to content

system

function system(input, options?): object

Creates a system message entry

Parameter Type Description

input

string

The system prompt

options?

Record<string, any>

Any additional options that will be directly passed to the model

object

a message entry

content: string;

The content of the message.

optional id: string;

An ID to identify the item. This is optional by default. If a model provider absolutely requires this field, it will be validated on the model level.

optional providerData: Record<string, any>;

Additional optional provider specific data. Used for custom functionality or model provider specific fields.

role: "system";

Representing a system message to the user

optional type: "message";

Any item without a type is treated as a message