mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-23 17:26:47 +08:00
Compare commits
136 Commits
v2.16.1
...
b4105e0855
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4105e0855 | ||
|
|
c3b8c1587c | ||
|
|
12ec11ed8a | ||
|
|
058594ec96 | ||
|
|
995bef73de | ||
|
|
38ac502d80 | ||
|
|
0511808900 | ||
|
|
42eff644b4 | ||
|
|
8ae6883784 | ||
|
|
c0f2ab6de3 | ||
|
|
31ad14f385 | ||
|
|
3abef47781 | ||
|
|
3f2cddda3a | ||
|
|
2b2bae5284 | ||
|
|
7b1c2725fe | ||
|
|
480e67e4e8 | ||
|
|
8da4fed98d | ||
|
|
a1fadc6f4a | ||
|
|
10fec2fed6 | ||
|
|
5f0f216973 | ||
|
|
97987481d9 | ||
|
|
e0904aa041 | ||
|
|
7d479ff38a | ||
|
|
3c03d7da74 | ||
|
|
34cdd41488 | ||
|
|
a26ec428c0 | ||
|
|
16cd4ddad8 | ||
|
|
bdabce9dd8 | ||
|
|
ce6cbc3ab5 | ||
|
|
85ac28a463 | ||
|
|
a13d910df5 | ||
|
|
3fd2fbfaf3 | ||
|
|
801a273888 | ||
|
|
fc0fb16eff | ||
|
|
f137a6565b | ||
|
|
b4af8a10bb | ||
|
|
3731c35ab8 | ||
|
|
faf7498471 | ||
|
|
7a261451a4 | ||
|
|
10568e6fe1 | ||
|
|
686f8a2ae9 | ||
|
|
e36a2b88fa | ||
|
|
8f1ba300bd | ||
|
|
ea8915a262 | ||
|
|
c493dbcdb5 | ||
|
|
b55c779c79 | ||
|
|
eaa59dcac0 | ||
|
|
f5f90186e2 | ||
|
|
f133bcddee | ||
|
|
463cd81e89 | ||
|
|
3d31dd621f | ||
|
|
a82f6e0348 | ||
|
|
398f863a5d | ||
|
|
beb170bdd4 | ||
|
|
6c072258e1 | ||
|
|
a3b3e8d39c | ||
|
|
8316a97c0b | ||
|
|
0420da337d | ||
|
|
56f7f0efa0 | ||
|
|
475044db36 | ||
|
|
4b6e49b3b0 | ||
|
|
8e26eee1f9 | ||
|
|
43f05689b1 | ||
|
|
5dcb328073 | ||
|
|
f3923a388c | ||
|
|
2af0f7fd36 | ||
|
|
b42689c1f6 | ||
|
|
70312c32a0 | ||
|
|
e44658e970 | ||
|
|
a297c4c11b | ||
|
|
82077bac1b | ||
|
|
3c16b05276 | ||
|
|
38e141ce2b | ||
|
|
21406ceafc | ||
|
|
c3b95fb970 | ||
|
|
38f5cf503e | ||
|
|
fc3cf56458 | ||
|
|
c8b8e5dc79 | ||
|
|
8e9e2dbe80 | ||
|
|
6b4deb99b3 | ||
|
|
981df2f149 | ||
|
|
269b3fa6c7 | ||
|
|
74a43fb43d | ||
|
|
3a84dfe99a | ||
|
|
59a1bcf067 | ||
|
|
a870eb1889 | ||
|
|
7db224cee1 | ||
|
|
2501e3e1e9 | ||
|
|
02121f14d9 | ||
|
|
ecb29eba8d | ||
|
|
fd8dc6da66 | ||
|
|
d48bfb9ad5 | ||
|
|
2b26436737 | ||
|
|
651d17e44d | ||
|
|
083aa0f118 | ||
|
|
db44896922 | ||
|
|
2067a83111 | ||
|
|
33f1721ec8 | ||
|
|
6b33bcbe03 | ||
|
|
2975963a3c | ||
|
|
9013b96556 | ||
|
|
13b4085173 | ||
|
|
96ed96c550 | ||
|
|
35ab684845 | ||
|
|
654e8f8fd1 | ||
|
|
74b7411dff | ||
|
|
da9f428cd2 | ||
|
|
fb55d9fb1c | ||
|
|
258489adc8 | ||
|
|
408c29b80c | ||
|
|
6519f1666c | ||
|
|
8a963adbe1 | ||
|
|
22f8bce7a7 | ||
|
|
4313922d94 | ||
|
|
006bbb34be | ||
|
|
e01329fe5c | ||
|
|
316bb43f9e | ||
|
|
707012ff9f | ||
|
|
1adf3209d9 | ||
|
|
8464c07a34 | ||
|
|
0961991d23 | ||
|
|
3608d26a12 | ||
|
|
22968158b3 | ||
|
|
02d38807a5 | ||
|
|
2ff585adc2 | ||
|
|
157def1956 | ||
|
|
b325b44f2d | ||
|
|
986343f6dc | ||
|
|
2a66ce5139 | ||
|
|
6b4c8d5354 | ||
|
|
615aaec27d | ||
|
|
7ea2dc3533 | ||
|
|
82dfd1fafb | ||
|
|
9d15c8f34c | ||
|
|
59a3c6d1dd | ||
|
|
941bd69f9d |
@@ -200,6 +200,7 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
options.config.model.startsWith("o1") ||
|
options.config.model.startsWith("o1") ||
|
||||||
options.config.model.startsWith("o3") ||
|
options.config.model.startsWith("o3") ||
|
||||||
options.config.model.startsWith("o4-mini");
|
options.config.model.startsWith("o4-mini");
|
||||||
|
const isGpt5 = options.config.model.startsWith("gpt-5");
|
||||||
if (isDalle3) {
|
if (isDalle3) {
|
||||||
const prompt = getMessageTextContent(
|
const prompt = getMessageTextContent(
|
||||||
options.messages.slice(-1)?.pop() as any,
|
options.messages.slice(-1)?.pop() as any,
|
||||||
@@ -230,7 +231,7 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
messages,
|
messages,
|
||||||
stream: options.config.stream,
|
stream: options.config.stream,
|
||||||
model: modelConfig.model,
|
model: modelConfig.model,
|
||||||
temperature: !isO1OrO3 ? modelConfig.temperature : 1,
|
temperature: (!isO1OrO3 && !isGpt5) ? modelConfig.temperature : 1,
|
||||||
presence_penalty: !isO1OrO3 ? modelConfig.presence_penalty : 0,
|
presence_penalty: !isO1OrO3 ? modelConfig.presence_penalty : 0,
|
||||||
frequency_penalty: !isO1OrO3 ? modelConfig.frequency_penalty : 0,
|
frequency_penalty: !isO1OrO3 ? modelConfig.frequency_penalty : 0,
|
||||||
top_p: !isO1OrO3 ? modelConfig.top_p : 1,
|
top_p: !isO1OrO3 ? modelConfig.top_p : 1,
|
||||||
@@ -238,7 +239,13 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
// Please do not ask me why not send max_tokens, no reason, this param is just shit, I dont want to explain anymore.
|
// Please do not ask me why not send max_tokens, no reason, this param is just shit, I dont want to explain anymore.
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isO1OrO3) {
|
if (isGpt5) {
|
||||||
|
// Remove max_tokens if present
|
||||||
|
delete requestPayload.max_tokens;
|
||||||
|
// Add max_completion_tokens (or max_completion_tokens if that's what you meant)
|
||||||
|
requestPayload["max_completion_tokens"] = modelConfig.max_tokens;
|
||||||
|
|
||||||
|
} else if (isO1OrO3) {
|
||||||
// by default the o1/o3 models will not attempt to produce output that includes markdown formatting
|
// by default the o1/o3 models will not attempt to produce output that includes markdown formatting
|
||||||
// manually add "Formatting re-enabled" developer message to encourage markdown inclusion in model responses
|
// manually add "Formatting re-enabled" developer message to encourage markdown inclusion in model responses
|
||||||
// (https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/reasoning?tabs=python-secure#markdown-output)
|
// (https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/reasoning?tabs=python-secure#markdown-output)
|
||||||
@@ -251,8 +258,9 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
requestPayload["max_completion_tokens"] = modelConfig.max_tokens;
|
requestPayload["max_completion_tokens"] = modelConfig.max_tokens;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// add max_tokens to vision model
|
// add max_tokens to vision model
|
||||||
if (visionModel && !isO1OrO3) {
|
if (visionModel && !isO1OrO3 && ! isGpt5) {
|
||||||
requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000);
|
requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -493,6 +493,7 @@ export const VISION_MODEL_REGEXES = [
|
|||||||
/o3/,
|
/o3/,
|
||||||
/o4-mini/,
|
/o4-mini/,
|
||||||
/grok-4/i,
|
/grok-4/i,
|
||||||
|
/gpt-5/
|
||||||
];
|
];
|
||||||
|
|
||||||
export const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];
|
export const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];
|
||||||
@@ -517,6 +518,11 @@ const openaiModels = [
|
|||||||
"gpt-4.1-nano-2025-04-14",
|
"gpt-4.1-nano-2025-04-14",
|
||||||
"gpt-4.5-preview",
|
"gpt-4.5-preview",
|
||||||
"gpt-4.5-preview-2025-02-27",
|
"gpt-4.5-preview-2025-02-27",
|
||||||
|
"gpt-5-chat",
|
||||||
|
"gpt-5-mini",
|
||||||
|
"gpt-5-nano",
|
||||||
|
"gpt-5",
|
||||||
|
"gpt-5-chat-2025-01-01-preview",
|
||||||
"gpt-4o",
|
"gpt-4o",
|
||||||
"gpt-4o-2024-05-13",
|
"gpt-4o-2024-05-13",
|
||||||
"gpt-4o-2024-08-06",
|
"gpt-4o-2024-08-06",
|
||||||
@@ -667,6 +673,11 @@ const xAIModes = [
|
|||||||
"grok-3-beta",
|
"grok-3-beta",
|
||||||
"grok-3",
|
"grok-3",
|
||||||
"grok-3-latest",
|
"grok-3-latest",
|
||||||
|
"grok-4",
|
||||||
|
"grok-4-0709",
|
||||||
|
"grok-4-fast-non-reasoning",
|
||||||
|
"grok-4-fast-reasoning",
|
||||||
|
"grok-code-fast-1",
|
||||||
];
|
];
|
||||||
|
|
||||||
const chatglmModels = [
|
const chatglmModels = [
|
||||||
|
|||||||
Reference in New Issue
Block a user