From f3db894d76c1a41f745ff8521159e7f2cd69c010 Mon Sep 17 00:00:00 2001 From: Logan Yang Date: Tue, 7 Nov 2023 19:51:25 -0800 Subject: [PATCH] v2.4.4: Add new GPT-4 TURBO model (#182) --- manifest.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/components/ChatComponents/ChatIcons.tsx | 1 + src/constants.ts | 4 ++++ src/settings.ts | 6 ++++-- versions.json | 3 ++- 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/manifest.json b/manifest.json index 3268b3ca..b9d8cd19 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "copilot", "name": "Copilot", - "version": "2.4.3", + "version": "2.4.4", "minAppVersion": "0.15.0", "description": "A ChatGPT Copilot in Obsidian.", "author": "Logan Yang", diff --git a/package-lock.json b/package-lock.json index 9adc1b7a..9b4a8113 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "obsidian-copilot", - "version": "2.4.3", + "version": "2.4.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "obsidian-copilot", - "version": "2.4.3", + "version": "2.4.4", "license": "AGPL-3.0", "dependencies": { "@huggingface/inference": "^1.8.0", diff --git a/package.json b/package.json index 525a935f..9de148ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-copilot", - "version": "2.4.3", + "version": "2.4.4", "description": "ChatGPT integration for Obsidian", "main": "main.js", "scripts": { diff --git a/src/components/ChatComponents/ChatIcons.tsx b/src/components/ChatComponents/ChatIcons.tsx index 690a5459..b7dc928f 100644 --- a/src/components/ChatComponents/ChatIcons.tsx +++ b/src/components/ChatComponents/ChatIcons.tsx @@ -106,6 +106,7 @@ const ChatIcons: React.FC = ({ + {/* diff --git a/src/constants.ts b/src/constants.ts index c3225568..2c1256de 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -9,6 +9,7 @@ export enum ChatModels { GPT_35_TURBO = 'gpt-3.5-turbo', GPT_35_TURBO_16K = 'gpt-3.5-turbo-16k', GPT_4 = 'gpt-4', + GPT_4_TURBO = 'gpt-4-1106-preview', GPT_4_32K = 'gpt-4-32k', CLAUDE_1 = 'claude-1', CLAUDE_1_100K = 'claude-1-100k', @@ -22,6 +23,7 @@ export enum ChatModelDisplayNames { GPT_35_TURBO = 'GPT-3.5', GPT_35_TURBO_16K = 'GPT-3.5 16K', GPT_4 = 'GPT-4', + GPT_4_TURBO = 'GPT-4 TURBO', GPT_4_32K = 'GPT-4 32K', CLAUDE_1 = 'CLAUDE-1', CLAUDE_1_100K = 'CLAUDE-1-100K', @@ -38,6 +40,7 @@ export const OPENAI_MODELS = new Set([ ChatModelDisplayNames.GPT_35_TURBO, ChatModelDisplayNames.GPT_35_TURBO_16K, ChatModelDisplayNames.GPT_4, + ChatModelDisplayNames.GPT_4_TURBO, ChatModelDisplayNames.GPT_4_32K, ChatModelDisplayNames.LOCAL_AI, ]); @@ -60,6 +63,7 @@ export const DISPLAY_NAME_TO_MODEL: Record = { [ChatModelDisplayNames.GPT_35_TURBO]: ChatModels.GPT_35_TURBO, [ChatModelDisplayNames.GPT_35_TURBO_16K]: ChatModels.GPT_35_TURBO_16K, [ChatModelDisplayNames.GPT_4]: ChatModels.GPT_4, + [ChatModelDisplayNames.GPT_4_TURBO]: ChatModels.GPT_4_TURBO, [ChatModelDisplayNames.GPT_4_32K]: ChatModels.GPT_4_32K, [ChatModelDisplayNames.CLAUDE_1]: ChatModels.CLAUDE_1, [ChatModelDisplayNames.CLAUDE_1_100K]: ChatModels.CLAUDE_1_100K, diff --git a/src/settings.ts b/src/settings.ts index 71fc47c8..6fd5257f 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -43,6 +43,7 @@ export class CopilotSettingTab extends PluginSettingTab { ChatModelDisplayNames.GPT_35_TURBO, ChatModelDisplayNames.GPT_35_TURBO_16K, ChatModelDisplayNames.GPT_4, + ChatModelDisplayNames.GPT_4_TURBO, ChatModelDisplayNames.GPT_4_32K, // ChatModelDisplayNames.CLAUDE_1, // ChatModelDisplayNames.CLAUDE_1_100K, @@ -52,6 +53,7 @@ export class CopilotSettingTab extends PluginSettingTab { ChatModelDisplayNames.AZURE_GPT_35_TURBO_16K, ChatModelDisplayNames.AZURE_GPT_4, ChatModelDisplayNames.AZURE_GPT_4_32K, + ChatModelDisplayNames.LOCAL_AI, ]; new Setting(containerEl) @@ -96,8 +98,8 @@ export class CopilotSettingTab extends PluginSettingTab { createFragment((frag) => { frag.appendText("You can find your API key at "); frag.createEl('a', { - text: "https://beta.openai.com/account/api-keys", - href: "https://beta.openai.com/account/api-keys" + text: "https://platform.openai.com/api-keys", + href: "https://platform.openai.com/api-keys" }); frag.createEl('br'); frag.appendText( diff --git a/versions.json b/versions.json index 0b6e542b..bcfe02fc 100644 --- a/versions.json +++ b/versions.json @@ -24,5 +24,6 @@ "2.4.0": "0.15.0", "2.4.1": "0.15.0", "2.4.2": "0.15.0", - "2.4.3": "0.15.0" + "2.4.3": "0.15.0", + "2.4.4": "0.15.0" } \ No newline at end of file