DefaultDownloadFunction
Namespace: Vercel.AI.Util
public static class DefaultDownloadFunctionDefault download function: downloads URLs the model cannot fetch itself.
Inheritance: object
Methods
Section titled “Methods”Create(Func<AssetDownloadCall, Task<DownloadResult>>?, CancellationToken)
Section titled “Create(Func<AssetDownloadCall, Task<DownloadResult>>?, CancellationToken)”public static Func<IReadOnlyList<DownloadRequestItem>, Task<IReadOnlyList<DownloadResult>>> Create(Func<AssetDownloadCall, Task<DownloadResult>>? download = null, CancellationToken abortSignal = default)Creates a function that downloads each URL the model does not support.
Parameters
| Name | Type | Description |
|---|---|---|
download |
Func<AssetDownloadCall, Task<DownloadResult>> | |
abortSignal |
CancellationToken |
Returns: Func<IReadOnlyList<DownloadRequestItem>, Task<IReadOnlyList<DownloadResult>>>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product