Skip to content

Commit

Permalink
feat(settings): fix undefined model for custom OpenAI
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzCrazyKns committed Jul 25, 2024
1 parent 27f8cfd commit cbce39a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ui/components/SettingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,13 @@ const SettingsDialog = ({
value={selectedChatModelProvider ?? undefined}
onChange={(e) => {
setSelectedChatModelProvider(e.target.value);
setSelectedChatModel(
config.chatModelProviders[e.target.value][0],
);
if (e.target.value === 'custom_openai') {
setSelectedChatModel('');
} else {
setSelectedChatModel(
config.chatModelProviders[e.target.value][0],
);
}
}}
options={Object.keys(config.chatModelProviders).map(
(provider) => ({
Expand Down

0 comments on commit cbce39a

Please sign in to comment.