Wait For Completion • AI Agent SDK

wait_for_completion: Wait for video generation to complete.

wait_for_completion

Method

</div>

This is a method of the VideoAgent class in the video_agent module.

Wait for video generation to complete.

Signature

python
def wait_for_completion(video_id: str, poll_interval: Optional[int], max_wait_time: Optional[int]) -> Any

Parameters

ParamField str

The video ID to poll

ParamField Optional[int]

Seconds between status checks (default: 10)

ParamField Optional[int]

Maximum wait time in seconds (default: 600)

Returns

ResponseField Any

VideoObject with status “completed” or “failed”

Exceptions

TimeoutError

If max_wait_time is exceeded

Uses

  • time.time
  • Progress
  • SpinnerColumn
  • TextColumn
  • progress.add_task
  • status
  • time.sleep
  • TimeoutError

Used By

Source

View on GitHub

praisonaiagents/agent/video_agent.py at line 557