mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
fix: ensure custom params are not passed to non custom models
This commit is contained in:
parent
6e32f71565
commit
796d8031e8
10 changed files with 503 additions and 151 deletions
|
|
@ -46,7 +46,10 @@ export default function ModelMenu() {
|
|||
mutate();
|
||||
try {
|
||||
const lastSelected = JSON.parse(localStorage.getItem('model'));
|
||||
if (lastSelected && lastSelected !== 'chatgptCustom' && initial[lastSelected]) {
|
||||
|
||||
if (lastSelected === 'chatgptCustom') {
|
||||
return;
|
||||
} else if (initial[lastSelected]) {
|
||||
dispatch(setModel(lastSelected));
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
@ -72,6 +75,7 @@ export default function ModelMenu() {
|
|||
dispatch(setModel(value));
|
||||
dispatch(setDisabled(false));
|
||||
dispatch(setCustomModel(null));
|
||||
dispatch(setCustomGpt({ chatGptLabel: null, promptPrefix: null }));
|
||||
} else if (!initial[value]) {
|
||||
const chatGptLabel = modelMap[value]?.chatGptLabel;
|
||||
const promptPrefix = modelMap[value]?.promptPrefix;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue