fix: openAiBaseUrl为空的情况

This commit is contained in:
ikechan8370 2023-03-11 20:40:16 +08:00
parent b140a9955b
commit 4ae57ee075
2 changed files with 6 additions and 6 deletions

View file

@ -363,7 +363,7 @@ export async function isCN () {
try {
let response = await fetch('https://ipinfo.io/country')
let countryCode = (await response.text()).trim()
await redis.set('CHATGPT:COUNTRY_CODE', countryCode, { EX: 3600 * 24 * 7 })
await redis.set('CHATGPT:COUNTRY_CODE', countryCode, { EX: 3600 })
if (countryCode !== 'CN') {
return false
}