From cc4c44eb7f39a4fec789dee5fe1a2d72bd7eee53 Mon Sep 17 00:00:00 2001 From: Tetsu Soh Date: Sun, 4 Feb 2024 00:03:58 +0900 Subject: [PATCH 1/3] updated the model names and max token to reflect latest openai models --- src/dialogs/SettingDialog.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/dialogs/SettingDialog.tsx b/src/dialogs/SettingDialog.tsx index efe84b7f..03ee7f0c 100644 --- a/src/dialogs/SettingDialog.tsx +++ b/src/dialogs/SettingDialog.tsx @@ -34,7 +34,7 @@ import PlaylistAddCheckCircleIcon from '@mui/icons-material/PlaylistAddCheckCirc import LightbulbCircleIcon from '@mui/icons-material/LightbulbCircle' const { useEffect } = React -const models: string[] = ['gpt-3.5-turbo', 'gpt-3.5-turbo-0301', 'gpt-4', 'gpt-4-0314', 'gpt-4-32k', 'gpt-4-32k-0314'] +const models: string[] = ['gpt-3.5-turbo', 'gpt-3.5-turbo-0301', 'gpt-4', 'gpt-4-0314', 'gpt-4-32k', 'gpt-4-32k-0314', 'gpt-4-turbo-preview', 'gpt-4-0125-preview'] const languages: string[] = ['en', 'zh-Hans', 'zh-Hant', 'jp'] const languageMap: { [key: string]: string } = { en: 'English', @@ -53,14 +53,14 @@ export default function SettingDialog(props: Props) { const { t } = useTranslation() const [settingsEdit, setSettingsEdit] = React.useState(props.settings) const handleRepliesTokensSliderChange = (event: Event, newValue: number | number[], activeThumb: number) => { - if (newValue === 8192) { + if (newValue === 128000) { setSettingsEdit({ ...settingsEdit, maxTokens: 'inf' }) } else { setSettingsEdit({ ...settingsEdit, maxTokens: newValue.toString() }) } } const handleMaxContextSliderChange = (event: Event, newValue: number | number[], activeThumb: number) => { - if (newValue === 8192) { + if (newValue === 128000) { setSettingsEdit({ ...settingsEdit, maxContextSize: 'inf' }) } else { setSettingsEdit({ ...settingsEdit, maxContextSize: newValue.toString() }) @@ -80,7 +80,7 @@ export default function SettingDialog(props: Props) { } else { const numValue = Number(value) if (!isNaN(numValue) && numValue >= 0) { - if (numValue > 8192) { + if (numValue > 128000) { setSettingsEdit({ ...settingsEdit, maxTokens: 'inf' }) return } @@ -95,7 +95,7 @@ export default function SettingDialog(props: Props) { } else { const numValue = Number(value) if (!isNaN(numValue) && numValue >= 0) { - if (numValue > 8192) { + if (numValue > 128000) { setSettingsEdit({ ...settingsEdit, maxContextSize: 'inf' }) return } @@ -327,7 +327,7 @@ export default function SettingDialog(props: Props) { Date: Sun, 4 Feb 2024 00:12:05 +0900 Subject: [PATCH 2/3] update tauri-apps/cli version for M2 chip --- package-lock.json | 179 +++++++++++++++++++++++++++++++++++++++++----- package.json | 2 +- yarn.lock | 37 +++++----- 3 files changed, 181 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83a07c00..e7db8fc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "web-vitals": "^2.1.4" }, "devDependencies": { - "@tauri-apps/cli": "^1.2.3", + "@tauri-apps/cli": "^1.5.9", "@types/highlight.js": "^10.1.0", "@types/markdown-it": "^12.2.3", "@types/markdown-it-link-attributes": "^3.0.1", @@ -4045,11 +4045,10 @@ } }, "node_modules/@tauri-apps/cli": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.2.3.tgz", - "integrity": "sha512-erxtXuPhMEGJPBtnhPILD4AjuT81GZsraqpFvXAmEJZ2p8P6t7MVBifCL8LznRknznM3jn90D3M8RNBP3wcXTw==", + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.5.9.tgz", + "integrity": "sha512-knSt/9AvCTeyfC6wkyeouF9hBW/0Mzuw+5vBKEvzaGPQsfFJo1ZCp5FkdiZpGBBfnm09BhugasGRTGofzatfqQ==", "dev": true, - "license": "Apache-2.0 OR MIT", "bin": { "tauri": "tauri.js" }, @@ -4061,26 +4060,42 @@ "url": "https://opencollective.com/tauri" }, "optionalDependencies": { - "@tauri-apps/cli-darwin-arm64": "1.2.3", - "@tauri-apps/cli-darwin-x64": "1.2.3", - "@tauri-apps/cli-linux-arm-gnueabihf": "1.2.3", - "@tauri-apps/cli-linux-arm64-gnu": "1.2.3", - "@tauri-apps/cli-linux-arm64-musl": "1.2.3", - "@tauri-apps/cli-linux-x64-gnu": "1.2.3", - "@tauri-apps/cli-linux-x64-musl": "1.2.3", - "@tauri-apps/cli-win32-ia32-msvc": "1.2.3", - "@tauri-apps/cli-win32-x64-msvc": "1.2.3" + "@tauri-apps/cli-darwin-arm64": "1.5.9", + "@tauri-apps/cli-darwin-x64": "1.5.9", + "@tauri-apps/cli-linux-arm-gnueabihf": "1.5.9", + "@tauri-apps/cli-linux-arm64-gnu": "1.5.9", + "@tauri-apps/cli-linux-arm64-musl": "1.5.9", + "@tauri-apps/cli-linux-x64-gnu": "1.5.9", + "@tauri-apps/cli-linux-x64-musl": "1.5.9", + "@tauri-apps/cli-win32-arm64-msvc": "1.5.9", + "@tauri-apps/cli-win32-ia32-msvc": "1.5.9", + "@tauri-apps/cli-win32-x64-msvc": "1.5.9" + } + }, + "node_modules/@tauri-apps/cli-darwin-arm64": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.9.tgz", + "integrity": "sha512-7C2Jf8f0gzv778mLYb7Eszqqv1bm9Wzews81MRTqKrUIcC+eZEtDXLex+JaEkEzFEUrgIafdOvMBVEavF030IA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" } }, "node_modules/@tauri-apps/cli-darwin-x64": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.2.3.tgz", - "integrity": "sha512-jFZ/y6z8z6v4yliIbXKBXA7BJgtZVMsITmEXSuD6s5+eCOpDhQxbRkr6CA+FFfr+/r96rWSDSgDenDQuSvPAKw==", + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.5.9.tgz", + "integrity": "sha512-LHKytpkofPYgH8RShWvwDa3hD1ws131x7g7zNasJPfOiCWLqYVQFUuQVmjEUt8+dpHe/P/err5h4z+YZru2d0A==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" @@ -4089,6 +4104,134 @@ "node": ">= 10" } }, + "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.5.9.tgz", + "integrity": "sha512-teGK20IYKx+dVn8wFq/Lg57Q9ce7foq1KHSfyHi464LVt1T0V1rsmULSgZpQPPj/NYPF5BG78PcWYv64yH86jw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-gnu": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.5.9.tgz", + "integrity": "sha512-onJ/DW5Crw38qVx+wquY4uBbfCxVhzhdJmlCYqnYyXsZZmSiPUfSyhV58y+5TYB0q1hG8eYdB5x8VAwzByhGzw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-musl": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.9.tgz", + "integrity": "sha512-23AYoLD3acakLp9NtheKQDJl8F66eTOflxoPzdJNRy13hUSxb+W9qpz4rRA+CIzkjICFvO2i3UWjeV9QwDVpsQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-gnu": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.5.9.tgz", + "integrity": "sha512-9PQA1rE7gh41W2ylyKd5qOGOds55ymaYPml9KOpM0g+cxmCXa+8Wf9K5NKvACnJldJJ6cekWzIyB4eN6o5T+yQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-musl": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.9.tgz", + "integrity": "sha512-5hdbNFeDsrJ/pXZ4cSQV4bJwUXPPxXxN3/pAtNUqIph7q+vLcBXOXIMoS64iuyaluJC59lhEwlWZFz+EPv0Hqg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-arm64-msvc": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.5.9.tgz", + "integrity": "sha512-O18JufjSB3hSJYu5WWByONouGeX7DraLAtXLErsG1r/VS3zHd/zyuzycrVUaObNXk5bfGlIP0Ypt+RvZJILN2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-ia32-msvc": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.5.9.tgz", + "integrity": "sha512-FQxtxTZu0JVBihfd/lmpxo7jyMOesjWQehfyVUqtgMfm5+Pvvw0Y+ZioeDi1TZkFVrT3QDYy8R4LqDLSZVMQRA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-x64-msvc": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.5.9.tgz", + "integrity": "sha512-EeI1+L518cIBLKw0qUFwnLIySBeSmPQjPLIlNwSukHSro4tAQPHycEVGgKrdToiCWgaZJBA0e5aRSds0Du2TWg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@testing-library/dom": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.20.0.tgz", diff --git a/package.json b/package.json index eb132502..ec9891dd 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ }, "license": "GPL-3.0 license", "devDependencies": { - "@tauri-apps/cli": "^1.2.3", + "@tauri-apps/cli": "^1.5.9", "@types/highlight.js": "^10.1.0", "@types/markdown-it": "^12.2.3", "@types/markdown-it-link-attributes": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index c17dcc4e..f079ea70 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2009,25 +2009,26 @@ resolved "https://registry.npmjs.org/@tauri-apps/api/-/api-1.2.0.tgz" integrity sha512-lsI54KI6HGf7VImuf/T9pnoejfgkNoXveP14pVV7XarrQ46rOejIVJLFqHI9sRReJMGdh2YuCoI3cc/yCWCsrw== -"@tauri-apps/cli-darwin-x64@1.2.3": - version "1.2.3" - resolved "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.2.3.tgz" - integrity sha512-jFZ/y6z8z6v4yliIbXKBXA7BJgtZVMsITmEXSuD6s5+eCOpDhQxbRkr6CA+FFfr+/r96rWSDSgDenDQuSvPAKw== - -"@tauri-apps/cli@^1.2.3": - version "1.2.3" - resolved "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.2.3.tgz" - integrity sha512-erxtXuPhMEGJPBtnhPILD4AjuT81GZsraqpFvXAmEJZ2p8P6t7MVBifCL8LznRknznM3jn90D3M8RNBP3wcXTw== +"@tauri-apps/cli-darwin-arm64@1.5.9": + version "1.5.9" + resolved "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.9.tgz" + integrity sha512-7C2Jf8f0gzv778mLYb7Eszqqv1bm9Wzews81MRTqKrUIcC+eZEtDXLex+JaEkEzFEUrgIafdOvMBVEavF030IA== + +"@tauri-apps/cli@^1.5.9": + version "1.5.9" + resolved "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.5.9.tgz" + integrity sha512-knSt/9AvCTeyfC6wkyeouF9hBW/0Mzuw+5vBKEvzaGPQsfFJo1ZCp5FkdiZpGBBfnm09BhugasGRTGofzatfqQ== optionalDependencies: - "@tauri-apps/cli-darwin-arm64" "1.2.3" - "@tauri-apps/cli-darwin-x64" "1.2.3" - "@tauri-apps/cli-linux-arm-gnueabihf" "1.2.3" - "@tauri-apps/cli-linux-arm64-gnu" "1.2.3" - "@tauri-apps/cli-linux-arm64-musl" "1.2.3" - "@tauri-apps/cli-linux-x64-gnu" "1.2.3" - "@tauri-apps/cli-linux-x64-musl" "1.2.3" - "@tauri-apps/cli-win32-ia32-msvc" "1.2.3" - "@tauri-apps/cli-win32-x64-msvc" "1.2.3" + "@tauri-apps/cli-darwin-arm64" "1.5.9" + "@tauri-apps/cli-darwin-x64" "1.5.9" + "@tauri-apps/cli-linux-arm-gnueabihf" "1.5.9" + "@tauri-apps/cli-linux-arm64-gnu" "1.5.9" + "@tauri-apps/cli-linux-arm64-musl" "1.5.9" + "@tauri-apps/cli-linux-x64-gnu" "1.5.9" + "@tauri-apps/cli-linux-x64-musl" "1.5.9" + "@tauri-apps/cli-win32-arm64-msvc" "1.5.9" + "@tauri-apps/cli-win32-ia32-msvc" "1.5.9" + "@tauri-apps/cli-win32-x64-msvc" "1.5.9" "@testing-library/dom@^8.5.0", "@testing-library/dom@>=7.21.4": version "8.20.0" From 6eab0912c43c0f0d35787a293a7ed7a561f51506 Mon Sep 17 00:00:00 2001 From: Tetsu Soh Date: Sun, 4 Feb 2024 00:29:37 +0900 Subject: [PATCH 3/3] remove deprecated gpt models --- src/dialogs/SettingDialog.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dialogs/SettingDialog.tsx b/src/dialogs/SettingDialog.tsx index 03ee7f0c..0444fc70 100644 --- a/src/dialogs/SettingDialog.tsx +++ b/src/dialogs/SettingDialog.tsx @@ -34,7 +34,7 @@ import PlaylistAddCheckCircleIcon from '@mui/icons-material/PlaylistAddCheckCirc import LightbulbCircleIcon from '@mui/icons-material/LightbulbCircle' const { useEffect } = React -const models: string[] = ['gpt-3.5-turbo', 'gpt-3.5-turbo-0301', 'gpt-4', 'gpt-4-0314', 'gpt-4-32k', 'gpt-4-32k-0314', 'gpt-4-turbo-preview', 'gpt-4-0125-preview'] +const models: string[] = ['gpt-3.5-turbo', 'gpt-3.5-turbo-0301', 'gpt-4', 'gpt-4-turbo-preview', 'gpt-4-0125-preview'] const languages: string[] = ['en', 'zh-Hans', 'zh-Hant', 'jp'] const languageMap: { [key: string]: string } = { en: 'English', @@ -53,7 +53,7 @@ export default function SettingDialog(props: Props) { const { t } = useTranslation() const [settingsEdit, setSettingsEdit] = React.useState(props.settings) const handleRepliesTokensSliderChange = (event: Event, newValue: number | number[], activeThumb: number) => { - if (newValue === 128000) { + if (newValue === 8192) { setSettingsEdit({ ...settingsEdit, maxTokens: 'inf' }) } else { setSettingsEdit({ ...settingsEdit, maxTokens: newValue.toString() }) @@ -80,7 +80,7 @@ export default function SettingDialog(props: Props) { } else { const numValue = Number(value) if (!isNaN(numValue) && numValue >= 0) { - if (numValue > 128000) { + if (numValue > 8192) { setSettingsEdit({ ...settingsEdit, maxTokens: 'inf' }) return } @@ -361,16 +361,16 @@ export default function SettingDialog(props: Props) {