Skip to main content

Interface: InstructionPrompt

A single text instruction prompt. It can contain an optional system message to define the role and behavior of the language model.

The instruction can be a text instruction or a multi-modal instruction.

Example

{
system: "You are a celebrated poet.", // optional
instruction: "Write a story about a robot learning to love",
}

Properties

instruction

instruction: InstructionContent

The instruction for the model.

Defined in

packages/modelfusion/src/model-function/generate-text/prompt-template/InstructionPrompt.ts:31


responsePrefix

Optional responsePrefix: string

Response prefix that will be injected in the prompt at the beginning of the response. This is useful for guiding the model by starting its response with a specific text.

Defined in

packages/modelfusion/src/model-function/generate-text/prompt-template/InstructionPrompt.ts:37


system

Optional system: string

Optional system message to provide context for the language model. Note that for some models, changing the system message can impact the results, because the model may be trained on the default system message.

Defined in

packages/modelfusion/src/model-function/generate-text/prompt-template/InstructionPrompt.ts:26