Merge pull request #44 from sijinhui/dev

Dev
This commit is contained in:
sijinhui 2024-04-09 16:58:16 +08:00 committed by GitHub
commit ad7bd11931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 44 additions and 3 deletions

View File

@ -47,3 +47,14 @@ ENABLE_BALANCE_QUERY=
# If you want to disable parse settings from url, set this value to 1. # If you want to disable parse settings from url, set this value to 1.
DISABLE_FAST_LINK= DISABLE_FAST_LINK=
# anthropic claude Api Key.(optional)
ANTHROPIC_API_KEY=
### anthropic claude Api version. (optional)
ANTHROPIC_API_VERSION=
### anthropic claude Api url (optional)
ANTHROPIC_URL=

View File

@ -200,6 +200,18 @@ Google Gemini Pro Api Key.
Google Gemini Pro Api Url. Google Gemini Pro Api Url.
### `ANTHROPIC_API_KEY` (optional)
anthropic claude Api Key.
### `ANTHROPIC_API_VERSION` (optional)
anthropic claude Api version.
### `ANTHROPIC_URL` (optional)
anthropic claude Api Url.
### `HIDE_USER_API_KEY` (optional) ### `HIDE_USER_API_KEY` (optional)
> Default: Empty > Default: Empty

View File

@ -114,6 +114,18 @@ Google Gemini Pro 密钥.
Google Gemini Pro Api Url. Google Gemini Pro Api Url.
### `ANTHROPIC_API_KEY` (optional)
anthropic claude Api Key.
### `ANTHROPIC_API_VERSION` (optional)
anthropic claude Api version.
### `ANTHROPIC_URL` (optional)
anthropic claude Api Url.
### `HIDE_USER_API_KEY` (可选) ### `HIDE_USER_API_KEY` (可选)
如果你不想让用户自行填入 API Key将此环境变量设置为 1 即可。 如果你不想让用户自行填入 API Key将此环境变量设置为 1 即可。

View File

@ -88,11 +88,17 @@ async function handle(
statusText: res.statusText, statusText: res.statusText,
}); });
} }
// console.log('[mj res]', await res.json())
return res; return NextResponse.json(await res.json(), {
status: res.status,
statusText: res.statusText,
});
} catch (e) {
console.log("[mj error]", e);
} finally { } finally {
clearTimeout(timeoutId); clearTimeout(timeoutId);
} }
return NextResponse.json({ error: "未知错误" }, { status: 400 });
} }
export const GET = handle; export const GET = handle;

View File

@ -122,7 +122,7 @@ You are ChatGPT, a large language model trained by {{ServiceProvider}}.
Knowledge cutoff: {{cutoff}} Knowledge cutoff: {{cutoff}}
Current model: {{model}} Current model: {{model}}
Current time: {{time}} Current time: {{time}}
Latex inline: \(x^2\) Latex inline: \\(x^2\\)
Latex block: $$e=mc^2$$ Latex block: $$e=mc^2$$
`; `;