Skip to content

Commit

Permalink
Update settings defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
taichimaeda committed Apr 21, 2024
1 parent 6ddffec commit 32a9f62
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ export class MarkpilotSettingTab extends PluginSettingTab {
});

new Setting(containerEl)
.setName('Few-shot prompts')
.setName('Few-shot prompts (Beta)')
.setDesc(
'Turn this on to enable few-shot prompts for inline completions.',
'Turn this on to enable few-shot prompts for inline completions. This is a beta feature and may not work as expected.',
)
.addToggle((toggle) =>
toggle
Expand Down
4 changes: 2 additions & 2 deletions src/settings/migrators/1.1.0-1.2.0.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const version1_1_0: MarkpilotSettings1_1_0 = {
enabled: true,
model: 'gpt-3.5-turbo',
maxTokens: 10,
temperature: 0.5,
temperature: 0.1,
history: {
messages: [],
response: '',
Expand Down Expand Up @@ -73,7 +73,7 @@ const version1_2_0: MarkpilotSettings1_2_0 = {
provider: 'openai',
model: 'gpt-3.5-turbo',
maxTokens: 10,
temperature: 0.5,
temperature: 1,
history: {
messages: [],
response: '',
Expand Down
4 changes: 4 additions & 0 deletions src/settings/migrators/1.1.0-1.2.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export const migrateVersion1_1_0_toVersion1_2_0: SettingsMigrator<
if (!(settings.chat.model in OPENAI_MODELS)) {
newSettings.chat.model = 'gpt-3.5-turbo';
}
// Update if default temperature is still selected.
if (settings.chat.temperature === 0.1) {
newSettings.chat.temperature = 1;
}
// Update if default accept key is still selected.
if (settings.completions.acceptKey === 'Enter') {
newSettings.completions.acceptKey = 'Tab';
Expand Down

0 comments on commit 32a9f62

Please sign in to comment.