Skip to content

Commit

Permalink
support glm-4v-flash
Browse files Browse the repository at this point in the history
  • Loading branch information
dupl committed Dec 21, 2024
1 parent 0a056a7 commit 1d80293
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class ChatGPTApi implements LLMApi {
}

// add max_tokens to vision model
if (visionModel) {
if (visionModel && modelConfig.model !== "glm-4v-flash") {
requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000);
}
}
Expand Down
1 change: 1 addition & 0 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ export function isVisionModel(model: string) {
"learnlm",
"qwen-vl",
"qwen2-vl",
"glm-4v",
];
const isGpt4Turbo =
model.includes("gpt-4-turbo") && !model.includes("preview");
Expand Down

0 comments on commit 1d80293

Please sign in to comment.