mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-23 03:36:38 +08:00
add: model gpt-5 and set up for it temperature to 1 by default
This commit is contained in:
parent
557a2cce35
commit
e0ab7a4bcd
@ -200,6 +200,7 @@ export class ChatGPTApi implements LLMApi {
|
||||
options.config.model.startsWith("o1") ||
|
||||
options.config.model.startsWith("o3") ||
|
||||
options.config.model.startsWith("o4-mini");
|
||||
const isGPT5 = options.config.model.startsWith("gpt-5");
|
||||
if (isDalle3) {
|
||||
const prompt = getMessageTextContent(
|
||||
options.messages.slice(-1)?.pop() as any,
|
||||
@ -230,7 +231,7 @@ export class ChatGPTApi implements LLMApi {
|
||||
messages,
|
||||
stream: options.config.stream,
|
||||
model: modelConfig.model,
|
||||
temperature: !isO1OrO3 ? modelConfig.temperature : 1,
|
||||
temperature: !isO1OrO3 && !isGPT5 ? modelConfig.temperature : 1,
|
||||
presence_penalty: !isO1OrO3 ? modelConfig.presence_penalty : 0,
|
||||
frequency_penalty: !isO1OrO3 ? modelConfig.frequency_penalty : 0,
|
||||
top_p: !isO1OrO3 ? modelConfig.top_p : 1,
|
||||
|
@ -453,6 +453,9 @@ export const KnowledgeCutOffDate: Record<string, string> = {
|
||||
o1: "2023-10",
|
||||
"o3-mini-2025-01-31": "2023-10",
|
||||
"o3-mini": "2023-10",
|
||||
// temporary stub
|
||||
"gpt-5-mini": "2099-09",
|
||||
"gpt-5": "2099-09",
|
||||
// After improvements,
|
||||
// it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously.
|
||||
"gemini-pro": "2023-12",
|
||||
@ -533,6 +536,8 @@ const openaiModels = [
|
||||
"o3-mini",
|
||||
"o3",
|
||||
"o4-mini",
|
||||
"gpt-5-mini",
|
||||
"gpt-5",
|
||||
];
|
||||
|
||||
const googleModels = [
|
||||
|
Loading…
Reference in New Issue
Block a user