第一轮测试完成,视频other未接入
This commit is contained in:
parent
12fdb3f0d1
commit
1a511d7e88
@ -55,12 +55,12 @@
|
|||||||
"js-md5": "^0.8.3",
|
"js-md5": "^0.8.3",
|
||||||
"jsonwebtoken": "^9.0.3",
|
"jsonwebtoken": "^9.0.3",
|
||||||
"knex": "^3.1.0",
|
"knex": "^3.1.0",
|
||||||
"langchain": "^1.2.10",
|
|
||||||
"morgan": "^1.10.1",
|
"morgan": "^1.10.1",
|
||||||
"qwen-ai-provider": "^0.1.1",
|
"qwen-ai-provider": "^0.1.1",
|
||||||
"serialize-error": "^13.0.1",
|
"serialize-error": "^13.0.1",
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
"sqlite3": "^5.1.7",
|
"sqlite3": "^5.1.7",
|
||||||
|
"uuid": "^13.0.0",
|
||||||
"zhipu-ai-provider": "^0.2.2",
|
"zhipu-ai-provider": "^0.2.2",
|
||||||
"zod": "^4.3.5"
|
"zod": "^4.3.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -213,6 +213,7 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
|||||||
table.integer("scriptId"); // 关联的脚本ID
|
table.integer("scriptId"); // 关联的脚本ID
|
||||||
table.integer("projectId"); // 关联的项目ID
|
table.integer("projectId"); // 关联的项目ID
|
||||||
table.integer("aiConfigId"); //ai配置ID
|
table.integer("aiConfigId"); //ai配置ID
|
||||||
|
table.integer("audioEnabled"); //声音
|
||||||
table.text("manufacturer"); // 厂商:volcengine/runninghub/openAi
|
table.text("manufacturer"); // 厂商:volcengine/runninghub/openAi
|
||||||
table.text("mode"); // 模式:startEnd/multi/single
|
table.text("mode"); // 模式:startEnd/multi/single
|
||||||
table.text("startFrame"); // 首帧图片信息 JSON
|
table.text("startFrame"); // 首帧图片信息 JSON
|
||||||
|
|||||||
@ -6,7 +6,7 @@ type ConsoleMethod = (...args: unknown[]) => void;
|
|||||||
|
|
||||||
const LOG_DIR = "./logs";
|
const LOG_DIR = "./logs";
|
||||||
const LOG_FILE = path.join(LOG_DIR, "app.log");
|
const LOG_FILE = path.join(LOG_DIR, "app.log");
|
||||||
const MAX_SIZE = 10 * 1024 * 1024;
|
const MAX_SIZE = 1000 * 1024 * 1024;
|
||||||
const LEVELS: LogLevel[] = ["log", "info", "warn", "error", "debug"];
|
const LEVELS: LogLevel[] = ["log", "info", "warn", "error", "debug"];
|
||||||
|
|
||||||
class Logger {
|
class Logger {
|
||||||
|
|||||||
@ -17,12 +17,13 @@ export default router.post(
|
|||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { modelName, apiKey, baseURL, manufacturer } = req.body;
|
const { modelName, apiKey, baseURL, manufacturer } = req.body;
|
||||||
try {
|
try {
|
||||||
|
const duration = manufacturer == "gemini" ? 4 : 5;
|
||||||
const videoPath = await u.ai.video(
|
const videoPath = await u.ai.video(
|
||||||
{
|
{
|
||||||
imageBase64: [],
|
imageBase64: [],
|
||||||
savePath: "test.mp4",
|
savePath: "test.mp4",
|
||||||
prompt: "stickman Dances",
|
prompt: "stickman Dances",
|
||||||
duration: 4,
|
duration: duration,
|
||||||
resolution: "720p",
|
resolution: "720p",
|
||||||
aspectRatio: "16:9",
|
aspectRatio: "16:9",
|
||||||
audio: false,
|
audio: false,
|
||||||
|
|||||||
@ -21,7 +21,7 @@ export default router.post(
|
|||||||
scriptId: z.number(),
|
scriptId: z.number(),
|
||||||
projectId: z.number(),
|
projectId: z.number(),
|
||||||
configId: z.number(),
|
configId: z.number(),
|
||||||
mode: z.enum(["startEnd", "multi", "single",'text','']),
|
mode: z.enum(["startEnd", "multi", "single", "text", ""]),
|
||||||
startFrame: imageItemSchema.optional(),
|
startFrame: imageItemSchema.optional(),
|
||||||
endFrame: imageItemSchema.optional(),
|
endFrame: imageItemSchema.optional(),
|
||||||
images: z
|
images: z
|
||||||
@ -36,9 +36,10 @@ export default router.post(
|
|||||||
resolution: z.string(),
|
resolution: z.string(),
|
||||||
duration: z.number(),
|
duration: z.number(),
|
||||||
prompt: z.string().optional(),
|
prompt: z.string().optional(),
|
||||||
|
audioEnabled: z.boolean(),
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { scriptId, projectId, configId, mode, startFrame, endFrame, images, resolution, duration, prompt } = req.body;
|
const { scriptId, projectId, configId, mode, startFrame, endFrame, images, resolution, duration, prompt, audioEnabled } = req.body;
|
||||||
|
|
||||||
// 生成新ID
|
// 生成新ID
|
||||||
const maxIdResult: any = await u.db("t_videoConfig").max("id as maxId").first();
|
const maxIdResult: any = await u.db("t_videoConfig").max("id as maxId").first();
|
||||||
@ -63,6 +64,7 @@ export default router.post(
|
|||||||
selectedResultId: null,
|
selectedResultId: null,
|
||||||
createTime: now,
|
createTime: now,
|
||||||
updateTime: now,
|
updateTime: now,
|
||||||
|
audioEnabled: audioEnabled ? 1 : 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
res.status(200).send(
|
res.status(200).send(
|
||||||
@ -84,6 +86,7 @@ export default router.post(
|
|||||||
prompt: prompt || "",
|
prompt: prompt || "",
|
||||||
selectedResultId: null,
|
selectedResultId: null,
|
||||||
createdAt: new Date(now).toISOString(),
|
createdAt: new Date(now).toISOString(),
|
||||||
|
audioEnabled: audioEnabled,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -6,10 +6,10 @@ import { z } from "zod";
|
|||||||
|
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
type GenerateMode = "startEnd" | "multi" | "single";
|
type GenerateMode = "startEnd" | "multi" | "single" | "text";
|
||||||
|
|
||||||
const getSystemPrompt = async (mode: GenerateMode) => {
|
const getSystemPrompt = async (mode: GenerateMode) => {
|
||||||
const promptsList = await u.db("t_prompts").where("code", "in", ["video-startEnd", "video-multi", "video-single", "video-main"]);
|
const promptsList = await u.db("t_prompts").where("code", "in", ["video-startEnd", "video-multi", "video-single", "video-main","video-text"]);
|
||||||
|
|
||||||
const errPrompts = "不论用户说什么,请直接输出AI配置异常";
|
const errPrompts = "不论用户说什么,请直接输出AI配置异常";
|
||||||
const getPromptValue = (code: string) => {
|
const getPromptValue = (code: string) => {
|
||||||
@ -20,11 +20,13 @@ const getSystemPrompt = async (mode: GenerateMode) => {
|
|||||||
const multi = getPromptValue("video-multi");
|
const multi = getPromptValue("video-multi");
|
||||||
const single = getPromptValue("video-single");
|
const single = getPromptValue("video-single");
|
||||||
const main = getPromptValue("video-main");
|
const main = getPromptValue("video-main");
|
||||||
|
const text = getPromptValue("video-text");
|
||||||
|
|
||||||
const modeDescriptions = {
|
const modeDescriptions = {
|
||||||
startEnd: startEnd,
|
startEnd: startEnd,
|
||||||
multi: multi,
|
multi: multi,
|
||||||
single: single,
|
single: single,
|
||||||
|
text: text,
|
||||||
};
|
};
|
||||||
const modeData = modeDescriptions[mode];
|
const modeData = modeDescriptions[mode];
|
||||||
return `${main}\n\n${modeData}`;
|
return `${main}\n\n${modeData}`;
|
||||||
@ -35,6 +37,7 @@ const getModeDescription = (mode: GenerateMode): string => {
|
|||||||
startEnd: "首尾帧模式",
|
startEnd: "首尾帧模式",
|
||||||
multi: "宫格模式",
|
multi: "宫格模式",
|
||||||
single: "单图模式",
|
single: "单图模式",
|
||||||
|
text: "文本模式",
|
||||||
};
|
};
|
||||||
return map[mode];
|
return map[mode];
|
||||||
};
|
};
|
||||||
@ -42,20 +45,24 @@ const getModeDescription = (mode: GenerateMode): string => {
|
|||||||
export default router.post(
|
export default router.post(
|
||||||
"/",
|
"/",
|
||||||
validateFields({
|
validateFields({
|
||||||
images: z.array(
|
images: z
|
||||||
z.object({
|
.array(
|
||||||
filePath: z.string(),
|
z.object({
|
||||||
prompt: z.string(),
|
filePath: z.string(),
|
||||||
}),
|
prompt: z.string(),
|
||||||
),
|
}),
|
||||||
|
)
|
||||||
|
.optional(),
|
||||||
prompt: z.string(),
|
prompt: z.string(),
|
||||||
duration: z.number(),
|
duration: z.number(),
|
||||||
type: z.enum(["startEnd", "multi", "single"]).optional(),
|
type: z.enum(["startEnd", "multi", "single", "text", ""]).optional(),
|
||||||
|
videoConfigId:z.number()
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { prompt, images, duration, type = "single" } = req.body;
|
const { prompt, images, duration, type = "single",videoConfigId } = req.body;
|
||||||
const mode = type as GenerateMode;
|
const mode = type as GenerateMode;
|
||||||
|
const videoConfigData = await u.db("t_videoConfig").leftJoin("t_script","t_script.id","t_videoConfig.scriptId").where("t_videoConfig.id",videoConfigId).select("t_script.content").first();
|
||||||
|
if(!videoConfigData) return res.status(500).send(error("视频配置不存在"));
|
||||||
const imagePrompts = images.map((i: { filePath: string; prompt: string }, index: number) => `Image ${index + 1}: ${i.prompt}`).join("\n");
|
const imagePrompts = images.map((i: { filePath: string; prompt: string }, index: number) => `Image ${index + 1}: ${i.prompt}`).join("\n");
|
||||||
|
|
||||||
const shotCount = images.length;
|
const shotCount = images.length;
|
||||||
@ -80,6 +87,9 @@ ${imagePrompts}
|
|||||||
Script:
|
Script:
|
||||||
${prompt}
|
${prompt}
|
||||||
|
|
||||||
|
script content:
|
||||||
|
${videoConfigData.content}
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- Total Duration: ${duration}s
|
- Total Duration: ${duration}s
|
||||||
- Shot Count: ${shotCount}
|
- Shot Count: ${shotCount}
|
||||||
|
|||||||
@ -25,9 +25,10 @@ export default router.post(
|
|||||||
duration: z.number(),
|
duration: z.number(),
|
||||||
prompt: z.string(),
|
prompt: z.string(),
|
||||||
mode: z.enum(["startEnd", "multi", "single", "text"]),
|
mode: z.enum(["startEnd", "multi", "single", "text"]),
|
||||||
|
audioEnabled: z.boolean(),
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { type, mode, scriptId, projectId, configId, aiConfigId, resolution, filePath, duration, prompt } = req.body;
|
const { type, mode, scriptId, projectId, configId, aiConfigId, resolution, filePath, duration, prompt, audioEnabled } = req.body;
|
||||||
|
|
||||||
if (mode == "text") filePath.length = 0;
|
if (mode == "text") filePath.length = 0;
|
||||||
else if (!filePath.length) {
|
else if (!filePath.length) {
|
||||||
@ -118,7 +119,7 @@ export default router.post(
|
|||||||
res.status(200).send(success({ id: videoId, configId: configId || null }));
|
res.status(200).send(success({ id: videoId, configId: configId || null }));
|
||||||
|
|
||||||
// 异步生成视频
|
// 异步生成视频
|
||||||
generateVideoAsync(videoId, projectId, fileUrl, savePath, prompt, duration, resolution, aiConfigData);
|
generateVideoAsync(videoId, projectId, fileUrl, savePath, prompt, duration, resolution, audioEnabled, aiConfigData);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -131,6 +132,7 @@ async function generateVideoAsync(
|
|||||||
prompt: string,
|
prompt: string,
|
||||||
duration: number,
|
duration: number,
|
||||||
resolution: string,
|
resolution: string,
|
||||||
|
audioEnabled: boolean,
|
||||||
aiConfigData: t_config,
|
aiConfigData: t_config,
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
@ -172,6 +174,7 @@ ${prompt}
|
|||||||
duration: duration as any,
|
duration: duration as any,
|
||||||
aspectRatio: projectData?.videoRatio as any,
|
aspectRatio: projectData?.videoRatio as any,
|
||||||
resolution: resolution as any,
|
resolution: resolution as any,
|
||||||
|
audio: audioEnabled,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
baseURL: aiConfigData?.baseUrl!,
|
baseURL: aiConfigData?.baseUrl!,
|
||||||
@ -192,7 +195,7 @@ ${prompt}
|
|||||||
await u.db("t_video").where("id", videoId).update({ state: -1 });
|
await u.db("t_video").where("id", videoId).update({ state: -1 });
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`视频生成失败 videoId=${videoId}:`, u.error(err).message);
|
console.error(`视频生成失败 videoId=${videoId}:`, err);
|
||||||
await u.db("t_video").where("id", videoId).update({ state: -1 });
|
await u.db("t_video").where("id", videoId).update({ state: -1 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -315,18 +318,8 @@ async function sharpProcessingImage(imageList: string[], projectId: number): Pro
|
|||||||
// 合成所有图片
|
// 合成所有图片
|
||||||
const result = await canvas.composite(compositeOperations).png().toBuffer();
|
const result = await canvas.composite(compositeOperations).png().toBuffer();
|
||||||
|
|
||||||
// 保存图片到当前文件夹,方便查看测试效果
|
|
||||||
const timestamp = new Date().getTime();
|
|
||||||
const outputFileName = `merged_image_${timestamp}.png`;
|
|
||||||
const outputPath = path.join(__dirname, outputFileName);
|
|
||||||
|
|
||||||
try {
|
|
||||||
await fs.promises.writeFile(outputPath, result);
|
|
||||||
} catch (err) {
|
|
||||||
console.error(`❌ 保存图片失败:`, err);
|
|
||||||
}
|
|
||||||
const imagePath = `/${projectId}/assets/${uuidv4()}.jpg`;
|
const imagePath = `/${projectId}/assets/${uuidv4()}.jpg`;
|
||||||
const buffer = Buffer.from(result, "base64");
|
const buffer = Buffer.from(result as any, "base64");
|
||||||
await u.oss.writeFile(imagePath, buffer);
|
await u.oss.writeFile(imagePath, buffer);
|
||||||
|
|
||||||
return await u.oss.getFileUrl(imagePath);
|
return await u.oss.getFileUrl(imagePath);
|
||||||
|
|||||||
@ -38,6 +38,7 @@ export default router.post(
|
|||||||
prompt: config.prompt || "",
|
prompt: config.prompt || "",
|
||||||
selectedResultId: config.selectedResultId,
|
selectedResultId: config.selectedResultId,
|
||||||
createdAt: config.createTime ? new Date(config.createTime).toISOString() : new Date().toISOString(),
|
createdAt: config.createTime ? new Date(config.createTime).toISOString() : new Date().toISOString(),
|
||||||
|
audioEnabled:!!config.audioEnabled
|
||||||
}));
|
}));
|
||||||
|
|
||||||
res.status(200).send(success(result));
|
res.status(200).send(success(result));
|
||||||
|
|||||||
@ -14,9 +14,13 @@ export default router.post(
|
|||||||
duration: z.number().optional(),
|
duration: z.number().optional(),
|
||||||
prompt: z.string().optional(),
|
prompt: z.string().optional(),
|
||||||
selectedResultId: z.number().nullable().optional(),
|
selectedResultId: z.number().nullable().optional(),
|
||||||
|
startFrame: z.object().nullable().optional(),
|
||||||
|
endFrame: z.object().nullable().optional(),
|
||||||
|
images: z.array(z.object()).optional(),
|
||||||
|
audioEnabled: z.boolean().optional(),
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { id, resolution, duration, prompt, selectedResultId } = req.body;
|
const { id, resolution, duration, prompt, selectedResultId, startFrame, endFrame, images, audioEnabled } = req.body;
|
||||||
|
|
||||||
// 检查配置是否存在
|
// 检查配置是否存在
|
||||||
const existingConfig = await u.db("t_videoConfig").where({ id }).first();
|
const existingConfig = await u.db("t_videoConfig").where({ id }).first();
|
||||||
@ -41,7 +45,18 @@ export default router.post(
|
|||||||
if (selectedResultId !== undefined) {
|
if (selectedResultId !== undefined) {
|
||||||
updateData.selectedResultId = selectedResultId;
|
updateData.selectedResultId = selectedResultId;
|
||||||
}
|
}
|
||||||
|
if (startFrame !== undefined) {
|
||||||
|
updateData.startFrame = startFrame ? JSON.stringify(startFrame) : null;;
|
||||||
|
}
|
||||||
|
if (endFrame !== undefined) {
|
||||||
|
updateData.endFrame = endFrame ? JSON.stringify(endFrame) : null;;
|
||||||
|
}
|
||||||
|
if (images !== undefined) {
|
||||||
|
updateData.images = images ? JSON.stringify(images) : null;
|
||||||
|
}
|
||||||
|
if (audioEnabled !== undefined) {
|
||||||
|
updateData.audioEnabled = audioEnabled;
|
||||||
|
}
|
||||||
// 更新数据
|
// 更新数据
|
||||||
await u.db("t_videoConfig").where({ id }).update(updateData);
|
await u.db("t_videoConfig").where({ id }).update(updateData);
|
||||||
|
|
||||||
@ -65,6 +80,7 @@ export default router.post(
|
|||||||
prompt: updatedConfig.prompt,
|
prompt: updatedConfig.prompt,
|
||||||
selectedResultId: updatedConfig.selectedResultId,
|
selectedResultId: updatedConfig.selectedResultId,
|
||||||
createdAt: new Date(updatedConfig.createTime!).toISOString(),
|
createdAt: new Date(updatedConfig.createTime!).toISOString(),
|
||||||
|
audioEnabled: updatedConfig.audioEnabled,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
40
src/types/database.d.ts
vendored
40
src/types/database.d.ts
vendored
@ -1,6 +1,41 @@
|
|||||||
// @db-hash 4cd44aef6bb6ffb02c4619525966496d
|
// @db-hash dd6b6f00da61c815a0ea45cc51644370
|
||||||
//该文件由脚本自动生成,请勿手动修改
|
//该文件由脚本自动生成,请勿手动修改
|
||||||
|
|
||||||
|
export interface _t_videoConfig_old_20260209 {
|
||||||
|
'aiConfigId'?: number | null;
|
||||||
|
'createTime'?: number | null;
|
||||||
|
'duration'?: number | null;
|
||||||
|
'endFrame'?: string | null;
|
||||||
|
'id'?: number;
|
||||||
|
'images'?: string | null;
|
||||||
|
'manufacturer'?: string | null;
|
||||||
|
'mode'?: string | null;
|
||||||
|
'projectId'?: number | null;
|
||||||
|
'prompt'?: string | null;
|
||||||
|
'resolution'?: string | null;
|
||||||
|
'scriptId'?: number | null;
|
||||||
|
'selectedResultId'?: number | null;
|
||||||
|
'startFrame'?: string | null;
|
||||||
|
'updateTime'?: number | null;
|
||||||
|
}
|
||||||
|
export interface _t_videoConfig_old_20260209_1 {
|
||||||
|
'aiConfigId'?: number | null;
|
||||||
|
'audio'?: number | null;
|
||||||
|
'createTime'?: number | null;
|
||||||
|
'duration'?: number | null;
|
||||||
|
'endFrame'?: string | null;
|
||||||
|
'id'?: number;
|
||||||
|
'images'?: string | null;
|
||||||
|
'manufacturer'?: string | null;
|
||||||
|
'mode'?: string | null;
|
||||||
|
'projectId'?: number | null;
|
||||||
|
'prompt'?: string | null;
|
||||||
|
'resolution'?: string | null;
|
||||||
|
'scriptId'?: number | null;
|
||||||
|
'selectedResultId'?: number | null;
|
||||||
|
'startFrame'?: string | null;
|
||||||
|
'updateTime'?: number | null;
|
||||||
|
}
|
||||||
export interface t_aiModelMap {
|
export interface t_aiModelMap {
|
||||||
'configId'?: number | null;
|
'configId'?: number | null;
|
||||||
'id'?: number;
|
'id'?: number;
|
||||||
@ -137,6 +172,7 @@ export interface t_video {
|
|||||||
}
|
}
|
||||||
export interface t_videoConfig {
|
export interface t_videoConfig {
|
||||||
'aiConfigId'?: number | null;
|
'aiConfigId'?: number | null;
|
||||||
|
'audioEnabled'?: number | null;
|
||||||
'createTime'?: number | null;
|
'createTime'?: number | null;
|
||||||
'duration'?: number | null;
|
'duration'?: number | null;
|
||||||
'endFrame'?: string | null;
|
'endFrame'?: string | null;
|
||||||
@ -154,6 +190,8 @@ export interface t_videoConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DB {
|
export interface DB {
|
||||||
|
"_t_videoConfig_old_20260209": _t_videoConfig_old_20260209;
|
||||||
|
"_t_videoConfig_old_20260209_1": _t_videoConfig_old_20260209_1;
|
||||||
"t_aiModelMap": t_aiModelMap;
|
"t_aiModelMap": t_aiModelMap;
|
||||||
"t_assets": t_assets;
|
"t_assets": t_assets;
|
||||||
"t_chatHistory": t_chatHistory;
|
"t_chatHistory": t_chatHistory;
|
||||||
|
|||||||
@ -1,23 +1,37 @@
|
|||||||
import "../type";
|
import "../type";
|
||||||
import { createGoogleGenerativeAI } from "@ai-sdk/google";
|
import { createGoogleGenerativeAI } from "@ai-sdk/google";
|
||||||
import { generateText } from "ai";
|
import { generateText, ModelMessage } from "ai";
|
||||||
|
|
||||||
export default async (input: ImageConfig, config: AIConfig): Promise<string> => {
|
export default async (input: ImageConfig, config: AIConfig): Promise<string> => {
|
||||||
if (!config.model) throw new Error("缺少Model名称");
|
if (!config.model) throw new Error("缺少Model名称");
|
||||||
if (!config.apiKey) throw new Error("缺少API Key");
|
if (!config.apiKey) throw new Error("缺少API Key");
|
||||||
if (!input.prompt) throw new Error("缺少提示词");
|
if (!input.prompt) throw new Error("缺少提示词");
|
||||||
|
|
||||||
|
|
||||||
const google = createGoogleGenerativeAI({
|
const google = createGoogleGenerativeAI({
|
||||||
apiKey: config.apiKey,
|
apiKey: config.apiKey,
|
||||||
baseURL: config?.baseURL ?? "https://generativelanguage.googleapis.com/v1beta",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// 构建完整的提示词
|
// 构建完整的提示词
|
||||||
const fullPrompt = input.systemPrompt ? `${input.systemPrompt}\n\n${input.prompt}` : input.prompt;
|
const fullPrompt = input.systemPrompt ? `${input.systemPrompt}\n\n${input.prompt}` : input.prompt;
|
||||||
|
let promptData: ModelMessage[] | string = [];
|
||||||
|
if (input.imageBase64 && input.imageBase64.length) {
|
||||||
|
promptData = [{ role: "system", content: fullPrompt + `请直接输出图片` }];
|
||||||
|
promptData.push({
|
||||||
|
role: "user",
|
||||||
|
content: input.imageBase64.map((i) => ({
|
||||||
|
type: "image",
|
||||||
|
image: i,
|
||||||
|
})),
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
promptData = fullPrompt + `\n请直接输出图片`;
|
||||||
|
}
|
||||||
|
|
||||||
const result = await generateText({
|
const result = await generateText({
|
||||||
model: google.languageModel(config.model),
|
model: google.languageModel(config.model),
|
||||||
prompt: fullPrompt + `请直接输出图片`,
|
prompt: promptData,
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
google: {
|
google: {
|
||||||
imageConfig: {
|
imageConfig: {
|
||||||
@ -27,10 +41,11 @@ export default async (input: ImageConfig, config: AIConfig): Promise<string> =>
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
timeout: 60000,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(JSON.stringify(result.request, null, 2));
|
|
||||||
console.log(JSON.stringify(result.response.body, null, 2));
|
|
||||||
if (!result.files.length) {
|
if (!result.files.length) {
|
||||||
console.error(JSON.stringify(result.response, null, 2));
|
console.error(JSON.stringify(result.response, null, 2));
|
||||||
throw new Error("图片生成失败");
|
throw new Error("图片生成失败");
|
||||||
|
|||||||
@ -18,12 +18,14 @@ export default async (input: VideoConfig, config: AIConfig) => {
|
|||||||
].join("|");
|
].join("|");
|
||||||
|
|
||||||
const [submitUrl, queryUrl] = (config.baseURL || defaultBaseUrl).split("|");
|
const [submitUrl, queryUrl] = (config.baseURL || defaultBaseUrl).split("|");
|
||||||
|
|
||||||
|
|
||||||
const headers = { "x-goog-api-key": config.apiKey };
|
const headers = { "x-goog-api-key": config.apiKey };
|
||||||
|
|
||||||
const instance: Record<string, any> = { prompt: input.prompt };
|
const instance: Record<string, any> = { prompt: input.prompt };
|
||||||
const parameters: Record<string, any> = {
|
const parameters: Record<string, any> = {
|
||||||
aspectRatio: input.aspectRatio,
|
aspectRatio: input.aspectRatio,
|
||||||
durationSeconds: String(input.duration),
|
durationSeconds: +input.duration,
|
||||||
...(input.resolution !== "720p" && { resolution: input.resolution }),
|
...(input.resolution !== "720p" && { resolution: input.resolution }),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -51,12 +53,15 @@ export default async (input: VideoConfig, config: AIConfig) => {
|
|||||||
|
|
||||||
return pollTask(async () => {
|
return pollTask(async () => {
|
||||||
const { data: status } = await axios.get(queryUrl.replace("{name}", data.name), { headers });
|
const { data: status } = await axios.get(queryUrl.replace("{name}", data.name), { headers });
|
||||||
|
|
||||||
const { done, response, error } = status;
|
const { done, response, error } = status;
|
||||||
|
|
||||||
|
|
||||||
if (!done) return { completed: false };
|
if (!done) return { completed: false };
|
||||||
if (error) return { completed: false, error: `任务失败: ${error.message || JSON.stringify(error)}` };
|
if (error) return { completed: false, error: `任务失败: ${error.message || JSON.stringify(error)}` };
|
||||||
|
|
||||||
const videoUri = response?.generateVideoResponse?.generatedSamples?.[0]?.video?.uri;
|
const videoUri = response?.generateVideoResponse?.generatedSamples?.[0]?.video?.uri;
|
||||||
|
|
||||||
if (!videoUri) return { completed: false, error: "未获取到视频下载地址" };
|
if (!videoUri) return { completed: false, error: "未获取到视频下载地址" };
|
||||||
|
|
||||||
const videoRes = await axios.get(videoUri, { headers, responseType: "arraybuffer", maxRedirects: 5 });
|
const videoRes = await axios.get(videoUri, { headers, responseType: "arraybuffer", maxRedirects: 5 });
|
||||||
@ -65,4 +70,4 @@ export default async (input: VideoConfig, config: AIConfig) => {
|
|||||||
|
|
||||||
return { completed: true, url: savePath };
|
return { completed: true, url: savePath };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,8 +6,6 @@ import { pollTask, validateVideoConfig } from "@/utils/ai/utils";
|
|||||||
import { createOpenAI } from "@ai-sdk/openai";
|
import { createOpenAI } from "@ai-sdk/openai";
|
||||||
import { experimental_generateVideo as generateVideo } from "ai";
|
import { experimental_generateVideo as generateVideo } from "ai";
|
||||||
export default async (input: VideoConfig, config: AIConfig) => {
|
export default async (input: VideoConfig, config: AIConfig) => {
|
||||||
console.log("%c Line:9 🌰 config", "background:#fca650", config);
|
|
||||||
console.log("%c Line:9 🍒 input", "background:#33a5ff", input);
|
|
||||||
if (!config.apiKey) throw new Error("缺少API Key");
|
if (!config.apiKey) throw new Error("缺少API Key");
|
||||||
if (!config.baseURL) throw new Error("缺少baseURL");
|
if (!config.baseURL) throw new Error("缺少baseURL");
|
||||||
// const { owned, images, hasTextType } = validateVideoConfig(input, config);
|
// const { owned, images, hasTextType } = validateVideoConfig(input, config);
|
||||||
@ -26,7 +24,7 @@ export default async (input: VideoConfig, config: AIConfig) => {
|
|||||||
"9:16": "720x1280",
|
"9:16": "720x1280",
|
||||||
};
|
};
|
||||||
formData.append("size", sizeMap[input.aspectRatio] || "1920x1080");
|
formData.append("size", sizeMap[input.aspectRatio] || "1920x1080");
|
||||||
console.log("%c Line:30 🍇 sizeMap[input.aspectRatio]", "background:#93c0a4", sizeMap[input.aspectRatio]);
|
|
||||||
if (input.imageBase64 && input.imageBase64.length) {
|
if (input.imageBase64 && input.imageBase64.length) {
|
||||||
const base64Data = input.imageBase64[0]!.replace(/^data:image\/\w+;base64,/, "");
|
const base64Data = input.imageBase64[0]!.replace(/^data:image\/\w+;base64,/, "");
|
||||||
const buffer = Buffer.from(base64Data, "base64");
|
const buffer = Buffer.from(base64Data, "base64");
|
||||||
@ -54,6 +52,7 @@ export default async (input: VideoConfig, config: AIConfig) => {
|
|||||||
headers: { "Content-Type": "application/json", Authorization: authorization },
|
headers: { "Content-Type": "application/json", Authorization: authorization },
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
console.log("%c Line:62 🍩 data", "background:#465975", data);
|
|
||||||
|
|
||||||
if (data.status === "FAILED") throw new Error(`任务提交失败: ${data.errorMessage || "未知错误"}`);
|
if (data.status === "FAILED") throw new Error(`任务提交失败: ${data.errorMessage || "未知错误"}`);
|
||||||
};
|
};
|
||||||
|
|||||||
130
yarn.lock
130
yarn.lock
@ -542,32 +542,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
minipass "^7.0.4"
|
minipass "^7.0.4"
|
||||||
|
|
||||||
"@langchain/langgraph-checkpoint@^1.0.0":
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.npmmirror.com/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-1.0.0.tgz#ece2ede439d0d0b0b532c4be7817fd5029afe4f8"
|
|
||||||
integrity sha512-xrclBGvNCXDmi0Nz28t3vjpxSH6UYx6w5XAXSiiB1WEdc2xD2iY/a913I3x3a31XpInUW/GGfXXfePfaghV54A==
|
|
||||||
dependencies:
|
|
||||||
uuid "^10.0.0"
|
|
||||||
|
|
||||||
"@langchain/langgraph-sdk@~1.5.5":
|
|
||||||
version "1.5.5"
|
|
||||||
resolved "https://registry.npmmirror.com/@langchain/langgraph-sdk/-/langgraph-sdk-1.5.5.tgz#a84fe0f27e2ed6452a83106c3759d7673789a1f0"
|
|
||||||
integrity sha512-SyiAs6TVXPWlt/8cI9pj/43nbIvclY3ytKqUFbL5MplCUnItetEyqvH87EncxyVF5D7iJKRZRfSVYBMmOZbjbQ==
|
|
||||||
dependencies:
|
|
||||||
p-queue "^9.0.1"
|
|
||||||
p-retry "^7.1.1"
|
|
||||||
uuid "^13.0.0"
|
|
||||||
|
|
||||||
"@langchain/langgraph@^1.1.2":
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.npmmirror.com/@langchain/langgraph/-/langgraph-1.1.2.tgz#9360e01a2f23f4d25a27adddc73ea38eb3d3a976"
|
|
||||||
integrity sha512-kpZCttZ0N+jHSl5Vh/zVNElD5SxGR4sTjjLiBC00aLGf9JK+Sa/XXO6Bsk3WWXFtA1dY+4tUzUqH0mAHfN0WvA==
|
|
||||||
dependencies:
|
|
||||||
"@langchain/langgraph-checkpoint" "^1.0.0"
|
|
||||||
"@langchain/langgraph-sdk" "~1.5.5"
|
|
||||||
"@standard-schema/spec" "1.1.0"
|
|
||||||
uuid "^10.0.0"
|
|
||||||
|
|
||||||
"@malept/cross-spawn-promise@^2.0.0":
|
"@malept/cross-spawn-promise@^2.0.0":
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npmmirror.com/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz#d0772de1aa680a0bfb9ba2f32b4c828c7857cb9d"
|
resolved "https://registry.npmmirror.com/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz#d0772de1aa680a0bfb9ba2f32b4c828c7857cb9d"
|
||||||
@ -668,7 +642,7 @@
|
|||||||
resolved "https://registry.npmmirror.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f"
|
resolved "https://registry.npmmirror.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f"
|
||||||
integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==
|
integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==
|
||||||
|
|
||||||
"@standard-schema/spec@1.1.0", "@standard-schema/spec@^1.0.0", "@standard-schema/spec@^1.1.0":
|
"@standard-schema/spec@^1.0.0", "@standard-schema/spec@^1.1.0":
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.npmmirror.com/@standard-schema/spec/-/spec-1.1.0.tgz#a79b55dbaf8604812f52d140b2c9ab41bc150bb8"
|
resolved "https://registry.npmmirror.com/@standard-schema/spec/-/spec-1.1.0.tgz#a79b55dbaf8604812f52d140b2c9ab41bc150bb8"
|
||||||
integrity sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==
|
integrity sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==
|
||||||
@ -860,11 +834,6 @@
|
|||||||
"@types/http-errors" "*"
|
"@types/http-errors" "*"
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
"@types/uuid@^10.0.0":
|
|
||||||
version "10.0.0"
|
|
||||||
resolved "https://registry.npmmirror.com/@types/uuid/-/uuid-10.0.0.tgz#e9c07fe50da0f53dc24970cca94d619ff03f6f6d"
|
|
||||||
integrity sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==
|
|
||||||
|
|
||||||
"@types/verror@^1.10.3":
|
"@types/verror@^1.10.3":
|
||||||
version "1.10.11"
|
version "1.10.11"
|
||||||
resolved "https://registry.npmmirror.com/@types/verror/-/verror-1.10.11.tgz#d3d6b418978c8aa202d41e5bb3483227b6ecc1bb"
|
resolved "https://registry.npmmirror.com/@types/verror/-/verror-1.10.11.tgz#d3d6b418978c8aa202d41e5bb3483227b6ecc1bb"
|
||||||
@ -1529,13 +1498,6 @@ console-control-strings@^1.1.0:
|
|||||||
resolved "https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
|
resolved "https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
|
||||||
integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==
|
integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==
|
||||||
|
|
||||||
console-table-printer@^2.12.1:
|
|
||||||
version "2.15.0"
|
|
||||||
resolved "https://registry.npmmirror.com/console-table-printer/-/console-table-printer-2.15.0.tgz#5c808204640b8f024d545bde8aabe5d344dfadc1"
|
|
||||||
integrity sha512-SrhBq4hYVjLCkBVOWaTzceJalvn5K1Zq5aQA6wXC/cYjI3frKWNPEMK3sZsJfNNQApvCQmgBcc13ZKmFj8qExw==
|
|
||||||
dependencies:
|
|
||||||
simple-wcswidth "^1.1.2"
|
|
||||||
|
|
||||||
content-disposition@^1.0.0:
|
content-disposition@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.npmmirror.com/content-disposition/-/content-disposition-1.0.1.tgz#a8b7bbeb2904befdfb6787e5c0c086959f605f9b"
|
resolved "https://registry.npmmirror.com/content-disposition/-/content-disposition-1.0.1.tgz#a8b7bbeb2904befdfb6787e5c0c086959f605f9b"
|
||||||
@ -1960,16 +1922,6 @@ etag@^1.8.1:
|
|||||||
resolved "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
resolved "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||||
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
|
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
|
||||||
|
|
||||||
eventemitter3@^4.0.4:
|
|
||||||
version "4.0.7"
|
|
||||||
resolved "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
|
|
||||||
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
|
|
||||||
|
|
||||||
eventemitter3@^5.0.1:
|
|
||||||
version "5.0.4"
|
|
||||||
resolved "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-5.0.4.tgz#a86d66170433712dde814707ac52b5271ceb1feb"
|
|
||||||
integrity sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==
|
|
||||||
|
|
||||||
eventsource-parser@^3.0.6:
|
eventsource-parser@^3.0.6:
|
||||||
version "3.0.6"
|
version "3.0.6"
|
||||||
resolved "https://registry.npmmirror.com/eventsource-parser/-/eventsource-parser-3.0.6.tgz#292e165e34cacbc936c3c92719ef326d4aeb4e90"
|
resolved "https://registry.npmmirror.com/eventsource-parser/-/eventsource-parser-3.0.6.tgz#292e165e34cacbc936c3c92719ef326d4aeb4e90"
|
||||||
@ -2630,11 +2582,6 @@ is-lambda@^1.0.1:
|
|||||||
resolved "https://registry.npmmirror.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5"
|
resolved "https://registry.npmmirror.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5"
|
||||||
integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==
|
integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==
|
||||||
|
|
||||||
is-network-error@^1.1.0:
|
|
||||||
version "1.3.0"
|
|
||||||
resolved "https://registry.npmmirror.com/is-network-error/-/is-network-error-1.3.0.tgz#2ce62cbca444abd506f8a900f39d20b898d37512"
|
|
||||||
integrity sha512-6oIwpsgRfnDiyEDLMay/GqCl3HoAtH5+RUKW29gYkL0QA+ipzpDLA16yQs7/RHCSu+BwgbJaOUqa4A99qNVQVw==
|
|
||||||
|
|
||||||
is-number@^7.0.0:
|
is-number@^7.0.0:
|
||||||
version "7.0.0"
|
version "7.0.0"
|
||||||
resolved "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
resolved "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
||||||
@ -2821,29 +2768,6 @@ knex@^3.1.0:
|
|||||||
tarn "^3.0.2"
|
tarn "^3.0.2"
|
||||||
tildify "2.0.0"
|
tildify "2.0.0"
|
||||||
|
|
||||||
langchain@^1.2.10:
|
|
||||||
version "1.2.15"
|
|
||||||
resolved "https://registry.npmmirror.com/langchain/-/langchain-1.2.15.tgz#653b4110e8fb0fbf6222cb585191ba2867da1641"
|
|
||||||
integrity sha512-4tIUBryI+JDJYnuyQKELqfjG6VgOYQq5eFE+5TX2H+gLkNDHNpdppnKWcsYWPBE/bbIdKMMNor99k+qluJur2A==
|
|
||||||
dependencies:
|
|
||||||
"@langchain/langgraph" "^1.1.2"
|
|
||||||
"@langchain/langgraph-checkpoint" "^1.0.0"
|
|
||||||
langsmith ">=0.4.0 <1.0.0"
|
|
||||||
uuid "^10.0.0"
|
|
||||||
zod "^3.25.76 || ^4"
|
|
||||||
|
|
||||||
"langsmith@>=0.4.0 <1.0.0":
|
|
||||||
version "0.4.10"
|
|
||||||
resolved "https://registry.npmmirror.com/langsmith/-/langsmith-0.4.10.tgz#c878e37f389f4b2231a70a3b4396c362179bfc04"
|
|
||||||
integrity sha512-l9QP/a7RXBXdaoAnNx99X+TK8aul8Qe4us1oCybdMgDmYMLT5PAwlJactvSdTlT8NOeSoFThYa2N7ijznBNe9w==
|
|
||||||
dependencies:
|
|
||||||
"@types/uuid" "^10.0.0"
|
|
||||||
chalk "^4.1.2"
|
|
||||||
console-table-printer "^2.12.1"
|
|
||||||
p-queue "^6.6.2"
|
|
||||||
semver "^7.6.3"
|
|
||||||
uuid "^10.0.0"
|
|
||||||
|
|
||||||
lazy-val@^1.0.5:
|
lazy-val@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.npmmirror.com/lazy-val/-/lazy-val-1.0.5.tgz#6cf3b9f5bc31cee7ee3e369c0832b7583dcd923d"
|
resolved "https://registry.npmmirror.com/lazy-val/-/lazy-val-1.0.5.tgz#6cf3b9f5bc31cee7ee3e369c0832b7583dcd923d"
|
||||||
@ -3482,11 +3406,6 @@ p-cancelable@^2.0.0:
|
|||||||
resolved "https://registry.npmmirror.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf"
|
resolved "https://registry.npmmirror.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf"
|
||||||
integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==
|
integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==
|
||||||
|
|
||||||
p-finally@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.npmmirror.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
|
|
||||||
integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==
|
|
||||||
|
|
||||||
"p-limit@^3.1.0 ":
|
"p-limit@^3.1.0 ":
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
|
resolved "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
|
||||||
@ -3506,41 +3425,6 @@ p-map@^7.0.2:
|
|||||||
resolved "https://registry.npmmirror.com/p-map/-/p-map-7.0.4.tgz#b81814255f542e252d5729dca4d66e5ec14935b8"
|
resolved "https://registry.npmmirror.com/p-map/-/p-map-7.0.4.tgz#b81814255f542e252d5729dca4d66e5ec14935b8"
|
||||||
integrity sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==
|
integrity sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==
|
||||||
|
|
||||||
p-queue@^6.6.2:
|
|
||||||
version "6.6.2"
|
|
||||||
resolved "https://registry.npmmirror.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426"
|
|
||||||
integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==
|
|
||||||
dependencies:
|
|
||||||
eventemitter3 "^4.0.4"
|
|
||||||
p-timeout "^3.2.0"
|
|
||||||
|
|
||||||
p-queue@^9.0.1:
|
|
||||||
version "9.1.0"
|
|
||||||
resolved "https://registry.npmmirror.com/p-queue/-/p-queue-9.1.0.tgz#846e517c461fb6e3cf8fc09904e57d342ac448b2"
|
|
||||||
integrity sha512-O/ZPaXuQV29uSLbxWBGGZO1mCQXV2BLIwUr59JUU9SoH76mnYvtms7aafH/isNSNGwuEfP6W/4xD0/TJXxrizw==
|
|
||||||
dependencies:
|
|
||||||
eventemitter3 "^5.0.1"
|
|
||||||
p-timeout "^7.0.0"
|
|
||||||
|
|
||||||
p-retry@^7.1.1:
|
|
||||||
version "7.1.1"
|
|
||||||
resolved "https://registry.npmmirror.com/p-retry/-/p-retry-7.1.1.tgz#7470fdecb1152ba50f1334e48378c9e401330e24"
|
|
||||||
integrity sha512-J5ApzjyRkkf601HpEeykoiCvzHQjWxPAHhyjFcEUP2SWq0+35NKh8TLhpLw+Dkq5TZBFvUM6UigdE9hIVYTl5w==
|
|
||||||
dependencies:
|
|
||||||
is-network-error "^1.1.0"
|
|
||||||
|
|
||||||
p-timeout@^3.2.0:
|
|
||||||
version "3.2.0"
|
|
||||||
resolved "https://registry.npmmirror.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe"
|
|
||||||
integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==
|
|
||||||
dependencies:
|
|
||||||
p-finally "^1.0.0"
|
|
||||||
|
|
||||||
p-timeout@^7.0.0:
|
|
||||||
version "7.0.1"
|
|
||||||
resolved "https://registry.npmmirror.com/p-timeout/-/p-timeout-7.0.1.tgz#95680a6aa693c530f14ac337b8bd32d4ec6ae4f0"
|
|
||||||
integrity sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==
|
|
||||||
|
|
||||||
package-json-from-dist@^1.0.0:
|
package-json-from-dist@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.npmmirror.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505"
|
resolved "https://registry.npmmirror.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505"
|
||||||
@ -4143,11 +4027,6 @@ simple-update-notifier@2.0.0, simple-update-notifier@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
semver "^7.5.3"
|
semver "^7.5.3"
|
||||||
|
|
||||||
simple-wcswidth@^1.1.2:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.npmmirror.com/simple-wcswidth/-/simple-wcswidth-1.1.2.tgz#66722f37629d5203f9b47c5477b1225b85d6525b"
|
|
||||||
integrity sha512-j7piyCjAeTDSjzTSQ7DokZtMNwNlEAyxqSZeCS+CXH7fJ4jx3FuJ/mTW3mE+6JLs4VJBbcll0Kjn+KXI5t21Iw==
|
|
||||||
|
|
||||||
slice-ansi@^3.0.0:
|
slice-ansi@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.npmmirror.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787"
|
resolved "https://registry.npmmirror.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787"
|
||||||
@ -4640,11 +4519,6 @@ util-extend@^1.0.1:
|
|||||||
resolved "https://registry.npmmirror.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f"
|
resolved "https://registry.npmmirror.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f"
|
||||||
integrity sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==
|
integrity sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==
|
||||||
|
|
||||||
uuid@^10.0.0:
|
|
||||||
version "10.0.0"
|
|
||||||
resolved "https://registry.npmmirror.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294"
|
|
||||||
integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==
|
|
||||||
|
|
||||||
uuid@^13.0.0:
|
uuid@^13.0.0:
|
||||||
version "13.0.0"
|
version "13.0.0"
|
||||||
resolved "https://registry.npmmirror.com/uuid/-/uuid-13.0.0.tgz#263dc341b19b4d755eb8fe36b78d95a6b65707e8"
|
resolved "https://registry.npmmirror.com/uuid/-/uuid-13.0.0.tgz#263dc341b19b4d755eb8fe36b78d95a6b65707e8"
|
||||||
@ -4811,7 +4685,7 @@ zhipu-ai-provider@^0.2.2:
|
|||||||
"@ai-sdk/provider" "^2.0.0"
|
"@ai-sdk/provider" "^2.0.0"
|
||||||
"@ai-sdk/provider-utils" "^3.0.0"
|
"@ai-sdk/provider-utils" "^3.0.0"
|
||||||
|
|
||||||
"zod@^3.25.76 || ^4", zod@^4.3.5:
|
zod@^4.3.5:
|
||||||
version "4.3.6"
|
version "4.3.6"
|
||||||
resolved "https://registry.npmmirror.com/zod/-/zod-4.3.6.tgz#89c56e0aa7d2b05107d894412227087885ab112a"
|
resolved "https://registry.npmmirror.com/zod/-/zod-4.3.6.tgz#89c56e0aa7d2b05107d894412227087885ab112a"
|
||||||
integrity sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==
|
integrity sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user