From e39391c176ddbc6321d0f8ac0066bfdf45ed7730 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Fri, 24 Mar 2023 15:53:08 +0800 Subject: [PATCH] fix: adjustment for sydney --- utils/SydneyAIClient.js | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/utils/SydneyAIClient.js b/utils/SydneyAIClient.js index 1181840..98c20a7 100644 --- a/utils/SydneyAIClient.js +++ b/utils/SydneyAIClient.js @@ -8,7 +8,7 @@ import crypto from 'crypto' import HttpsProxyAgent from 'https-proxy-agent' import { Config, pureSydneyInstruction } from './config.js' import { isCN } from './common.js' -import delay from "delay"; +import delay from 'delay' if (!globalThis.fetch) { globalThis.fetch = fetch @@ -113,9 +113,9 @@ export default class SydneyAIClient { logger.mark('使用host:' + this.opts.host) let response = await fetch(`${this.opts.host}/turing/conversation/create`, fetchOptions) let text = await response.text() - let retry = 6 + let retry = 10 while (retry >= 0 && response.status === 200 && !text) { - await delay(300) + await delay(500) response = await fetch(`${this.opts.host}/turing/conversation/create`, fetchOptions) text = await response.text() retry-- @@ -348,11 +348,20 @@ export default class SydneyAIClient { 'disable_emoji_spoken_text', 'responsible_ai_policy_235', 'enablemm', - toneOption, - 'dtappid', - 'cricinfo', - 'cricinfov2', - 'dv3sugg' + // 'h3precise', + 'clgalileo', + 'dlcodex3k', + 'dltokens18k', + 'enablesd', + 'bfprss', + 'cachewriteext', + 'deepleofreq', + 'e2ecachewrite', + 'saharafreq', + 'wlthrottle', + 'dl_edge_desc', + 'dv3sugg', + toneOption ], sliceIds: [ '222dtappid',