mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-08 11:06:37 +08:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
945160a66f
@ -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
|
||||
```
|
||||
|
||||
### 本地开发
|
||||
|
@ -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}`;
|
||||
|
@ -13,11 +13,11 @@ declare global {
|
||||
OPENAI_ORG_ID?: string; // openai only
|
||||
|
||||
VERCEL?: "1" | undefined;
|
||||
BUILD_MODE?: "standalone" | "export";
|
||||
BUILD_APP?: string; // is building desktop app
|
||||
|
||||
HIDE_USER_API_KEY?: string; // disable user's api key input
|
||||
DISABLE_GPT4?: string; // allow user to use gpt-4 or not
|
||||
BUILD_MODE?: "standalone" | "export";
|
||||
BUILD_APP?: string; // is building desktop app
|
||||
ENABLE_BALANCE_QUERY?: string; // allow user to query balance or not
|
||||
DISABLE_FAST_LINK?: string; // disallow parse settings from url or not
|
||||
CUSTOM_MODELS?: string; // to control custom models
|
||||
|
@ -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";
|
||||
|
||||
|
@ -1,3 +1,12 @@
|
||||
export function deepClone<T>(obj: T) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
}
|
||||
|
||||
export function ensure<T extends object>(
|
||||
obj: T,
|
||||
keys: Array<[keyof T][number]>,
|
||||
) {
|
||||
return keys.every(
|
||||
(k) => obj[k] !== undefined && obj[k] !== null && obj[k] !== "",
|
||||
);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "ChatGPT Next Web",
|
||||
"version": "2.9.10"
|
||||
"version": "2.9.11"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
Loading…
Reference in New Issue
Block a user