mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 19:00:13 +01:00
complete customGpt
This commit is contained in:
parent
b4b0c123ba
commit
d64f914552
9 changed files with 49 additions and 43 deletions
|
|
@ -3,6 +3,7 @@ import RenameButton from './RenameButton';
|
|||
import DeleteButton from './DeleteButton';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { setConversation } from '~/store/convoSlice';
|
||||
import { setCustomGpt, setModel } from '~/store/submitSlice';
|
||||
import { setMessages } from '~/store/messageSlice';
|
||||
import { setText } from '~/store/textSlice';
|
||||
import manualSWR from '~/utils/fetchers';
|
||||
|
|
@ -15,7 +16,7 @@ export default function Conversation({
|
|||
title = 'New conversation',
|
||||
bingData,
|
||||
chatGptLabel = null,
|
||||
promptPrefix = null,
|
||||
promptPrefix = null
|
||||
}) {
|
||||
const [renaming, setRenaming] = useState(false);
|
||||
const [titleInput, setTitleInput] = useState(title);
|
||||
|
|
@ -54,7 +55,15 @@ export default function Conversation({
|
|||
);
|
||||
}
|
||||
const data = await trigger();
|
||||
|
||||
if (chatGptLabel) {
|
||||
dispatch(setModel('chatgptCustom'));
|
||||
} else {
|
||||
dispatch(setModel(data[1].sender));
|
||||
}
|
||||
|
||||
dispatch(setMessages(data));
|
||||
dispatch(setCustomGpt(convo));
|
||||
dispatch(setText(''));
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue