Merge pull request #372 from fjc0k/main

chatgpt-api
Travis Fischer 2023-02-20 19:44:47 -06:00 zatwierdzone przez GitHub
commit ae0e0d48df
1 zmienionych plików z 35 dodań i 31 usunięć

Wyświetl plik

@ -155,7 +155,9 @@ export class ChatGPTUnofficialProxyAPI {
console.log('POST', url, { body, headers }) console.log('POST', url, { body, headers })
} }
fetchSSE(url, { fetchSSE(
url,
{
method: 'POST', method: 'POST',
headers, headers,
body: JSON.stringify(body), body: JSON.stringify(body),
@ -195,7 +197,9 @@ export class ChatGPTUnofficialProxyAPI {
// console.warn('fetchSSE onMessage unexpected error', err) // console.warn('fetchSSE onMessage unexpected error', err)
} }
} }
}).catch((err) => { },
this._fetch
).catch((err) => {
const errMessageL = err.toString().toLowerCase() const errMessageL = err.toString().toLowerCase()
if ( if (