diff --git a/src/components/ConfigMenu/ConfigMenu.tsx b/src/components/ConfigMenu/ConfigMenu.tsx index 52f5c396a..8d096e709 100644 --- a/src/components/ConfigMenu/ConfigMenu.tsx +++ b/src/components/ConfigMenu/ConfigMenu.tsx @@ -79,6 +79,16 @@ export const ModelSelector = ({ _setModel: React.Dispatch>; }) => { const [dropDown, setDropDown] = useState(false); + const [advancedModels, setAdvancedModels] = useState(false); + + const filterModelOptions = () => { + if (advancedModels) { + return modelOptions; + } else { + return modelOptions.slice(0,modelOptions.indexOf('gpt-4-32k')+1); + } + }; + const filteredModelOptions = filterModelOptions(); return (
@@ -101,9 +111,9 @@ export const ModelSelector = ({ className='text-sm text-gray-700 dark:text-gray-200 p-0 m-0' aria-labelledby='dropdownDefaultButton' > - {modelOptions.map((m) => ( + {filteredModelOptions.map((m,i) => (
  • modelOptions.indexOf('gpt-4-32k') ? "text-gray-600 dark:text-gray-400" : ""}`} onClick={() => { _setModel(m); setDropDown(false); @@ -112,7 +122,19 @@ export const ModelSelector = ({ > {m}
  • - ))} + ))} +
  • setAdvancedModels(!advancedModels)} + > + {advancedModels ? '▲' : '▼'} +
  • diff --git a/src/constants/chat.ts b/src/constants/chat.ts index 9676de0b3..e8e0db363 100644 --- a/src/constants/chat.ts +++ b/src/constants/chat.ts @@ -22,9 +22,9 @@ export const modelOptions: ModelOptions[] = [ 'gpt-3.5-turbo-16k', 'gpt-4', 'gpt-4-32k', - // 'gpt-3.5-turbo-0301', - // 'gpt-4-0314', - // 'gpt-4-32k-0314', + 'gpt-3.5-turbo-0301', + 'gpt-4-0314', + 'gpt-4-32k-0314', ]; export const defaultModel = 'gpt-3.5-turbo'; diff --git a/src/types/chat.ts b/src/types/chat.ts index 1b957e3d6..d5d22c8c4 100644 --- a/src/types/chat.ts +++ b/src/types/chat.ts @@ -49,10 +49,7 @@ export interface Folder { color?: string; } -export type ModelOptions = 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' ; -// | 'gpt-3.5-turbo-0301'; -// | 'gpt-4-0314' -// | 'gpt-4-32k-0314' +export type ModelOptions = 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301'| 'gpt-4-0314' | 'gpt-4-32k-0314'; export type TotalTokenUsed = { [model in ModelOptions]?: {