🐛 fix: fix the LLM logic

This commit is contained in:
yyhhyyyyyy
2024-12-12 14:29:14 +08:00
parent 85d446e2d0
commit 2d8cd23fe7
3 changed files with 270 additions and 249 deletions

View File

@@ -214,7 +214,7 @@ def start(task_id, params: VideoParams, stop_at: str = "video"):
# 1. Generate script
video_script = generate_script(task_id, params)
if not video_script:
if not video_script or "Error: " in video_script:
sm.state.update_task(task_id, state=const.TASK_STATE_FAILED)
return