adding sydney in progress. only uses jailbreakConvoId and parentMsgId

This commit is contained in:
Daniel Avila 2023-03-08 21:06:58 -05:00
parent 69b3edc52c
commit 2c1ae68dc4
11 changed files with 53 additions and 41 deletions

View file

@ -46,8 +46,10 @@ export default function TextChat({ messages }) {
setMessages([...messages, currentMsg, { sender, text: data.text || data.response }])
);
const isBing = model === 'bingai' || model === 'sydney';
if (
model !== 'bingai' &&
!isBing &&
convo.conversationId === null &&
convo.parentMessageId === null
) {
@ -66,13 +68,15 @@ export default function TextChat({ messages }) {
})
);
} else if (
model === 'bingai' &&
isBing &&
convo.conversationId === null &&
convo.invocationId === null
) {
console.log('Bing data:', data)
const {
title,
jailbreakConversationId,
parentMessageId,
conversationSignature,
clientId,
conversationId,
@ -82,11 +86,11 @@ export default function TextChat({ messages }) {
setConversation({
title,
jailbreakConversationId,
parentMessageId: parentMessageId || null,
conversationSignature,
clientId,
conversationId,
invocationId,
parentMessageId: null
})
);
}
@ -94,24 +98,6 @@ export default function TextChat({ messages }) {
dispatch(setSubmitState(false));
};
// const convoHandler = (data) => {
// const { conversationId, id, invocationId } = data;
// const conversationData = {
// title: data.title,
// conversationId,
// parentMessageId:
// model !== 'bingai' && !convo.conversationId && !convo.parentMessageId ? id : null,
// conversationSignature:
// model === 'bingai' && !convo.conversationId ? data.conversationSignature : null,
// clientId: model === 'bingai' && !convo.conversationId ? data.clientId : null,
// // invocationId: model === 'bingai' && !convo.conversationId ? data.invocationId : null
// invocationId: invocationId ? invocationId : null
// };
// dispatch(setMessages([...messages, currentMsg, { sender: model, text: data.text || data.response }]));
// dispatch(setConversation(conversationData));
// dispatch(setSubmitState(false));
// };
const errorHandler = (event) => {
console.log('Error:', event);
const errorResponse = {