Skip to main content

LocalGPTSettings

The main settings interface for Local GPT plugin configuration.
interface LocalGPTSettings {
  aiProviders: {
    main: string | null;
    embedding: string | null;
    vision: string | null;
  };
  defaults: {
    creativity: string;
    contextLimit?: string;
  };
  actions: LocalGPTAction[];
  _version: number;
}

Properties

aiProviders
object
required
AI provider configuration for different capabilities
aiProviders.main
string | null
ID of the main AI provider for text generation
aiProviders.embedding
string | null
ID of the embedding provider for RAG (Retrieval-Augmented Generation)
aiProviders.vision
string | null
ID of the vision provider for image processing
defaults
object
required
Default settings for action execution
defaults.creativity
string
required
Default creativity level: "" (none), "low", "medium", or "high"
defaults.contextLimit
string
Preset that controls the overall limit for context chunks in Enhanced Actions (RAG)Values:
  • "local" - 10,000 tokens
  • "cloud" - 32,000 tokens
  • "advanced" - 100,000 tokens
  • "max" - 3,000,000 tokens
actions
LocalGPTAction[]
required
Array of custom actions available in the plugin. See Actions for details.
_version
number
required
Settings schema version number for migration purposes

Default Settings

The plugin ships with these default settings:
src/defaultSettings.ts
export const DEFAULT_SETTINGS: LocalGPTSettings = {
  aiProviders: {
    main: null,
    embedding: null,
    vision: null,
  },
  defaults: {
    creativity: "low",
    contextLimit: "local",
  },
  actions: [
    {
      name: "🪄 General help",
      prompt: "",
      system: "You are an assistant helping a user write more content...",
    },
    {
      name: "✍️ Continue writing",
      prompt: "Act as a professional editor...",
      system: "You are an AI assistant that follows instruction extremely well...",
    },
    {
      name: "🍭 Summarize",
      prompt: "Make a concise summary of the key points...",
      system: "You are an AI assistant that follows instruction extremely well...",
    },
    {
      name: "📖 Fix spelling and grammar",
      prompt: "Proofread the below for spelling and grammar.",
      system: "You are an AI assistant that follows instruction extremely well...",
      replace: true,
    },
    {
      name: "✅ Find action items",
      prompt: "Act as an assistant helping find action items...",
      system: "You are an AI assistant that follows instruction extremely well...",
    },
    {
      name: "🧠 New System Prompt",
      prompt: "",
      system: "You are a highly skilled AI prompt engineer...",
    },
  ],
  _version: 8,
};

Creativity Levels

Creativity levels map to temperature values:
src/defaultSettings.ts
export const CREATIVITY: { [index: string]: any } = {
  "": {
    temperature: 0,
  },
  low: {
    temperature: 0.2,
  },
  medium: {
    temperature: 0.5,
  },
  high: {
    temperature: 1,
  },
};

Template Keywords

Special keywords used in prompts:
src/defaultSettings.ts
export const SELECTION_KEYWORD = "{{=SELECTION=}}";
export const CONTEXT_KEYWORD = "{{=CONTEXT=}}";
export const CONTEXT_CONDITION_START = "{{=CONTEXT_START=}}";
export const CONTEXT_CONDITION_END = "{{=CONTEXT_END=}}";
These keywords are automatically replaced during action execution with actual content from the editor selection and linked files.

Build docs developers (and LLMs) love