fix: customGpt persistence blindspot, also remove free gpt

This commit is contained in:
Danny Avila 2023-03-07 14:22:33 -05:00
parent da55ac3774
commit da61a2841f
5 changed files with 46 additions and 21 deletions

View file

@ -16,15 +16,16 @@ const initialState = {
_id: '2',
name: 'BingAI',
value: 'bingai'
},
{
_id: '3',
name: 'ChatGPT',
value: 'chatgptBrowser'
}
// {
// _id: '3',
// name: 'ChatGPT',
// value: 'chatgptBrowser'
// }
],
modelMap: {},
initial: { chatgpt: true, chatgptCustom: true, bingai: true, chatgptBrowser: true }
// initial: { chatgpt: true, chatgptCustom: true, bingai: true, chatgptBrowser: true }
initial: { chatgpt: true, chatgptCustom: true, bingai: true, }
};
const currentSlice = createSlice({
@ -37,7 +38,7 @@ const currentSlice = createSlice({
state.models = models;
const modelMap = {};
models.slice(4).forEach((modelItem) => {
models.slice(initialState.models.length).forEach((modelItem) => {
modelMap[modelItem.value] = {
chatGptLabel: modelItem.chatGptLabel,
promptPrefix: modelItem.promptPrefix