chore: reorganize client files for docker

This commit is contained in:
Danny Avila 2023-03-06 10:47:06 -05:00
parent affbaaf1a5
commit f5e079742a
93 changed files with 178726 additions and 1 deletions

View file

@ -1,53 +0,0 @@
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'
}
],
modelMap: {},
initial: { chatgpt: true, chatgptCustom: true, bingai: true, chatgptBrowser: true }
};
const currentSlice = createSlice({
name: 'models',
initialState,
reducers: {
setModels: (state, action) => {
const models = [...initialState.models, ...action.payload];
state.models = models;
const modelMap = {};
models.slice(4).forEach((modelItem) => {
modelMap[modelItem.value] = {
chatGptLabel: modelItem.chatGptLabel,
promptPrefix: modelItem.promptPrefix
};
});
state.modelMap = modelMap;
}
}
});
export const { setModels } = currentSlice.actions;
export default currentSlice.reducer;