feat: complete frontend/backend tone handling

This commit is contained in:
Danny Avila 2023-03-24 16:21:10 -04:00
parent 83b88bd759
commit 89ab74a913
8 changed files with 105 additions and 88 deletions

View file

@ -23,7 +23,6 @@ export default function Conversation({
}) {
const [renaming, setRenaming] = useState(false);
const [titleInput, setTitleInput] = useState(title);
const { modelMap } = useSelector((state) => state.models);
const { stopStream } = useSelector((state) => state.submit);
const inputRef = useRef(null);
const dispatch = useDispatch();
@ -49,7 +48,8 @@ export default function Conversation({
conversationSignature,
jailbreakConversationId,
clientId,
invocationId
invocationId,
toneStyle,
} = bingData;
dispatch(
setConversation({
@ -59,6 +59,7 @@ export default function Conversation({
conversationSignature,
clientId,
invocationId,
toneStyle,
latestMessage: null
})
);
@ -71,6 +72,7 @@ export default function Conversation({
conversationSignature: null,
clientId: null,
invocationId: null,
toneStyle: null,
latestMessage: null
})
);
@ -85,13 +87,6 @@ export default function Conversation({
dispatch(setCustomModel(null));
}
// if (modelMap[chatGptLabel.toLowerCase()]) {
// console.log('custom model', chatGptLabel);
// dispatch(setCustomModel(chatGptLabel.toLowerCase()));
// } else {
// dispatch(setCustomModel(null));
// }
dispatch(setMessages(data));
dispatch(setCustomGpt(convo));
dispatch(setText(''));