From e30873e6b656f889495c982d16f2ca2c1874de3b Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Wed, 4 Feb 2026 23:23:28 -0600 Subject: [PATCH] docs(blocks): fix misleading loop block field descriptions Both duration and n_loops descriptions incorrectly implied default behavior. Actually, one of them must be provided or an error is raised. Co-Authored-By: Claude Opus 4.5 --- autogpt_platform/backend/backend/blocks/video/loop.py | 4 ++-- docs/integrations/block-integrations/video/loop.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autogpt_platform/backend/backend/blocks/video/loop.py b/autogpt_platform/backend/backend/blocks/video/loop.py index 9c27dacdad..461610f713 100644 --- a/autogpt_platform/backend/backend/blocks/video/loop.py +++ b/autogpt_platform/backend/backend/blocks/video/loop.py @@ -26,13 +26,13 @@ class LoopVideoBlock(Block): description="The input video (can be a URL, data URI, or local path)." ) duration: Optional[float] = SchemaField( - description="Target duration (in seconds) to loop the video to. If omitted, defaults to no looping.", + description="Target duration (in seconds) to loop the video to. Either duration or n_loops must be provided.", default=None, ge=0.0, le=3600.0, # Max 1 hour to prevent disk exhaustion ) n_loops: Optional[int] = SchemaField( - description="Number of times to repeat the video. If omitted, defaults to 1 (no repeat).", + description="Number of times to repeat the video. Either n_loops or duration must be provided.", default=None, ge=1, le=10, # Max 10 loops to prevent disk exhaustion diff --git a/docs/integrations/block-integrations/video/loop.md b/docs/integrations/block-integrations/video/loop.md index 89aa81118c..ea90422e2e 100644 --- a/docs/integrations/block-integrations/video/loop.md +++ b/docs/integrations/block-integrations/video/loop.md @@ -18,8 +18,8 @@ The block uses MoviePy's Loop effect to repeat a video clip. You can specify eit | Input | Description | Type | Required | |-------|-------------|------|----------| | video_in | The input video (can be a URL, data URI, or local path). | str (file) | Yes | -| duration | Target duration (in seconds) to loop the video to. If omitted, defaults to no looping. | float | No | -| n_loops | Number of times to repeat the video. If omitted, defaults to 1 (no repeat). | int | No | +| duration | Target duration (in seconds) to loop the video to. Either duration or n_loops must be provided. | float | No | +| n_loops | Number of times to repeat the video. Either n_loops or duration must be provided. | int | No | ### Outputs