diff --git a/guoba.support.js b/guoba.support.js index c6084eb..5510b57 100644 --- a/guoba.support.js +++ b/guoba.support.js @@ -317,7 +317,7 @@ export function supportGuoba () { component: 'InputNumber', componentProps: { min: 0, - max: 20 + max: 100 } }, { diff --git a/utils/SydneyAIClient.js b/utils/SydneyAIClient.js index f836c37..cf1f6bf 100644 --- a/utils/SydneyAIClient.js +++ b/utils/SydneyAIClient.js @@ -106,15 +106,17 @@ export default class SydneyAIClient { let accessible = !(await isCN()) || this.opts.proxy if (accessible && !Config.sydneyForceUseReverse) { // 本身能访问bing.com,那就不用反代啦,重置host + logger.info('change hosts to https://www.bing.com') this.opts.host = 'https://www.bing.com' } + logger.mark('使用host:' + this.opts.host) const response = await fetch(`${this.opts.host}/turing/conversation/create`, fetchOptions) let text = await response.text() try { return JSON.parse(text) } catch (err) { logger.error('创建sydney对话失败: status code: ' + response.status + response.statusText) - console.error(text) + logger.error(text) throw new Error(text) } } diff --git a/utils/common.js b/utils/common.js index bd7ac9b..178c3b7 100644 --- a/utils/common.js +++ b/utils/common.js @@ -364,9 +364,7 @@ export async function isCN () { let response = await fetch('https://ipinfo.io/country') let countryCode = (await response.text()).trim() await redis.set('CHATGPT:COUNTRY_CODE', countryCode, { EX: 3600 }) - if (countryCode !== 'CN') { - return false - } + return countryCode === 'CN' } catch (err) { console.warn(err) // 没拿到归属地默认CN