mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
complete customChatGpt model selection
This commit is contained in:
parent
0f9cfd0395
commit
214228542a
18 changed files with 742 additions and 63 deletions
|
|
@ -2,7 +2,10 @@ import { createSlice } from '@reduxjs/toolkit';
|
|||
|
||||
const initialState = {
|
||||
isSubmitting: false,
|
||||
model: 'bingai'
|
||||
disabled: false,
|
||||
model: 'chatgpt',
|
||||
promptPrefix: '',
|
||||
chatGptLabel: '',
|
||||
};
|
||||
|
||||
const currentSlice = createSlice({
|
||||
|
|
@ -12,12 +15,20 @@ const currentSlice = createSlice({
|
|||
setSubmitState: (state, action) => {
|
||||
state.isSubmitting = action.payload;
|
||||
},
|
||||
setDisabled: (state, action) => {
|
||||
state.disabled = action.payload;
|
||||
},
|
||||
setModel: (state, action) => {
|
||||
state.model = action.payload;
|
||||
},
|
||||
setCustomGpt: (state, action) => {
|
||||
console.log('setCustomGpt', action.payload);
|
||||
state.promptPrefix = action.payload.promptPrefix;
|
||||
state.chatGptLabel = action.payload.chatGptLabel;
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
export const { setSubmitState, setModel } = currentSlice.actions;
|
||||
export const { setSubmitState, setDisabled, setModel, setCustomGpt } = currentSlice.actions;
|
||||
|
||||
export default currentSlice.reducer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue