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
AI provider configuration for different capabilitiesID of the main AI provider for text generation
ID of the embedding provider for RAG (Retrieval-Augmented Generation)
ID of the vision provider for image processing
Default settings for action executionDefault creativity level: "" (none), "low", "medium", or "high"
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
Array of custom actions available in the plugin. See Actions for details.
Settings schema version number for migration purposes
Default Settings
The plugin ships with these default settings:
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:
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:
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.