Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
08a2b0d
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Mar 27, 2024
f23554b
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Mar 28, 2024
07ed8e2
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Mar 29, 2024
a930f94
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 4, 2024
f36fda9
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 9, 2024
411a94a
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 10, 2024
077108e
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 11, 2024
f69400c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 12, 2024
0989f3e
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 13, 2024
1712667
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 15, 2024
2205f64
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 16, 2024
a3a7ccb
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 17, 2024
c730fd5
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Apr 26, 2024
4a1411f
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user May 1, 2024
e42b05d
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user May 7, 2024
c46ec46
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user May 8, 2024
cf4082a
Merge branch 'ChatGPTNextWeb:main' into main
Aloxaf May 13, 2024
2cec6f9
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user May 14, 2024
566b6de
Merge branch 'ChatGPTNextWeb:main' into main
Aloxaf May 14, 2024
8a9b006
Merge branch 'ChatGPTNextWeb:main' into main
Aloxaf May 15, 2024
f8d0dc4
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user May 17, 2024
ad00d59
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user May 21, 2024
4caec6c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user May 23, 2024
ab218e2
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user May 28, 2024
98d6516
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jun 8, 2024
178e298
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jun 25, 2024
3b8d28d
Create test
Aloxaf Jun 25, 2024
062cc15
Delete test
Aloxaf Jun 25, 2024
7da275b
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jun 27, 2024
4cbc7cd
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 2, 2024
f13c3c4
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 4, 2024
4f0bf06
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 5, 2024
79bfce2
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 6, 2024
f45bbab
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 7, 2024
00918b8
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 10, 2024
d1f4f41
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 11, 2024
a5ba28e
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 12, 2024
2a29846
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 13, 2024
44bb0fa
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 14, 2024
d24bfa7
Merge branch 'ChatGPTNextWeb:main' into main
Aloxaf Jul 15, 2024
6bf3f95
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 17, 2024
63756db
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 18, 2024
d696ada
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 19, 2024
f6a321d
Merge branch 'ChatGPTNextWeb:main' into main
Aloxaf Jul 20, 2024
9df1507
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 21, 2024
9add294
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 23, 2024
2b3f84d
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 26, 2024
0d8b756
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 27, 2024
0e4649d
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 30, 2024
b5cd3e5
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jul 31, 2024
59e3dad
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 2, 2024
3f6ab4f
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 3, 2024
a8f34bc
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 4, 2024
fe2b74b
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 6, 2024
a53a114
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 7, 2024
ba5dc3c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 8, 2024
5d49ef6
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 9, 2024
a7eeb71
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 14, 2024
a40f903
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 16, 2024
94cf7ac
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 17, 2024
4314e59
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 20, 2024
381664c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 21, 2024
d0091c1
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 22, 2024
8a80dee
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 25, 2024
87cd630
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 28, 2024
98fb03e
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Aug 30, 2024
e7ebb79
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 5, 2024
2936238
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 7, 2024
1da86dc
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 8, 2024
b489484
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 9, 2024
6a18501
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 10, 2024
11f52b9
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 13, 2024
568195b
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 14, 2024
332210d
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 15, 2024
53f1ba3
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 16, 2024
959201e
feat: add syntax highlighting for more languages
Aloxaf Sep 25, 2024
828fe4e
Merge branch 'ChatGPTNextWeb:main' into main
Aloxaf Sep 25, 2024
aac693a
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Sep 28, 2024
bba4a1a
Merge branch 'ChatGPTNextWeb:main' into main
Aloxaf Sep 29, 2024
e2f24f3
feat: 更多语法高亮
Aloxaf Nov 12, 2024
d73d25f
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Nov 13, 2024
9a3ddbd
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Nov 14, 2024
1b33c44
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Nov 16, 2024
6536758
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Nov 17, 2024
53b673c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Nov 23, 2024
859998f
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Nov 26, 2024
d455355
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Nov 29, 2024
e0d35a6
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 21, 2024
17db66c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 22, 2024
cc13157
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 23, 2024
e4cf41c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 24, 2024
a691494
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 29, 2024
6a0c5bb
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 30, 2024
78eae2c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 31, 2024
eddfa8b
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jan 1, 2025
1360ef7
Merge branch 'main' into feat/highlight_more_languages
Aloxaf Jan 9, 2025
88475c2
Merge branch 'main' into feat/highlight_more_languages
Aloxaf Jan 25, 2025
41b33a1
feat: custom provider
Aloxaf Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ export async function requestOpenai(req: NextRequest) {
[
ServiceProvider.OpenAI,
ServiceProvider.Azure,
// 自定义等级
"L1",
"L2",
"L3",
"L4",
jsonBody?.model as string, // support provider-unspecified model
],
)
Expand Down
7 changes: 5 additions & 2 deletions app/api/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ function getModels(remoteModelRes: OpenAIListModelResponse) {
if (config.disableGPT4) {
remoteModelRes.data = remoteModelRes.data.filter(
(m) =>
!(m.id.startsWith("gpt-4") || m.id.startsWith("chatgpt-4o") || m.id.startsWith("o1")) ||
m.id.startsWith("gpt-4o-mini"),
!(
m.id.startsWith("gpt-4") ||
m.id.startsWith("chatgpt-4o") ||
m.id.startsWith("o1")
) || m.id.startsWith("gpt-4o-mini"),
);
}

Expand Down
18 changes: 9 additions & 9 deletions app/api/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ export async function handle(
}),
);
// if dalle3 use openai api key
const baseUrl = req.headers.get("x-base-url");
if (baseUrl?.includes("api.openai.com")) {
if (!serverConfig.apiKey) {
return NextResponse.json(
{ error: "OpenAI API key not configured" },
{ status: 500 },
);
}
headers.set("Authorization", `Bearer ${serverConfig.apiKey}`);
const baseUrl = req.headers.get("x-base-url");
if (baseUrl?.includes("api.openai.com")) {
if (!serverConfig.apiKey) {
return NextResponse.json(
{ error: "OpenAI API key not configured" },
{ status: 500 },
);
}
headers.set("Authorization", `Bearer ${serverConfig.apiKey}`);
}

const controller = new AbortController();
const fetchOptions: RequestInit = {
Expand Down
1 change: 1 addition & 0 deletions app/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import RemarkGfm from "remark-gfm";
import RehypeHighlight from "rehype-highlight";
import { useRef, useState, RefObject, useEffect, useMemo } from "react";
import { copyToClipboard, useWindowSize } from "../utils";
import "lowlight/lib/all";
import mermaid from "mermaid";
import Locale from "../locales";
import LoadingIcon from "../icons/three-dots.svg";
Expand Down
4 changes: 1 addition & 3 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ export function getMessageImages(message: RequestMessage): string[] {

export function isVisionModel(model: string) {
const visionModels = useAccessStore.getState().visionModels;
const envVisionModels = visionModels
?.split(",")
.map((m) => m.trim());
const envVisionModels = visionModels?.split(",").map((m) => m.trim());
if (envVisionModels?.includes(model)) {
return true;
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"html-to-image": "^1.11.11",
"idb-keyval": "^6.2.1",
"lodash-es": "^4.17.21",
"lowlight": "^2.0.0",
"markdown-to-txt": "^2.0.1",
"mermaid": "^10.6.1",
"nanoid": "^5.0.3",
Expand Down