修复bug
This commit is contained in:
parent
9c2694f842
commit
a9acf38d3b
@ -61,8 +61,10 @@ export async function runDecisionAI(ctx: AgentContext) {
|
|||||||
videoMode = projectInfo.mode ?? "";
|
videoMode = projectInfo.mode ?? "";
|
||||||
}
|
}
|
||||||
const isRef = Array.isArray(videoMode) ? true : false;
|
const isRef = Array.isArray(videoMode) ? true : false;
|
||||||
|
// console.log("%c Line:64 🍯 isRef", "background:#b03734", isRef);
|
||||||
// const findData = models.find((i: any) => i.modelName == videoModelName);
|
// const findData = models.find((i: any) => i.modelName == videoModelName);
|
||||||
// const isRef = findData.mode.every((i: any) => Array.isArray(i));
|
// const isRef = findData.mode.every((i: any) => Array.isArray(i));
|
||||||
|
console.log("%c Line:67 🍪 isRef", "background:#fca650", isRef);
|
||||||
const modelInfo = `项目使用的模型如下:\n图像模型:${imageModelName}\n视频模型:${videoModelName}\n多参:${isRef ? "是" : "否"}`;
|
const modelInfo = `项目使用的模型如下:\n图像模型:${imageModelName}\n视频模型:${videoModelName}\n多参:${isRef ? "是" : "否"}`;
|
||||||
|
|
||||||
const mem = buildMemPrompt(await memory.get(text));
|
const mem = buildMemPrompt(await memory.get(text));
|
||||||
@ -148,8 +150,16 @@ async function createSubAgent(parentCtx: AgentContext) {
|
|||||||
const [id, videoModelName] = projectInfo.videoModel!.split(/:(.+)/);
|
const [id, videoModelName] = projectInfo.videoModel!.split(/:(.+)/);
|
||||||
const models = await u.vendor.getModelList(id);
|
const models = await u.vendor.getModelList(id);
|
||||||
if (!models.length) throw new Error(`项目使用的模型不存在,ID: ${projectInfo.videoModel}`);
|
if (!models.length) throw new Error(`项目使用的模型不存在,ID: ${projectInfo.videoModel}`);
|
||||||
const findData = models.find((i: any) => i.modelName == videoModelName);
|
// const findData = models.find((i: any) => i.modelName == videoModelName);
|
||||||
const isRef = findData.mode.every((i: any) => Array.isArray(i));
|
// console.log("%c Line:153 🍿 findData.mode", "background:#93c0a4", findData.mode);
|
||||||
|
let videoMode = "";
|
||||||
|
try {
|
||||||
|
videoMode = JSON.parse(projectInfo.mode ?? "");
|
||||||
|
} catch (e) {
|
||||||
|
videoMode = projectInfo.mode ?? "";
|
||||||
|
}
|
||||||
|
const isRef = Array.isArray(videoMode) ? true : false;
|
||||||
|
console.log("%c Line:153 🥤 isRef", "background:#42b983", isRef);
|
||||||
const modelInfo = `项目使用的模型如下:\n图像模型:${imageModelName}\n视频模型:${videoModelName}\n多参:${isRef ? "是" : "否"}`;
|
const modelInfo = `项目使用的模型如下:\n图像模型:${imageModelName}\n视频模型:${videoModelName}\n多参:${isRef ? "是" : "否"}`;
|
||||||
|
|
||||||
// const run_sub_agent_execution = tool({
|
// const run_sub_agent_execution = tool({
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export default router.post(
|
|||||||
const row = await u.db("o_agentWorkData").where({ projectId: projectId, key: agentType }).first();
|
const row = await u.db("o_agentWorkData").where({ projectId: projectId, key: agentType }).first();
|
||||||
|
|
||||||
if (!row) {
|
if (!row) {
|
||||||
await u.db("o_agentWorkData").insert({
|
const [id] = await u.db("o_agentWorkData").insert({
|
||||||
projectId: projectId,
|
projectId: projectId,
|
||||||
key: agentType,
|
key: agentType,
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
@ -26,8 +26,11 @@ export default router.post(
|
|||||||
});
|
});
|
||||||
return res.status(200).send(
|
return res.status(200).send(
|
||||||
success({
|
success({
|
||||||
storySkeleton: "",
|
data: {
|
||||||
adaptationStrategy: "",
|
storySkeleton: "",
|
||||||
|
adaptationStrategy: "",
|
||||||
|
},
|
||||||
|
id
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user