mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-17 22:43:42 +08:00
Merge remote-tracking branch 'upstream/main' into dev
# Conflicts: # app/client/platforms/openai.ts # app/locales/tw.ts
This commit is contained in:
@@ -112,6 +112,17 @@ export class ChatGPTApi implements LLMApi {
|
||||
};
|
||||
|
||||
// console.log("[Request] openai payload: ", requestPayload);
|
||||
// add max_tokens to vision model
|
||||
if (visionModel) {
|
||||
Object.defineProperty(requestPayload, "max_tokens", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: Math.max(modelConfig.max_tokens, 4096),
|
||||
});
|
||||
}
|
||||
|
||||
console.log("[Request] openai payload: ", requestPayload);
|
||||
|
||||
const shouldStream = !!options.config.stream;
|
||||
const controller = new AbortController();
|
||||
|
||||
Reference in New Issue
Block a user