from llmcam.fn_to_fc import *
import llmcam.downloader
import json
File Downloader in FC
Download a file in FC
download_file
download_file (url:str, save_path:str=None)
Download a file from a give url
Type | Default | Details | |
---|---|---|---|
url | str | URL to download | |
save_path | str | None | file name to save |
= [tool_schema(llmcam.downloader.download_file)]
tools #print(json.dumps(*tools, indent=4))
= form_msgs([("user","Download a file from https://weathercam.digitraffic.fi/C0150200.jpg.")])
m =tools)
complete(m, tools=False) print_msgs(m, skip_tools
>> User:
Download a file from https://weathercam.digitraffic.fi/C0150200.jpg.
>> Assistant:
{'content': None, 'refusal': None, 'role': 'assistant', 'tool_calls': [{'id': 'call_Xdh3dm0g2VAkNLTCVq5J7gKp', 'function': {'arguments': '{"url":"https://weathercam.digitraffic.fi/C0150200.jpg"}', 'name': 'download_file'}, 'type': 'function'}]}
>> Assistant:
The file has been downloaded successfully from [this
link](https://weathercam.digitraffic.fi/C0150200.jpg) and is saved as "C0150200.jpg".