From 64b6f35f55861deffec030ab5b0d723eb9d64ecd Mon Sep 17 00:00:00 2001 From: Simon Yang Date: Wed, 29 Mar 2023 11:32:21 +1100 Subject: [PATCH] Support any model in settings. --- src/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index bf98307..1fb51a2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -91,7 +91,7 @@ export default class AICommanderPlugin extends Plugin { }); const body = JSON.stringify({ - model: 'gpt-3.5-turbo', + model: this.settings.model, messages: messages, stream: true }); @@ -660,10 +660,10 @@ class ApiSettingTab extends PluginSettingTab { })); new Setting(containerEl) - .setName('Text Model') - .setDesc('Select the model to use for text generation') - .addDropdown(dropdown => dropdown - .addOption('gpt-3.5-turbo', 'gpt-3.5-turbo') + .setName('Model') + .setDesc('Select the model to use for content generation') + .addText(text => text + .setPlaceholder('gpt-3.5-turbo') .setValue(this.plugin.settings.model) .onChange(async (value) => { this.plugin.settings.model = value;