mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 13:34:58 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -45,11 +45,17 @@ export async function minimaxUnderstandImage(params: {
|
||||
modelBaseUrl?: string;
|
||||
}): Promise<string> {
|
||||
const apiKey = params.apiKey.trim();
|
||||
if (!apiKey) throw new Error("MiniMax VLM: apiKey required");
|
||||
if (!apiKey) {
|
||||
throw new Error("MiniMax VLM: apiKey required");
|
||||
}
|
||||
const prompt = params.prompt.trim();
|
||||
if (!prompt) throw new Error("MiniMax VLM: prompt required");
|
||||
if (!prompt) {
|
||||
throw new Error("MiniMax VLM: prompt required");
|
||||
}
|
||||
const imageDataUrl = params.imageDataUrl.trim();
|
||||
if (!imageDataUrl) throw new Error("MiniMax VLM: imageDataUrl required");
|
||||
if (!imageDataUrl) {
|
||||
throw new Error("MiniMax VLM: imageDataUrl required");
|
||||
}
|
||||
if (!/^data:image\/(png|jpeg|webp);base64,/i.test(imageDataUrl)) {
|
||||
throw new Error("MiniMax VLM: imageDataUrl must be a base64 data:image/(png|jpeg|webp) URL");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user