Skip to content

Commit

Permalink
fix no max_tokens in payload when the vision model name does not cont…
Browse files Browse the repository at this point in the history
…ain 'vision'.
  • Loading branch information
dustookk committed Aug 21, 2024
1 parent ffe3269 commit 56eb9d1
Showing 1 changed file with 1 addition 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 @@ -190,7 +190,7 @@ export class ChatGPTApi implements LLMApi {
};

// add max_tokens to vision model
if (visionModel && modelConfig.model.includes("preview")) {
if (visionModel) {
requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000);
}
}
Expand Down

0 comments on commit 56eb9d1

Please sign in to comment.