Skip to content

Commit

Permalink
fix: add optional chaining to prevent errors when accessing visionModels
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiming3 committed Dec 21, 2024
1 parent 149d732 commit ea1329f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export function getMessageImages(message: RequestMessage): string[] {

export function isVisionModel(model: string) {
const clientConfig = getClientConfig();
const envVisionModels = clientConfig.visionModels
const envVisionModels = clientConfig?.visionModels
?.split(",")
.map((m) => m.trim());
if (envVisionModels?.includes(model)) {
Expand Down

0 comments on commit ea1329f

Please sign in to comment.