Skip to content

Commit

Permalink
remove deprecated gpt models
Browse files Browse the repository at this point in the history
  • Loading branch information
soh-tetsu committed Feb 3, 2024
1 parent b8f1912 commit db60d5f
Showing 1 changed file with 6 additions and 6 deletions.
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', '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',
Expand All @@ -53,7 +53,7 @@ export default function SettingDialog(props: Props) {
const { t } = useTranslation()
const [settingsEdit, setSettingsEdit] = React.useState<Settings>(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() })
Expand All @@ -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
}
Expand Down Expand Up @@ -361,16 +361,16 @@ export default function SettingDialog(props: Props) {
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0 auto' }}>
<Box sx={{ width: '92%' }}>
<Slider
value={settingsEdit.maxTokens === 'inf' ? 128000 : Number(settingsEdit.maxTokens)}
value={settingsEdit.maxTokens === 'inf' ? 8192 : Number(settingsEdit.maxTokens)}
defaultValue={
settingsEdit.maxTokens === 'inf' ? 128000 : Number(settingsEdit.maxTokens)
settingsEdit.maxTokens === 'inf' ? 8192 : Number(settingsEdit.maxTokens)
}
onChange={handleRepliesTokensSliderChange}
aria-labelledby="discrete-slider"
valueLabelDisplay="auto"
step={64}
min={64}
max={128000}
max={8192}
/>
</Box>
<TextField
Expand Down

0 comments on commit db60d5f

Please sign in to comment.