Skip to content

Commit 2919144

Browse files
authored
Merge pull request #6 from xiaoti12/main
修复gemini maxOutputTokens过大
2 parents 2e2ab03 + f8e53c9 commit 2919144

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/llm/gemini/payloadBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export function prepareChatPayload(
178178
const configForApi: any = {
179179
systemInstruction: systemInstruction || undefined,
180180
temperature: settingsSource.temperature,
181-
maxOutputTokens: settingsSource.maxOutputTokens,
181+
maxOutputTokens: Math.min(settingsSource.maxOutputTokens, 65536)
182182
};
183183

184184
if (showThoughts) {

0 commit comments

Comments
 (0)