Merge branch '108' of https://github.com/HBAI-Ltd/Toonflow-app into 108
# Conflicts: # src/router.ts
This commit is contained in:
commit
a9634755b5
16
src/routes/assets/getMaterialData.ts
Normal file
16
src/routes/assets/getMaterialData.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import express from "express";
|
||||||
|
import u from "@/utils";
|
||||||
|
import { success } from "@/lib/responseFormat";
|
||||||
|
const router = express.Router();
|
||||||
|
|
||||||
|
// 获取生成图片
|
||||||
|
export default router.post("/", async (req, res) => {
|
||||||
|
const list = await u.db("o_assets").leftJoin("o_image", "o_assets.id", "=", "o_image.assetsId").where("o_assets.type", "clip").select("*");
|
||||||
|
const data = await Promise.all(
|
||||||
|
list.map(async (item) => ({
|
||||||
|
...item,
|
||||||
|
filePath: item.filePath ? await u.oss.getFileUrl(item.filePath) : "",
|
||||||
|
})),
|
||||||
|
);
|
||||||
|
res.status(200).send(success(data));
|
||||||
|
});
|
||||||
@ -104,9 +104,7 @@ export default router.post(
|
|||||||
|
|
||||||
const aiVideo = u.Ai.Video(model);
|
const aiVideo = u.Ai.Video(model);
|
||||||
await aiVideo.run({
|
await aiVideo.run({
|
||||||
systemPrompt,
|
|
||||||
projectId,
|
projectId,
|
||||||
storyboardId,
|
|
||||||
prompt,
|
prompt,
|
||||||
imageBase64: base64.filter((item) => item !== null) as string[],
|
imageBase64: base64.filter((item) => item !== null) as string[],
|
||||||
mode,
|
mode,
|
||||||
|
|||||||
@ -116,8 +116,6 @@ class AiImage {
|
|||||||
}
|
}
|
||||||
interface VideoConfig {
|
interface VideoConfig {
|
||||||
projectId: number; // 项目ID
|
projectId: number; // 项目ID
|
||||||
storyboardId: number; // 关联的分镜ID
|
|
||||||
systemPrompt?: string; // 系统提示词
|
|
||||||
prompt: string; //视频提示词
|
prompt: string; //视频提示词
|
||||||
imageBase64: string[]; //输入的图片提示词
|
imageBase64: string[]; //输入的图片提示词
|
||||||
mode: string; //模式
|
mode: string; //模式
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user