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

@ -21,9 +21,13 @@ export default function handleSubmit({
};
}
if (model === 'bingai' && convo.conversationId) {
const isBing = model === 'bingai' || model === 'sydney';
if (isBing && convo.conversationId) {
console.log('bing convo', convo);
payload = {
...payload,
jailbreakConversationId: convo.jailbreakConversationId,
conversationId: convo.conversationId,
conversationSignature: convo.conversationSignature,
clientId: convo.clientId,
@ -31,7 +35,10 @@ export default function handleSubmit({
};
}
const server = model === 'bingai' ? endpoint + '/bing' : endpoint;
let server = endpoint;
server = model === 'bingai' ? server + '/bing' : server;
server = model === 'sydney' ? server + '/sydney' : server;
const events = new SSE(server, {
payload: JSON.stringify(payload),
headers: { 'Content-Type': 'application/json' }