mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-28 16:40:20 +09:00
Merge pull request #2 from SolarifyDev/enhance-openai-o1or-o3-request-params
Enhance OpenAI o1、o3 request params
This commit is contained in:
commit
adca477723
@ -67,6 +67,7 @@ export interface RequestPayload {
|
||||
top_p: number;
|
||||
max_tokens?: number;
|
||||
max_completion_tokens?: number;
|
||||
drop_params?: boolean;
|
||||
}
|
||||
|
||||
export interface DalleRequestPayload {
|
||||
@ -240,6 +241,7 @@ export class ChatGPTApi implements LLMApi {
|
||||
// O1 使用 max_completion_tokens 控制token数 (https://platform.openai.com/docs/guides/reasoning#controlling-costs)
|
||||
if (isO1OrO3) {
|
||||
requestPayload["max_completion_tokens"] = modelConfig.max_tokens;
|
||||
requestPayload["drop_params"] = true;
|
||||
}
|
||||
|
||||
// add max_tokens to vision model
|
||||
|
Loading…
Reference in New Issue
Block a user