fix: 调整对高版本HttpsProxyAgent支持的一个错误

This commit is contained in:
ikechan8370 2023-07-31 18:07:07 +08:00
parent 9c172e9e4b
commit 4ffc6c1a32

View file

@ -21,7 +21,9 @@ if (!globalThis.fetch) {
// workaround for ver 7.x and ver 5.x // workaround for ver 7.x and ver 5.x
let proxy = HttpsProxyAgent let proxy = HttpsProxyAgent
if (typeof proxy !== 'function') { if (typeof proxy !== 'function') {
proxy = HttpsProxyAgent.HttpsProxyAgent proxy = (p) => {
return new HttpsProxyAgent.HttpsProxyAgent(p)
}
} }
async function getKeyv () { async function getKeyv () {
@ -807,6 +809,7 @@ export default class SydneyAIClient {
return false return false
} }
} }
/** /**
* Iterate through messages, building an array based on the parentMessageId. * Iterate through messages, building an array based on the parentMessageId.
* Each message has an id and a parentMessageId. The parentMessageId is the id of the message that this message is a reply to. * Each message has an id and a parentMessageId. The parentMessageId is the id of the message that this message is a reply to.