mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-01 08:08:49 +01:00
37 lines
622 B
JavaScript
37 lines
622 B
JavaScript
|
|
import { createSlice } from '@reduxjs/toolkit';
|
||
|
|
|
||
|
|
const initialState = {
|
||
|
|
models: [
|
||
|
|
{
|
||
|
|
name: 'ChatGPT',
|
||
|
|
value: 'chatgpt'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'CustomGPT',
|
||
|
|
value: 'chatgptCustom'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'BingAI',
|
||
|
|
value: 'bingai'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'ChatGPT',
|
||
|
|
value: 'chatgptBrowser'
|
||
|
|
}
|
||
|
|
]
|
||
|
|
};
|
||
|
|
|
||
|
|
const currentSlice = createSlice({
|
||
|
|
name: 'models',
|
||
|
|
initialState,
|
||
|
|
reducers: {
|
||
|
|
setModels: (state, action) => {
|
||
|
|
state.models = [...state.models, ...action.payload];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
export const { setModels } = currentSlice.actions;
|
||
|
|
|
||
|
|
export default currentSlice.reducer;
|