Merge branch 'develop'
This commit is contained in:
commit
b97a4a4bca
@ -75,26 +75,31 @@ export default router.post(
|
|||||||
const [id, modelData] = model.split(":");
|
const [id, modelData] = model.split(":");
|
||||||
const projectData = await u.db("o_project").select("*").where({ id: projectId }).first();
|
const projectData = await u.db("o_project").select("*").where({ id: projectId }).first();
|
||||||
const videoPrompt = await u.db("o_prompt").where("type", "videoPromptGeneration").first();
|
const videoPrompt = await u.db("o_prompt").where("type", "videoPromptGeneration").first();
|
||||||
|
let videoPromptGeneration = "" as string | undefined;
|
||||||
|
if (videoPrompt && videoPrompt.useData) {
|
||||||
|
videoPromptGeneration = videoPrompt.useData;
|
||||||
|
} else {
|
||||||
|
videoPromptGeneration = videoPrompt?.data ?? undefined;
|
||||||
|
}
|
||||||
const artStyle = projectData?.artStyle || "无";
|
const artStyle = projectData?.artStyle || "无";
|
||||||
const visualManual = u.getArtPrompt(artStyle, "art_skills", "art_storyboard_video");
|
const visualManual = u.getArtPrompt(artStyle, "art_skills", "art_storyboard_video");
|
||||||
const content = `
|
const content = `
|
||||||
**模型名称**:${modelData},
|
**模型名称**:${modelData},
|
||||||
**资产信息**(角色、场景、道具):${assets.map((i) => `[id:${i.id},type:${i.type},name:${i.name}]`).join(",")},
|
**资产信息**(角色、场景、道具):${assets.map((i) => `[${i.id},${i.type},${i.name}]`).join(",")},
|
||||||
**分镜信息**:${storyboard.map(
|
**分镜信息**:${storyboard.map(
|
||||||
(i) => `<storyboardItem
|
(i) => `<storyboardItem
|
||||||
videoDesc=${i.videoDesc}
|
videoDesc='${i.videoDesc}'
|
||||||
prompt=${i.prompt}
|
prompt='${i.prompt}'
|
||||||
track=${i.track}
|
track='${i.track}'
|
||||||
duration=${i.duration}
|
duration='${i.duration}'
|
||||||
associateAssetsIds=${i.associateAssetsIds}
|
associateAssetsIds='[${i.associateAssetsIds}]'
|
||||||
shouldGenerateImage='${i.shouldGenerateImage == 1 ? "true" : "false"}'
|
shouldGenerateImage='${i.shouldGenerateImage == 1 ? "true" : "false"}'
|
||||||
></storyboardItem>`,
|
></storyboardItem>`,
|
||||||
)},
|
)},
|
||||||
`;
|
`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { text } = await u.Ai.Text("universalAi").invoke({
|
const { text } = await u.Ai.Text("universalAi").invoke({
|
||||||
system: videoPrompt?.data!,
|
system: videoPromptGeneration,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
role: "assistant",
|
role: "assistant",
|
||||||
|
|||||||
36
src/types/database.d.ts
vendored
36
src/types/database.d.ts
vendored
@ -1,6 +1,37 @@
|
|||||||
// @db-hash 3296433eb24314b094ac5d3839c049c5
|
// @db-hash 6cd709d9bdfe00c4dc87961a8ebba149
|
||||||
//该文件由脚本自动生成,请勿手动修改
|
//该文件由脚本自动生成,请勿手动修改
|
||||||
|
|
||||||
|
export interface _o_project_old_20260404 {
|
||||||
|
'artStyle'?: string | null;
|
||||||
|
'createTime'?: number | null;
|
||||||
|
'directorManual'?: string | null;
|
||||||
|
'id'?: number | null;
|
||||||
|
'imageModel'?: string | null;
|
||||||
|
'imageQuality'?: string | null;
|
||||||
|
'intro'?: string | null;
|
||||||
|
'mode'?: string | null;
|
||||||
|
'name'?: string | null;
|
||||||
|
'projectType'?: string | null;
|
||||||
|
'type'?: string | null;
|
||||||
|
'userId'?: number | null;
|
||||||
|
'videoModel'?: string | null;
|
||||||
|
'videoRatio'?: string | null;
|
||||||
|
}
|
||||||
|
export interface _o_prompt_old_20260406 {
|
||||||
|
'data'?: string | null;
|
||||||
|
'id'?: number;
|
||||||
|
'name'?: string | null;
|
||||||
|
'type'?: string | null;
|
||||||
|
'useData'?: string | null;
|
||||||
|
}
|
||||||
|
export interface _o_prompt_old_20260406_1 {
|
||||||
|
'data'?: string | null;
|
||||||
|
'id'?: number;
|
||||||
|
'name'?: string | null;
|
||||||
|
'TEXT'?: any | null;
|
||||||
|
'type'?: string | null;
|
||||||
|
'useData'?: string | null;
|
||||||
|
}
|
||||||
export interface memories {
|
export interface memories {
|
||||||
'content': string;
|
'content': string;
|
||||||
'createTime': number;
|
'createTime': number;
|
||||||
@ -232,6 +263,9 @@ export interface o_videoTrack {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DB {
|
export interface DB {
|
||||||
|
"_o_project_old_20260404": _o_project_old_20260404;
|
||||||
|
"_o_prompt_old_20260406": _o_prompt_old_20260406;
|
||||||
|
"_o_prompt_old_20260406_1": _o_prompt_old_20260406_1;
|
||||||
"memories": memories;
|
"memories": memories;
|
||||||
"o_agentDeploy": o_agentDeploy;
|
"o_agentDeploy": o_agentDeploy;
|
||||||
"o_agentWorkData": o_agentWorkData;
|
"o_agentWorkData": o_agentWorkData;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user