fix: ensure custom params are not passed to non custom models

This commit is contained in:
Daniel Avila 2023-03-14 20:21:41 -04:00
parent 6e32f71565
commit 796d8031e8
10 changed files with 503 additions and 151 deletions

View file

@ -6,8 +6,8 @@ const initialState = {
stopStream: false,
disabled: false,
model: 'chatgpt',
promptPrefix: '',
chatGptLabel: '',
promptPrefix: null,
chatGptLabel: null,
customModel: null,
};
@ -34,6 +34,7 @@ const currentSlice = createSlice({
state.model = action.payload;
},
setCustomGpt: (state, action) => {
console.log('setCustomGpt', action.payload);
state.promptPrefix = action.payload.promptPrefix;
state.chatGptLabel = action.payload.chatGptLabel;
},