modelscope-image-mcp 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +5 -5
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -182,14 +182,14 @@ async function runGeneration({ model, prompt, negativePrompt, size, seed, image,
|
|
|
182
182
|
files.push(await downloadImage(url, dir));
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
return { taskId, files, urls };
|
|
185
|
+
return { taskId, files, urls, model };
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
function renderResult({ taskId, files, urls }) {
|
|
188
|
+
function renderResult({ taskId, files, urls, model }) {
|
|
189
189
|
if (!files.length) {
|
|
190
|
-
return
|
|
190
|
+
return `模型:${model}\n任务 ${taskId} 已完成,但未返回图片。原始响应:${JSON.stringify(urls)}`;
|
|
191
191
|
}
|
|
192
|
-
const lines = [`已生成 ${files.length} 张图片:`, ""];
|
|
192
|
+
const lines = [`模型:${model}`, "", `已生成 ${files.length} 张图片:`, ""];
|
|
193
193
|
files.forEach((f, i) => {
|
|
194
194
|
lines.push(`${i + 1}. 本地文件:${f}`);
|
|
195
195
|
if (urls[i]) lines.push(` 原始链接:${urls[i]}`);
|
|
@@ -330,7 +330,7 @@ async function handleMessage(msg) {
|
|
|
330
330
|
reply(id, {
|
|
331
331
|
protocolVersion: params?.protocolVersion || "2024-11-05",
|
|
332
332
|
capabilities: { tools: {} },
|
|
333
|
-
serverInfo: { name: "modelscope-image-mcp", version: "1.0.
|
|
333
|
+
serverInfo: { name: "modelscope-image-mcp", version: "1.0.1" },
|
|
334
334
|
});
|
|
335
335
|
return;
|
|
336
336
|
|