Skip to content

Commit

Permalink
Update model comparison in Chat component to use GPT-4 Turbo instead …
Browse files Browse the repository at this point in the history
…of GPT-4 Vision
  • Loading branch information
Royal-lobster committed Apr 14, 2024
1 parent 92d53bd commit 8618f84
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
9 changes: 2 additions & 7 deletions src/components/Settings/Sections/ChatSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { validateApiKey } from '../../../lib/validApiKey'
import FieldWrapper from '../Elements/FieldWrapper'
import SectionHeading from '../Elements/SectionHeading'
import { type AvailableModels, Mode } from '../../../config/settings'
import { getReadableModelName } from '../../../lib/getReadableModelName'

const ChatSettings = () => {
const [settings, setSettings] = useSettings()
Expand Down Expand Up @@ -149,13 +150,7 @@ const ChatSettings = () => {
>
{availableModels.map(([model, value]) => (
<option key={model} value={value}>
{capitalizeText(
model
.toLowerCase()
.replace('gpt', 'GPT')
.replace('3_5', '3.5')
.replaceAll('_', ' '),
)}
{getReadableModelName(model)}
</option>
))}
</select>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Chat = ({ settings }: ChatProps) => {
clearMessages={clearMessages}
cancelRequest={cancelRequest}
isWebpageContextOn={settings.general.webpageContext}
isVisionModel={settings.chat.model === AvailableModels.GPT_4_VISION}
isVisionModel={settings.chat.model === AvailableModels.GPT_4_TURBO}
/>
</>
)
Expand Down
7 changes: 3 additions & 4 deletions src/config/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ export enum ThemeOptions {
}

export enum AvailableModels {
GPT_4_VISION = 'gpt-4-vision-preview',
GPT_4_TURBO = 'gpt-4-0125-preview',
GPT_4_TURBO = 'gpt-4-turbo',
GPT_4 = 'gpt-4',
GPT_3_5_TURBO = 'gpt-3.5-turbo-0125',
GPT_3_5_TURBO = 'gpt-3.5-turbo',
}

export enum Mode {
Expand Down Expand Up @@ -46,7 +45,7 @@ export const defaultSettings: Settings = {
},
chat: {
openAIKey: null,
model: AvailableModels.GPT_4_VISION,
model: AvailableModels.GPT_4_TURBO,
mode: Mode.BALANCED,
showLocalModels: false,
},
Expand Down

0 comments on commit 8618f84

Please sign in to comment.