debug: 添加阿里生图消息格式调试日志
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-01-12 13:56:38 +08:00
parent cda7cd4d7d
commit da207f654e

View File

@ -292,6 +292,8 @@ export function createAlibabaImage({ apiKey, baseURL }: AlibabaImageConfig) {
console.log("[Alibaba Image] doGenerate called");
console.log("[Alibaba Image] Model:", modelId);
console.log("[Alibaba Image] Image params:", options.imageParams);
console.log("[Alibaba Image] Messages count:", options.messages.length);
console.log("[Alibaba Image] Messages:", JSON.stringify(options.messages, null, 2));
try {
// 提取最后一条用户消息
@ -300,6 +302,8 @@ export function createAlibabaImage({ apiKey, baseURL }: AlibabaImageConfig) {
throw new Error("No user message found");
}
console.log("[Alibaba Image] Last user message:", JSON.stringify(lastUserMessage, null, 2));
// 解析消息内容
let prompt = "";
const imageUrls: string[] = [];