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

@ -10,7 +10,7 @@ const askBing = async ({ text, progressCallback, convo }) => {
// If the above doesn't work, provide all your cookies as a string instead
// cookies: '',
debug: false,
cache: new KeyvFile({ filename: './data/cache.json' })
cache: { store: new KeyvFile({ filename: './data/cache.json' }) }
});
let options = {

View file

@ -10,7 +10,7 @@ const askSydney = async ({ text, progressCallback, convo }) => {
// If the above doesn't work, provide all your cookies as a string instead
// cookies: '',
debug: false,
cache: new KeyvFile({ filename: './data/cache.json' })
cache: { store: new KeyvFile({ filename: './data/cache.json' }) }
});
let options = {
@ -18,10 +18,12 @@ const askSydney = async ({ text, progressCallback, convo }) => {
onProgress: async (partialRes) => await progressCallback(partialRes),
};
if (convo) {
options = { ...options, ...convo };
if (convo.parentMessageId) {
options = { ...options, jailbreakConversationId: convo.jailbreakConversationId, parentMessageId: convo.parentMessageId };
}
console.log('sydney options', options);
const res = await sydneyClient.sendMessage(text, options
);