mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-06 18:48:50 +01:00
customGpts persist through localStorage
This commit is contained in:
parent
62bb6ea8f8
commit
9c3a78f96b
22 changed files with 405 additions and 220 deletions
|
|
@ -3,18 +3,22 @@ import { createSlice } from '@reduxjs/toolkit';
|
|||
const initialState = {
|
||||
models: [
|
||||
{
|
||||
_id: '0',
|
||||
name: 'ChatGPT',
|
||||
value: 'chatgpt'
|
||||
},
|
||||
{
|
||||
_id: '1',
|
||||
name: 'CustomGPT',
|
||||
value: 'chatgptCustom'
|
||||
},
|
||||
{
|
||||
_id: '2',
|
||||
name: 'BingAI',
|
||||
value: 'bingai'
|
||||
},
|
||||
{
|
||||
_id: '3',
|
||||
name: 'ChatGPT',
|
||||
value: 'chatgptBrowser'
|
||||
}
|
||||
|
|
@ -26,7 +30,8 @@ const currentSlice = createSlice({
|
|||
initialState,
|
||||
reducers: {
|
||||
setModels: (state, action) => {
|
||||
state.models = [...state.models, ...action.payload];
|
||||
console.log('setModels', action.payload);
|
||||
state.models = [...initialState.models, ...action.payload];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue