diff --git a/README_CN.md b/README_CN.md index c82dfc044..604771c52 100644 --- a/README_CN.md +++ b/README_CN.md @@ -138,7 +138,7 @@ Azure Api 版本,你可以在这里找到:[Azure 文档](https://learn.micro OPENAI_API_KEY= # 中国大陆用户,可以使用本项目自带的代理进行开发,你也可以自由选择其他代理地址 -BASE_URL=https://nb.nextweb.fun/api/proxy +BASE_URL=https://a.nextweb.fun/api/proxy ``` ### 本地开发 diff --git a/app/api/common.ts b/app/api/common.ts index fc877b02d..adec611b2 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -18,7 +18,7 @@ export async function requestOpenai(req: NextRequest) { ); let baseUrl = - serverConfig.azureUrl ?? serverConfig.baseUrl ?? OPENAI_BASE_URL; + serverConfig.azureUrl || serverConfig.baseUrl || OPENAI_BASE_URL; if (!baseUrl.startsWith("http")) { baseUrl = `https://${baseUrl}`; diff --git a/app/constant.ts b/app/constant.ts index fbc0c72e3..561899769 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -8,7 +8,7 @@ export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/c export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`; export const RUNTIME_CONFIG_DOM = "danger-runtime-config"; -export const DEFAULT_CORS_HOST = "https://ab.nextweb.fun"; +export const DEFAULT_CORS_HOST = "https://a.nextweb.fun"; export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`; export const OPENAI_BASE_URL = "https://api.openai.com"; diff --git a/app/utils/clone.ts b/app/utils/clone.ts index c42288f77..e4cd29111 100644 --- a/app/utils/clone.ts +++ b/app/utils/clone.ts @@ -6,5 +6,7 @@ export function ensure( obj: T, keys: Array<[keyof T][number]>, ) { - return keys.every((k) => obj[k] !== undefined && obj[k] !== null); + return keys.every( + (k) => obj[k] !== undefined && obj[k] !== null && obj[k] !== "", + ); } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 649e3816d..397ae0d83 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ }, "package": { "productName": "ChatGPT Next Web", - "version": "2.9.10" + "version": "2.9.11" }, "tauri": { "allowlist": {