feat(settings): fix `undefined` model for custom OpenAI
This commit is contained in:
parent
27f8cfd212
commit
cbce39a5dd
|
@ -225,9 +225,13 @@ const SettingsDialog = ({
|
||||||
value={selectedChatModelProvider ?? undefined}
|
value={selectedChatModelProvider ?? undefined}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setSelectedChatModelProvider(e.target.value);
|
setSelectedChatModelProvider(e.target.value);
|
||||||
setSelectedChatModel(
|
if (e.target.value === 'custom_openai') {
|
||||||
config.chatModelProviders[e.target.value][0],
|
setSelectedChatModel('');
|
||||||
);
|
} else {
|
||||||
|
setSelectedChatModel(
|
||||||
|
config.chatModelProviders[e.target.value][0],
|
||||||
|
);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
options={Object.keys(config.chatModelProviders).map(
|
options={Object.keys(config.chatModelProviders).map(
|
||||||
(provider) => ({
|
(provider) => ({
|
||||||
|
|
Loading…
Reference in New Issue