增加2.5模型调用
This commit is contained in:
1 parent
3f29ba716a
commit
be655b6569
32 files changed
+1075
-56
No files matched your search
@@ -104,6 +104,22 @@ describe("image templates", () => {
|
||||
}).settings).toEqual({ engine: "seedream", size: "1.5K", outputFormat: "jpeg", optimizeMode: "fast" });
|
||||
});
|
||||
|
||||
it("keeps an EvoLink model in a template without leaking it to another engine", () => {
|
||||
const base = { name: "模型模板", prompt: "生成商品图" };
|
||||
expect(normalizeImageTemplateCreate({
|
||||
...base,
|
||||
settings: { engine: "evolink", model: "gpt-image-2.5-sunburst", quality: "medium" }
|
||||
}).settings).toEqual({ engine: "evolink", model: "gpt-image-2.5-sunburst", quality: "medium" });
|
||||
expect(normalizeImageTemplateCreate({
|
||||
...base,
|
||||
settings: { engine: "jimeng", model: "gpt-image-2.5-sunburst" }
|
||||
}).settings).toEqual({ engine: "jimeng" });
|
||||
expect(() => normalizeImageTemplateCreate({
|
||||
...base,
|
||||
settings: { engine: "evolink", model: "../invalid" }
|
||||
})).toThrow("模型 ID 格式无效");
|
||||
});
|
||||
|
||||
it("extracts prompt material placeholders for template upload slots", () => {
|
||||
expect(extractMaterialPlaceholders("以 @图片1 为主体,参考 @图2 的色调,再参考 @视频1 的运动感。")).toEqual([
|
||||
{ token: "@图片1", type: "image", index: 1 },
|
||||
|
||||
Reference in new issue
Block a user