mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 15:16:24 +08:00
fix: add optional chaining to prevent errors when accessing visionModels
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user