Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated the model names and max token to reflect latest openai models #1169

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 161 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions src/dialogs/SettingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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-turbo-preview', 'gpt-4-0125-preview']
const languages: string[] = ['en', 'zh-Hans', 'zh-Hant', 'jp']
const languageMap: { [key: string]: string } = {
en: 'English',
Expand All @@ -60,7 +60,7 @@ export default function SettingDialog(props: Props) {
}
}
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() })
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -327,20 +327,20 @@ export default function SettingDialog(props: Props) {
<Slider
value={
settingsEdit.maxContextSize === 'inf'
? 8192
? 128000
: Number(settingsEdit.maxContextSize)
}
onChange={handleMaxContextSliderChange}
aria-labelledby="discrete-slider"
valueLabelDisplay="auto"
defaultValue={
settingsEdit.maxContextSize === 'inf'
? 8192
? 128000
: Number(settingsEdit.maxContextSize)
}
step={64}
min={64}
max={8192}
max={128000}
/>
</Box>
<TextField
Expand Down
37 changes: 19 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down