This commit is contained in:
GH Action - Upstream Sync 2023-11-11 02:27:12 +00:00
commit 5ad63ed957
5 changed files with 7 additions and 5 deletions

View File

@ -138,7 +138,7 @@ Azure Api 版本,你可以在这里找到:[Azure 文档](https://learn.micro
OPENAI_API_KEY=<your api key here>
# 中国大陆用户,可以使用本项目自带的代理进行开发,你也可以自由选择其他代理地址
BASE_URL=https://nb.nextweb.fun/api/proxy
BASE_URL=https://a.nextweb.fun/api/proxy
```
### 本地开发

View File

@ -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}`;

View File

@ -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";

View File

@ -6,5 +6,7 @@ export function ensure<T extends object>(
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] !== "",
);
}

View File

@ -9,7 +9,7 @@
},
"package": {
"productName": "ChatGPT Next Web",
"version": "2.9.10"
"version": "2.9.11"
},
"tauri": {
"allowlist": {