mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: openAiBaseUrl为空的情况
This commit is contained in:
parent
b140a9955b
commit
4ae57ee075
2 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue