merge commit

This commit is contained in:
Daniel Avila 2023-03-17 19:40:44 -04:00
commit 586c162404
25 changed files with 431 additions and 283 deletions

View file

@ -10,7 +10,7 @@ const clientOptions = {
proxy: process.env.PROXY || null,
};
const browserClient = async ({ text, onProgress, convo }) => {
const browserClient = async ({ text, onProgress, convo, abortController }) => {
const { ChatGPTBrowserClient } = await import('@waylaidwanderer/chatgpt-api');
const store = {
@ -18,7 +18,7 @@ const browserClient = async ({ text, onProgress, convo }) => {
};
const client = new ChatGPTBrowserClient(clientOptions, store);
let options = { onProgress };
let options = { onProgress, abortController };
if (!!convo.parentMessageId && !!convo.conversationId) {
options = { ...options, ...convo };