Commit c7d535ab authored by 周成波's avatar 周成波

update

parent a23e8e21
......@@ -271,6 +271,13 @@ const onAdaptSceneRoles = async () => {
});
return;
}
if (!form.all_roles) {
ElMessage({
message: `总角色为空`,
type: "error",
});
return;
}
loading.value = true;
async function processScenes() {
for (const item of form.adapt_result_json) {
......@@ -299,6 +306,13 @@ const onAdaptOneSceneRoles = async (item: any) => {
});
return;
}
if (!form.all_roles) {
ElMessage({
message: `总角色为空`,
type: "error",
});
return;
}
// 推理角色
try {
if (form.chatgpt_answer_roles.length === 0) {
......@@ -357,16 +371,22 @@ const onDraw = async () => {
return;
}
for (const item of form.adapt_result_json) {
if (!item.场景关键词) {
ElMessage({
message: `分镜 ${item.编号} 场景关键词不能为空`,
type: "error",
});
return;
}
onDrawOne(item);
}
};
const onDrawOne = async (item: any) => {
item.本镜配图 = "src/assets/loading.gif";
if (!item.场景关键词 && !item.角色关键词) {
if (!item.场景关键词) {
ElMessage({
message: "英文描述不能为空",
message: "场景关键词不能为空",
type: "error",
});
return;
......@@ -377,6 +397,7 @@ const onDrawOne = async (item: any) => {
console.log(form.task_id)
}
try {
item.本镜配图 = "src/assets/loading.gif";
// let temp_prompt = ""
// if (item.场景描述) {temp_prompt = temp_prompt + `场景描述为:${item.场景描述}\n`};
// if (item.场景关键词) {temp_prompt = temp_prompt + `场景关键词为:${item.场景关键词}\n`};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment