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 [源代码]
Download file from the given url to the specified location.
- 参数:
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.
- 返回:
A ServiceResponse object that contains execution results or error message.
- 返回类型:
ServiceResponse