agentscope.service.web.download module
Download file from URL.
- agentscope.service.web.download.download_from_url(url: str, filepath: str, timeout: int = 120, retries: int = 3) ServiceResponse [source]
Download file from the given url to the specified location.
- Parameters:
url (str) – The URL of the file to download.
filepath (str) – The path to save the downloaded file.
timeout (int, defaults to 120) – The timeout for the download request.
retries (int, defaults to 3) – The number of retries for the download request.
- Returns:
A ServiceResponse object that contains execution results or error message.
- Return type:
ServiceResponse