Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

System Prompt

Controls system prompt used to configure AI behavior. The system prompt defines the AI's personality, role, and behavioral guidelines that influence how it responds to user messages.

gpt.systemPrompt()

Parameters

  • options: Optional configuration to scope the query to a specific VRM

Options

interface Options {
    vrm?: number; // VRM entity ID to get system prompt for specific character
}

Returns

A promise that resolves to the current system prompt as a string.

gpt.saveSystemPrompt()

Parameters

  • prompt: The system prompt text to set
  • options: Optional configuration to scope the setting to a specific VRM

Options

interface Options {
    vrm?: number; // VRM entity ID to set system prompt for specific character
}

Examples

Basic Usage

// Get the global system prompt
const globalPrompt = await gpt.systemPrompt();
console.log("Global system prompt:", globalPrompt);

// Get system prompt for a specific VRM character
const vrm = await Vrm.findByName("Assistant");
const vrmPrompt = await gpt.systemPrompt({vrm: vrm.entity});
console.log("VRM system prompt:", vrmPrompt);